Do you have to reload your textures in fullscreen?

Started by
7 comments, last by Viscous-Flow 22 years, 5 months ago
Hello, Is it necessary to reload your textures each time you switch to and from fullscreen and windowed mode using the Windows API? Is there a better way to somehow save you rendering context, device context, and OpenGL values you have enabled? Does OpenGL have a function to do a procedure such as this? It just seems that reloading your textures every time can be rather inefficient, especially if you are loading a large 32/24 bit image. Also, how many people actually use fullscreen/windowed mode in their demos/games? Any suggestions? Thanks! Edited by - Viscous-Flow on October 28, 2001 1:38:47 PM
Advertisement
You dont have to reload textures, when switching modes in OGL.
How exactly does this work ANSI?

I mean when you switch modes you essentially have to delete your rendering and device contexts in order to get rid of the old window and make the new one right?

So since the contexts are destroyed you have lost all the information regarding you images in relation to OpenGL (i.e. mipmap, detail, type, etc.).

And since it is not rather efficient to keep all your textures in memory if you only use them when switching modes you free the memory they were taking up on the heap.

So doesn''t that mean you have to reload your textures each time when switching modes to reload their OpenGL properties? I know NeHe''s tutorials do exactly that.

Do you know of a way to get around having to reload the textures each time?
I think it has something to do with wglCreateContext. Unfortunately, any and all OGL help has apparently departed from MSDN online (there''s a surprise), so you''ll need to check other sources (if you''ve got your own copy of the MSDN with OGL topics, that''d do great.)

''Nuff said. I''ll enjoy watching you live, demon.
CoV
My code switches from Windowed to Full Screen, etc, etc. I call InitGL each time the window is re-created (aka, when switching from full screen to windowed)... so it''s a pain in the arse. ANSI2000.. if you know a better way, let me know, or am I loading the textures into memory more than once everytime I switch modes?

Billy
Thanks, I''ll look into wglCreateContext().
MSDN Online does support all the wgl functions. There are lots of them. Other OpenGL stuff I know it doesn''t have much information about though. I guess they like the wgl stuff since it is Windo$e $pecific.

The one I think will work is wglCopyContext().

Thanks!
Maybe am wrong. Look at all the nehe examples they switch between full and windowed. It was kinda late and I was thinking of Nehe so the answer was simple for me
If you''re switching between fullscreen and windowed by destroying the window and the rendering context, then recreating everything then you''re gonna lose everything in VRAM. If you don''t want to have to reload everything then just hide the window, switch to fullscreen or windowed, change the window style, then show the window again.

------------
- outRider -

This topic is closed to new replies.

Advertisement