Originally Posted by
Bubba
You need about 50 lines of Win32 to get DX up and running and thats it. I don't see the problem.
There's your problem - this book covers OpenGL. At the most, SDL might take one-third the lines that Win32 takes. Also it is far simpler.
Code:
if (SDL_Init(SDL_INIT_VIDEO) < 0) { return 0; }
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
if (SDL_SetVideoMode(640, 480, 32, SDL_OPENGL) == 0) { return 0; }
When you're ready to present the rendered results to the screen:
Code:
SDL_GL_SwapBuffers();