I think I've figured out what's going on. Since Polycode currently assumes we've got a legacy OpenGL pipeline around, it uses things such as glPushMatrix(), glMatrixMode(), etc... All this stuff is gone when using the OpenGL core 3.2 profile, which I am using so that I have access to geometry shaders.
I'd like to modify Polycode to store matrices as uniforms for use by the shaders, but there are a few things I need to know first:
1) If I don't apply any shaders to anything, what are the defaults? With Polycode as it is now, using the legacy opengl mode, I can just push some vertices onto the GPU, call them triangles and opengl will shade them according to the color passed in via the color buffer. With 3.2, I'm assuming this has changed, since there is no way to automatically give it the model, view and projection matrices. It assumes that we will have shaders to do the work for us. Is OpenGL 3.2+ setup in such a way that it just doesn't do anything without shader programs loaded in?
2) How should I be uploading these matrices? I suppose Polycode could offer automatic uniforms to shaders, (Although we can't use "gl_" prefixed names) so I could just have Polycode automatically upload "modelViewProjection" uniforms, etc... Is this the right way to do this?
3) I notice that we've got functions such as setProjectionFromFOV() and friends in PolyGLRenderer.cpp, where these matrices are being changed. I suppose I would just find instances of glPushMatrix() and glMatrixMode() and store the matrices being edited/changed as instance variables instead of calling those functions. Then in BeginRender(), I would upload them to the GPU, so that shaders can take advantage of them?
4) If this work eventually gets merged back into mainline, I'm assuming you'd want options on all of this. Things like a flag to request a core 3.2 profile instead of a legacy profile on OSX, which then creates a PolyGLCoreRenderer instead of a PolyGLRenderer. Am I right?
Thanks for your help!
-E