Advertisement

rendering context and textures, newbie question

Started by April 29, 2003 05:01 PM
-1 comments, last by goohead 21 years, 10 months ago
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) 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 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! </i>

This topic is closed to new replies.

Advertisement