Catalog · How the catalog works
GLCanvas
OpenGL drawing library for Free Pascal
- ★ 15 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
GLCanvas - Minimalistic rendering library
GLCanvas provides a minimalistic rendering API in the same vein as raylib or libGDX.
A simple program with GLCanvas:
program Test;
uses
CThreads, GLCanvas;
const
window_size_width = 600;
window_size_height = 600;
var
texture: TTexture;
begin
SetupCanvas(window_size_width, window_size_height);
texture := TTexture.Create('deer.png');
while IsRunning do
begin
ClearBackground;
DrawTexture(texture, RectMake(50, 50, texture.GetSize));
SwapBuffers;
end;
QuitApp;
end.Features:
- Flat procedural API
- Standard vector types and matrix math
- Texture loading (only supports PNG format currently)
- Bitmap and Freetype fonts
- Shaders (optional)
- Frame buffers (optional)
- GLUI for many common UI elements like windows, buttons etc...
Platforms:
Installing on Windows:
- Download and install the latest release of SDL2 for mingw. For example at the time of writing this
SDL2-devel-2.26.3-mingw.zipis most recent. See https://github.com/libsdl-org/SDL/releasess Copy theSDL2.dllfrom\SDL2-2.24.1\i686-w64-mingw32\bininto the directory which contains the compiled executable (Use i686 for if you're using thei386-win3232-bit compiler).
- Download FreeType libraries from https://github.com/ubawurinna/freetype-windows-binariess Copy
/release dll/win32/freetype.dllinto the directory which contains the compiled executable.

