Original Post
Hello. I''m having a problem with glTexImage2D(). It doesn''t seem to be generating the texture like you''d expect. I''m passing it an 8*8 4 channel image, but when I use the texture, it just comes out white (or untextured). gluBuild2DMipmaps() works properly, though...
ie:
glBindTexture(GL_TEXTURE_2D, tex);
gluBuild2DMipmaps(GL_TEXTURE_2D, 4, _width, _height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); //this works
glBindTexture(GL_TEXTURE_2D, tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer); //this doesn''t
I want to use glTexImage2D() because it is *much* faster and I''m not using the mipmaps from that texture anyway... I''m also not getting any errors from OpenGL (via glGetError()).
Any suggestions?