when does glTexImage2D, gluBuild2DMipmaps (and other OpenGL texture functions) cause access violation? If the code is something like this:
gluBuild2DMipmaps params are correct (including address to pixels), and OpenGL is setup correctly.Code:glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); gluBuild2DMipmaps(GL_TEXTURE_2D, format, image.getWidth(), image.getHeight(), format, GL_UNSIGNED_BYTE, image.getData()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
The image is a normal 24bit image.
Any ideas?
PS: I searched Google and MSDN, nothing applies to my case :/



LinkBack URL
About LinkBacks


