I figured some SDL guru's lurked around these areas...
I'm writing a... well, I fear saying 'game engine', because when I start to make stuff official, it starts to fail, but for the purposes of argument, a game engine. I'm using SDL to give me a windowing context at the current moment. Here's what I have:
void startWindow(int screenWidth, int screenHeight, int bitsPerPixel);
void SGE::startWindow(int screenWidth, int screenHeight, int bitsPerPixel)
screenWidth = SW;
screenHeight = SH;
bitsPerPixel = BPP;
// Initialize SDL
// Set the SDL Video Mode
SDL_SetVideoMode(SW, SH, BPP, SDL_OPENGL);
// Set Window Caption
SDL_WM_SetCaption("SGT Engine", NULL);
I've taken some other (nothing that could cause the problem) stuff from my posted code, but this is it for the window stuff...
int main(int argc, char *argv)
engineInstance.startWindow(20, 20, 32);
Thing is, when I run it, I just get a quick window that opens, and then it closes almost instantaneously. What is causing this sudden termination? Or, if worded wrong, what do I need to do to keep it open?
Thanks so much!