Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Texture Problem When Switching Modes...

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Raleigh, NC, USA
    Posts
    100

    Texture Problem When Switching Modes...

    I've discovered a minor bug in my game engine that I need to fix. Apparently, whenever I switch from windowed to fullscreen or vice-versa, texturing stops working. All of my polygons are solid white. If I start windowed and go full, full is messed up but switching back to windowed works fine. The same can be said for starting full.

    I don't know if it matters, but textures only seem to load if I call the LoadTextures() function from within InitGL(). Why can I not call it once at the end of the level loading function, and then have it work?
    -Sephiroth

  2. #2
    Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    391

    Re: Texture Problem When Switching Modes...

    When your program switches from windowed to full, it destroys the rendering context. When this happens your textures vanish as well

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Raleigh, NC, USA
    Posts
    100

    Re: Texture Problem When Switching Modes...

    OK, so I have to re-load all textures after each mode change. Now, any idea why I can load textures ONLY during OpenGL initialization and not when the level is done loading?

    Also, is there a way I need to free texture memory? I never have before, but I am curious. If I need to free the texture memory, I'll do it when switching modes and at app exit.
    -Sephiroth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •