Changeset 7621

Show
Ignore:
Timestamp:
12/08/07 16:04:47 (6 years ago)
Author:
robert
Message:

From Jeremy Moles, "This extra call to SDL_VideoSetMode() prevents my viewport from getting
all wonky when I resize the SDL window. I'm not sure if this bug has
always existed or not, but according to the SDL documentation this
operation should be safe regardless, and doesn't not introduce the need
for extra memory management (that is: there is no need to "cleanup" the
old screen variable, that is all handled by SDL for us).
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgviewerSDL/osgviewerSDL.cpp

    r6941 r7621  
    100100    if(linked_version->major == 1 && linked_version->minor == 2) 
    101101    { 
    102     if(linked_version->patch < 10) 
    103     { 
    104         windowWidth = 1280; 
    105         windowHeight = 1024; 
    106     } 
     102        if(linked_version->patch < 10) 
     103        { 
     104            windowWidth = 1280; 
     105            windowHeight = 1024; 
     106        } 
    107107    } 
    108108 
     
    147147 
    148148                case SDL_VIDEORESIZE: 
     149                    SDL_SetVideoMode(event.resize.w, event.resize.h, bitDepth, SDL_OPENGL | SDL_RESIZABLE); 
    149150                    gw->resized(0, 0, event.resize.w, event.resize.h ); 
    150151                    break;