9.0 RenderDevice ignores GLight's colors

4 views
Skip to first unread message

David Schroeder

unread,
Feb 6, 2012, 8:47:48 PM2/6/12
to G3D Users
I'm trying to render a scene with colored lights and am having
troubles getting lighting to show up as anything but white. I believe
I'm using the fixed function pipeline since I'm trying to avoid
SuperShader for the moment to try to make sure this code works on as
many machines as possible.

It seems like in revision 45 ("merged shadowed and unshadowed lights,
removed tonemap") the calls to glLightfv for the diffuse components of
GLights were commented out. These calls are on line RenderDevice.cpp:
3074 in svn HEAD. I don't understand enough of G3D's internals to
know why these changes were made, so any insight that you could offer
would be greatly appreciated.

Cheers!

Morgan McGuire

unread,
Feb 6, 2012, 9:31:43 PM2/6/12
to g3d-...@googlegroups.com
You're right. I have no idea why those are commented out...it looks
like debugging stuff that was left in. I just uncommented them (and
removed the IF statements) in my own copy and am testing. I will
check in if everything seems ok.

Be warned that the fixed function will likely be removed or wrapped in
a slightly different API at some point fairly soon. It slows G3D down
a little to have to track fixed function state.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Corey Taylor

unread,
Feb 6, 2012, 9:57:56 PM2/6/12
to g3d-...@googlegroups.com
On a side note, are you planning on supporting OpenGL 3.3?  If you keep using G3D 9, it will probably change to a point where the support for your multiple card configurations deteriorates.

I might actually suggest using G3D 8 for that kind of project.  Of course, you could simple find a dev release of G3D 9 that does everything you need and then patch it as needed without upgrading to latest.

corey
Reply all
Reply to author
Forward
0 new messages