J0ey4
04-13-2001, 10:20 AM
Hi,
I just started fooling around with texure mapping yesterday following the directions in the Superbible, and I had no problem implementing a function to read in .bmp's, define them as the current texture, and then drawing a texture mapped object.
However when I attempted to use texture objects so as not to have to constantly redefine the current texture I can't get the textures to work.
I know that my .bmp loading and texture object generating functions work because I plopped them into the example code given with the superbible and it still worked, which means that I am properly generating a texture object.
If that's the case then all I should have to do is call
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);
and then render away, but it's not working.
I don't create my texture objects until after window creation so I have on clue why they won't work rendering for me but they will in Micheal Sweet's code.
thanks in advance for all your help,
J0ey4
I just started fooling around with texure mapping yesterday following the directions in the Superbible, and I had no problem implementing a function to read in .bmp's, define them as the current texture, and then drawing a texture mapped object.
However when I attempted to use texture objects so as not to have to constantly redefine the current texture I can't get the textures to work.
I know that my .bmp loading and texture object generating functions work because I plopped them into the example code given with the superbible and it still worked, which means that I am properly generating a texture object.
If that's the case then all I should have to do is call
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);
and then render away, but it's not working.
I don't create my texture objects until after window creation so I have on clue why they won't work rendering for me but they will in Micheal Sweet's code.
thanks in advance for all your help,
J0ey4