[Super-tux-devel] OpenGL fix
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-05-04 11:58:15
|
Hey there, I ask for those that have OpenGL problems (looking at Keir Lawson) to try to do this: replace all 'screen->w' and 'screen->h' by 'SCREEN_W' and 'SCREEN_H', respectively (and without the ' ). I'm not sure if there is a command line to do this, but you can detect the files that use those, by running: grep 'screen->w' * And then, just make use of a text editor to replace them. Maybe Kate allows you to do replacements in multiple files... Just one thing, you could also try to print the screen->w and screen->h values in the st_video_setup_gl() on setup.cpp . For those that are wondering "Why the hell does that replacement will fix the OpenGL problem?". Here goes the answer: When asking for SDL to setup the video mode, the SDL returns a SDL_Surface structure that contains a few info about the screen and even allows pixel manipulation (in SDL mode). But in case, you ask SDL for an OpenGL video mode, there are a lot of variables that are not reliable and that can include the display's width and height. Cheers, Ricardo Cruz -- Don't I know you? |