Samstag, 13. September 2014
GL Object Wrapper
Modernes OpenGL ist effizient, schnell, leistungsfähig und vielseitig, aber die Syntax ist noch wesentlich umständlicher und verwirrender als sie es ohnehin schon war. Um die Verwendung etwas weniger schmerzhaft zu gestalten, habe ich also eine Mini-Bibliothek geschrieben, die einem die gängigen Funktionen wie das Kompilieren von Shadern, das Binden von Uniforms und das erstellen, befüllen und hochladen von Vertex Buffer Objects abnimmt:
Der GL Object Wrapper "GLOW".
Für Leute die noch auf alten Systemen ohne Shader arbeiten kann die Bibliothek auch die Fixed Pipeline mit Vertex Arrays benutzen - die Syntax ist für beides (so weit wie möglich) gleich.
Mit dabei ist auch ein Loader für Wavefront Objects (.obj), ein gängiges und gut dokumentiertes Format für 3D-Modelle.
Das Beispielprogramm verwendet SDL, SDW und QDW zum Laden von Texturen und für I/O, aber GLOW selbst benötigt nur OpenGL und GLM.
glow-alpha1 (zip, 947 KB)

GL Object Wrapper Demo

While modern OpenGL is efficient, fast, powerful and versatile, its syntax became even more arcane and convoluted than before. To make using it a little less painful, I wrote a small library to handle common tasks like compiling shaders, binding uniforms and creating, filling and uploading Vertex Buffer Objects:
The GL Object Wrapper "GLOW".
For old machines, the library can also use the Fixed Pipeline with Vertex Arrays, while keeping the Syntax as close to identical as possible.
The library also contains a loader for Wavefront Objects (.obj), a common and well-documented type of 3D-Models.
The example uses SDL, SDW and QDW to load textures and handle I/O, but GLOW itself only requires OpenGL and GLM.
glow-alpha1 (zip, 947 KB)

... comment