Trying to texture a quadric sphere..
Alright I have figured out a lot of mistakes but now I have a problem getting the
glTexImage2D function to work.. I load a bitmap using LoadImage and then get the data using
GetObject(pbitmap, sizeof(BITMAP), (LPSTR)&bmp);
I don't know how to set the internal format, type, and format of the glTexImage2D call to get it to work. I am getting no errors but it just puts a black screen up. If I comment out the call I get my quadric sphere, untextured of course.
I am calling it as follows:
[This message has been edited by delic (edited 10-06-2002).]
Re: Trying to texture a quadric sphere..
All I can think of is that you image does not have height and width as a power of two (1, 2, 4, 8, 16 ...) and/or you don't change the default minification filtering to a non-mipmap filter (GL_LINEAR or GL_NEAREST), since default minification filter requires a complete mipmap chain.
I also suggest you remove the '8' in the internal format. That way you let the driver choose the internal format, and I'm sure it will do a better job finding the proper format for the texture.