Hello all,
My question is, when using Visual Studio, and compiling this piece of code:
int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
SDL_WM_SetCaption("OpenGL Awesomeness", NULL);
//run time error here
SDL_Event event;
while(event.type != SDL_QUIT)
{
SDL_PollEvent(&event);
RenderScene();
SetupRC();
SDL_GL_SwapBuffers();
SDL_Delay(60);
}
SDL_Quit();
return 0;
}
I get a runtime error saying that I'm using a variable that is being used and not initialized. I know that SDL_Events cannot be initialized, and am wondering how to fix this problem. I have before, but the soultion has currently escaped me. Thank you for your help in advance,
~Asian