Hi everybody,
I've been needing to produce non-realtime high quality output from
OpenGL programs I've already written. As a result, I'm adding Phong shading to
Mesa. I'd like to do this right, though, so that it can be a standard part of
the distribution. Granted, it won't fit into the standard OpenGL architecture,
but I think it would be worth having =).
Anyway, here's my plans. Please let me know if anything is off so I
can do this right the first time:
o Define GL_PHONG in gl.h as 0x1D02. Currently unused, immediately
precedes GL_SMOOTH.
o Add a couple new triangle funcs in triangle.c to handle Phong
shading. One for RGBA, possibly more (like index, etc).
o Use true floating point numbers, etc, to get highest quality.
Here's my current development platform:
o Mesa 3.0 (public release).
o RH 6.1 and gcc, Windows and VC 6.
Am I headed in the right direction, or can anyone steer my otherwise? The one
problem I can forsee is that, if I understood the code correctly, lighting is
computed for all the vertices before the triangle func is called. Will I, from
my triangle func, have access to everything necessary to calculate lighting on
a per-pixel basis?
Thanks!
Jonathan Dinerstein
[EMAIL PROTECTED]
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev