Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL Not Displaying

Started by TheUltim Jul 4, 2007 at 5:23 PM 1 replies 900+ views
Original Post
TheUltim
TheUltim
Hi, I'm writing a game that is spread out across header files and implementation files. Currently it has a menu screen (handled by one header-implementation pair) and a gameplay mode (handled by another). SDL setup functions, keyboard event handling functions and the functions to display things on screen (SDL_BlitSurface, SDL_FillRect, etc.) are located in a base class, which the menu and gameplay classes inherit from. For some reason, the SDL initialization and SDL keyboard handling functions work properly, but the display functions do not. Just a black screen comes up, and nothing draws at any point during runtime. Absolutely no compiler errors are found, everything runs, no unexpected shutdowns. In my menu, "Exit" is the last option, and if i hit the down arrow a bunch of times then press enter, the program does exit, so other SDL features are working (SDL_GetKeystate and events). It's just for some strange reason nothing but this black screen opens. Has anybody ever heard of anything like this? If anyone's interested in attempting, i can post my code too; i realize it's hard to troubleshoot without the code but i don't want to unnecessarily spam up your space either.
AfroFire
AfroFire
SDL_Flip(screen_surface_here);

AfroFire | Brin"The only thing that interferes with my learning is my education."-Albert Einstein
TheUltim
TheUltim
Hahahah... i did NOT just forget that line. Oh, what a fool i am. Thank you very much.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.