fungus wrote:
> The "right" way is to calculate the lighting yourself, either
> on the main CPU or in a vertex shader.
>
> OpenGL lighting was never designed for anything more than
> simple jobs (as you're finding out....)
I should point out, that while OpenGL's default fixed pipeline
offers only a simple Gouraud lighting model, it is perfectly
possible to replace that with any lighting model you like by
applying a custom shader. The nice thing is, that you can use
the OpenGL state machine variables (i.e. the stuff you set with
glLight<fd>[v](...)) as control parameters for the shader.
So you can replace the whole lighting model of an existing
application by merely uploading some shader code upon
initialisation.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@[EMAIL PROTECTED]
ICQ: 134682867


|