How do you use textures with direct state access in OpenGL?
I have the following in my code, which seems to work:
GLuint textureHandle;
glGenTextures(1, &textureHandle);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, textureHandle);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, imageW, imageH, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_data);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
However, when I replace it with the following everything just becomes black:
GLuint textureHandle;
glActiveTexture(GL_TEXTURE0);
glCreateTextures(GL_TEXTURE_2D, 1, &textureHandle);
glTextureImage2DEXT(textureHandle, GL_TEXTURE_2D, 0, GL_RGBA8, imageW, imageH, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_data);
glTextureParameteri(textureHandle, GL_TEXTURE_MIN_FILTER, GL_LINEAR);