Shadow Mapping, minus the GLUT

Recently I have been working on shadow mapping, and have found some(what look like) good tutorials.
However, they all are in C++ and they all use GLUT.

It looks like they need this line:

glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH);

If I understand it correctly, I shouldn’t need to worry about the first 3 modes,
But I am guessing I need either a render buffer, or some sort of pixel format in display.create() to replace the fourth mode. Or am I wrong, and I don’t need that at all? ::slight_smile:

Any help is greatly appreciated.

~OpenGLShaders

Assuming that you’re using LWJGL, the Display class is basically the ‘GLUT’ of Java. Display.create() creates a double buffered OpenGL context with a 24-bit color buffer and an 8-bit depth buffer, so you don’t need to worry about any GLUT stuff at all.

Wow, I feel stupid :slight_smile: Thanks for your help

Display, Keyboard, and Mouse make up the GLUT replacements. Note that none of it is event-based like GLUT, you have to poll for input and window events, so any C++ code using the callbacks will have to be switched around a bit.

GLUT also defines some geometry primitives, including the iconic teapot, but those are very old-school and don’t fit in modern opengl. If you’re really jonesing for a teapot, I did get around to porting the one in JOGL, but I’d recommend going with a VBO version of the teapot and working with that instead.

Ok, but first I have to make the shadows :smiley:
I don’t know what, but they aren’t drawing.
Maybe something with my matrices. :frowning:

You need an FBO (or the deprecated PBO) to do shadow mapping.