Thread: Reloading textures after an alt-tab

  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,071
    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).
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  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, 08: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, 04:30 PM
  4. code for Alt + Tab keys
    By Sumir in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2002, 03:49 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM