Level editor == the OpenGL pain

The level editor has taken up most of the afternoon today because of a couple of hitches. Mostly, I was stuck for about an hour trying to figure out why my objects weren't being lit correctly in the glOrtho view. I ended up with a piece of test code that rendered a glutSolidSphere and then called a display list that also rendered a glutSolidSphere (same params, nothing else in the display list) and the second sphere was rendered unlit.

I still don't know why. My level editor now has the map portion drawn using a perspective view. It just means the picking is a little harder, but thanks to gluUnProject (and a little tweaking) I can get pretty accurate coords - enough to place map objects anyway.

Next up will be saving maps and enforcing a grid. Then I'll go back to working on more game code. Still plenty to do there...

I'm using Alex's text-rendering library PyGlyph to do the text in the buttons, if anyone's interested. It apparently has better layout than pygame.font.

The latest version of the game is bouncy-r3.

richard on 2006/09/04 08:31 of Bouncy the Hungry Rabbit


Comments: (log in to comment)

a display list stores only the GL function calls, and glut may implement some other functionality that is not saved in the display list.
if you are really interested, i might suggest checking out the glutSolidSphere code.
It was happening for my regular display list objects too (GL_QUADS with normals) -- the glutSolidSphere was just a test object.
bad driver? :\
*shrug* I reverted back to using ortho again after not being able to work perspective well enough, and lighting worked. No idea what changed.
Am I the only one who doesn't want a White Dress?
Am I the only one who doesn't want a White Dress?