Creating 3d objects in SDL

Started by
1 comment, last by beecher 12 years, 4 months ago
I'm trying to get 3d to work with sdl openGL
How do you enable 3d on sdl openGL?

And how do I create 3d objects in sdl openGL too?
Advertisement
SDL is just used to setup the pixelformat for GL rendering. After that, OpenGL is OpenGL just like on any other system or rapper.
3D is not something that can be enabled.
I suggest that you get the OpenGL programming guide (also called the red book). You can find the old copy online for GL 1.1
Also, try the tutorials at nehe.gamedev.net
and the many others plastered all over the web.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
thanks

This topic is closed to new replies.

Advertisement