Nice work. I did a quick review of your code, and have some suggestions for possible improvement. Apologies for not creating a pull request, but I don't have a Git client installed.

Check for errors after every GL call that can generate an error. Because GL functions fail silently, debugging why your program misbehaves after a failed GL call is almost as annoying as finding the cause of heap corruption. Also make sure that every GL call is covered, or you may get your errors at the wrong functions. The error code will not reset once it is set, until glGetError is called. These checks should be disabled in a release build, because they're quite costly.

All resources are released using a release method, not the destructor. This is good. But to ease debugging, set the handle to zero in release(), and check for a zero handle in the destructor. Log a warning or something like that if the check fails.

Some functions have overloads for both GLuint's and wrapper instances. Unless you really need the GLuint versions, it's probably better to remove these. Users should either use the wrappers for everything or not at all, anything in between will cause bloat, ugliness, and errors.

Shader.shaders: perhaps rename to shaderSources?

The ElementBuffer and Buffer constructors accepting a pointer will not compile, the pointer version of set_data requires a size argument.

On Thursday, 26 July 2012 at 13:47:42 UTC, David wrote:
https://github.com/Dav1dde/glamour

Glamour wraps opengl is not an opengl binding. Currently it supports:

* Sampler objects
* Textures (1D, 2D, 2D_ARRAY, 3D)
* Shaders
* Buffers (Elementbuffers and "normal" VBOs)

For the shaders a custom format is used:

-----
vertex:
    // here goes the vertex shader

geometry:
// here goes the geometry shader (this section can be omitted)

fragment:
   // here goes the fragment shader
-----

Readme/Installation: https://github.com/Dav1dde/glamour/blob/master/README.md
Documentation: http://dav1dde.github.com/glamour/


TODO:
* support more opengl "backends", like statically linked opengl (in glamour.gl)
 * polish up the index.d and write a proper installation guide

Pull requests are appreciated.


Reply via email to