PDA

View Full Version : some simple questions



blbec
10-08-2000, 02:29 AM
1) If I change from window to fullscreen, what must be done? Do I need a new rendering context, do I have to deactivate the current or what?

2) How do I turn on textures? I have loaded some textures, I draw polygons with texture coordinates, I have called glGenTextures,glBindTexture,glTexImage2d (in this order), but nothing happens, the polygons are colored, but without textures.

Bob
10-08-2000, 07:38 AM
1: Not sure if you HAVE to create a new context, but it's good to do it. If you change color resolution and/or depth bits, some problems might occur, not sure though. Better to be on the safe side.

2: You need to glEnable(GL_TEXTURE_2D); before texture mapping is used.

blbec
10-08-2000, 07:49 AM
Thanks a lot, now everything works. http://www.opengl.org/discussion_boards/ubb/smile.gif

10-08-2000, 07:56 PM
"If I change from window to fullscreen, what must be done? Do I need a new rendering context, do I have to deactivate the current or what?"


Like bob said you'd better create a new one.
I also wanted to say that you should reload all textures when going fullsreen/back2window.