I get GL_INVALID_VALUE after calling glTexSubImage2D
Posted
by
user892644
on Game Development
See other posts from Game Development
or by user892644
Published on 2013-10-16T17:18:28Z
Indexed on
2013/10/17
16:27 UTC
Read the original article
Hit count: 256
opengl
I am trying to figure out why my texture allocation does not work. Here is the code:
glTexStorage2D(GL_TEXTURE_2D, 2, GL_RGBA8, 2048, 2048);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2048, 2048, GL_RGB,
GL_UNSIGNED_SHORT_5_6_5_REV, &BitMap[0]);
glTexSubImage2D
returns GL_INVALID_VALUE
but the maximum texture allowed is 16384x16384 on my card.
The source of the image is 16bit (Red 5, Green 6, Blue 5).
© Game Development or respective owner