Sub_image calls allocate_ internally, so it should avoid doing
unnecessary work.
throw invalid_operation("Texture3D::allocate");
if(level>=levels)
throw invalid_argument("Texture3D::allocate");
- if(allocated&(1<<level))
- return;
bool direct = ARB_texture_storage && ARB_direct_state_access;
if(!direct)
void Texture3D::allocate_(unsigned level)
{
+ if(allocated&(1<<level))
+ return;
+
if(ARB_texture_storage)
{
GLenum fmt = get_gl_pixelformat(storage_fmt);
throw invalid_operation("TextureCube::allocate");
if(level>=levels)
throw invalid_argument("TextureCube::allocate");
- if(allocated&(64<<level))
- return;
bool direct = ARB_texture_storage && ARB_direct_state_access;
if(!direct)
void TextureCube::allocate_(unsigned level)
{
+ if(allocated&(64<<level))
+ return;
+
if(ARB_texture_storage)
{
GLenum fmt = get_gl_pixelformat(storage_fmt);