Reloading textures after an alt-tab

This is a discussion on Reloading textures after an alt-tab within the Game Programming forums, part of the General Programming Boards category; Okies I've got my renderer cache setup to reload everything (everything being only textures right now) whenever the window gains ...

  1. #1
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709

    Reloading textures after an alt-tab

    Okies I've got my renderer cache setup to reload everything (everything being only textures right now) whenever the window gains focus from having lost it (i.e. this doesn't happen when the window is first created).

    Do I need to do this every time, or just when I've lost a texture? If only when I've lost one, how do I tell?

    I'm using SDL/OpenGL.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    You'll always lose the textures (and shaders, and VBOs) after an alt-tab, so you do pretty much need to reload them each time you regain focus (or in any situation where the GL context is reset for that matter).
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

  3. #3
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Okies, thanks for replying
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reloading textures
    By zacs7 in forum Game Programming
    Replies: 7
    Last Post: 07-04-2008, 09:59 AM
  2. D3DX - ALT + TAB / Drawing stuff
    By Tonto in forum Game Programming
    Replies: 8
    Last Post: 10-31-2006, 09:04 PM
  3. Visual C++
    By Golffor1 in forum C++ Programming
    Replies: 1
    Last Post: 08-04-2003, 05:30 PM
  4. code for Alt + Tab keys
    By Sumir in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2002, 04:49 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21