#include
<oglplus/wrapper.hpp>
OpenGL supports two kinds of object creation functions:
glGen*
functions, which just generate a new
object name, but don't have to actually initialize the actual GL object.
The construction is usually postponed until the call to glBind*
.
glCreate*
functions, which both generate a name
and initialize the new object.
Prior to GL version 4.5 some objects like Texture,
Buffer, Query
etc. were created just by using the glGen*
functions
and some objects like Program
and Shader just by the
glCreate*
functions. Since GL version 4.5 it is possible
to choose the construction method for several types of objects (for example
to create a new buffer either the glGenBuffers
or glCreateBuffers
function can be used.
OGLplus distinguishes the object construction methods as listed above at compile-time by using the following tag types:
namespace tag { struct Generate; struct Create ; } // namespace tag