I'm currently trying to figure out how to use OpenGL. I want to create a texture from a byte buffer.
For some reason, when I do it with glTexImage2D, it does not work (the texture comes out blank):
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texwidth, texheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, bytes ); When I use gluBuild2DMipmaps it does work:
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, texwidth, texheight, GL_RGBA, GL_UNSIGNED_BYTE, bytes ); What is the difference between the two, and what am I doing wrong?
GL_INVALID_OPERATION?