OpenGLTexture *OpenGLTexture::scratch_binding = 0;
-OpenGLTexture::OpenGLTexture(unsigned t, bool create):
- id(0),
+OpenGLTexture::OpenGLTexture(unsigned t):
target(t)
{
- if(create)
- generate_id();
-
static bool alignment_init = false;
if(!alignment_init)
{
glDeleteTextures(1, &id);
}
-void OpenGLTexture::generate_id()
+void OpenGLTexture::create()
{
if(id)
- throw invalid_operation("OpenGLTexture::generate_id");
+ throw invalid_operation("OpenGLTexture::create");
if(ARB_direct_state_access)
glCreateTextures(target, 1, &id);
else