I get an EGL error: EGL ERROR: type = 0x824c, severity = 0x9146, message = "texture resource is NULL, no level was specified"
This error appears when executing glTextSubImage for texId1 in the first 3 lines of code below. No errors on the texId2. Wondering if anyone else has any ideas on what this error could be?
This error is visible in the debugMessagecallback and the associated glGetError() is GL_INVALID_OPERATION.
//render loop
glBindTexture(GL_TEXTURE_2D, (GLuint)texId1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, g_textureWidth, g_textureHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixelsdata1);
glBindTexture(GL_TEXTURE_2D, 0); //unbind tex
glBindTexture(GL_TEXTURE_2D, (GLuint)texId2);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, g_textureWidth, g_textureHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixelsdata2);
glBindTexture(GL_TEXTURE_2D, 0); //unbind tex