
GLPlusPlus C++ OpenGL headers
Posted Monday, 6 December, 2010 - 11:07 by the Fiddler inGLPlusPlus is a C++ version of gl.h and glext.h. It is simple, fast and portable.
Features
- Proper C++ namespaces
- Proper enumerations for function parameters
- Overloads for related functions (
Vertex3instead ofglVertex3fuiv) - Automatic extension loading
- Enhanced debugging capabilities
- Support for forward-compatible OpenGL 3.3 and 4.1
- Support for backwards-compatible OpenGL 2.1 (enable with -DALLOW_COMPATIBLE_GL)
Usage
#include "gl++" #include <vector> using namespace OpenTK; void gl4() { std::vector<const char*> source; source.push_back("void main() { }"); GL::Init(); int shader = GL::CreateShader(ShaderType::VertexShader); GL::ShaderSource(shader, source.size(), &source[0], NULL); GL::CompileShader(shader); } void gl2() { // Enable with -DGLPP_COMPATIBLE GL::Init(); GL::Begin(BeginMode.Triangles); GL::Vertex2(-1.0f, -1.0f); GL::Vertex2(1.0f, -1.0f); GL::Vertex2(0.0f, 1.0f); GL::End(); }
GLPlusPlus is built using the OpenTK binding generator.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 2010.12.07 | 2010-Dec-07 | 411 bytes | Recommended for 1.x | ||

