adbrown85 / gloop

Lightweight C++ wrapper for OpenGL
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Program wrapper #15

Closed adbrown85 closed 12 years ago

adbrown85 commented 12 years ago

Currently we're just using GLuint for programs, but it'd be nice to have a type-safe wrapper that also made programs a little easier to work with. Like Shader, it will be very lightweight, just holding its handle. We'll probably need Attribute and Uniform classes to return information about them.

Program
 + _create_() : Program
 + attachShader(shader : Shader)
 + attribLocation(name : string) : GLuint
 + attribLocation(name : string, location : GLuint)
 + attributes() : vector<Attribute>
 + detachShader(shader : Shader)
 + dispose()
 + fragDataLocation(name : string) : GLuint
 + fragDataLocation(name : string, location : GLuint)
 + handle() : GLuint
 + link()
 + linked() : bool
 + log() : string
 + shaders() : vector<Shader>
 + uniforms() : vector<Uniform>
 + use()
 + valid() : bool
 + validate()
 + _wrap_(handle : GLuint) : Program
adbrown85 commented 12 years ago

We now have a working wrapper for shader programs. May want to change some things with it, but we'll leave that for separate issues.