Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

rendering context and textures, newbie question

This topic is 5502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i modified tutorial 6 (texture mapping) to use 3 textures, that i set up in a global array as such: const int NumTex = 3; GLuint texture[NumTex]; char *TexName[NumTex] = {"image1.bmp", "image2.bmp", "image3.bmp"}; then i wrapped the TextureImage=LoadBMP(TexName[i]) section of code in a for loop, replacing all the hard-coded 0''s with i (the for loop variable), and did the same with the free(TextureImage[i] part right after that. it all works, but when i try to quit or change full-screen/windowed, i get an error trying to release the rendering context. how are textures and rendering contexts related? do i need to specifially unload them before killing a rendering context? is it sort of like directx, where you have to reload them when the screen size changes or if gdi gets in the way? i''m not sure why a hardcoded single texture works fine, but my 3 textures would cause this error. any suggestions would be appreciated. thanks!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!