SDL surface not showing
Jul 29, 2011 at 2:40pm UTC
The previous state's render function works perfectly, so i dont know why this state wont draw the image. Here is the render function for this state
1 2 3 4 5 6 7
void Menu::Render()
{
graphics->ClearScreen(255, 255 ,255);
graphics->ApplySurface( 0, 0, menuBG, graphics->screen );
graphics->UpdateScreen();
}
Jul 29, 2011 at 3:54pm UTC
Okay i figured out that menuBG is null when it the program gets to the render function.
This makes no sense though, because Menu's constructor looks like this
1 2 3 4 5 6
Menu::Menu( Environment* GameEnvironment )
{
graphics = GameEnvironment->graphics;
menuBG = graphics->LoadImage( "menuBG.bmp" );
}
Jul 29, 2011 at 4:02pm UTC
Lol okay if i take menuBG out of the Media folder and put it in the same place as all my cpp's and header files, it works. But if i put menuBG back in the folder it doesnt show up. Why is that?
Jul 29, 2011 at 4:04pm UTC
NVM i got it lol
Topic archived. No new replies allowed.