PDA

View Full Version : Question about normals



ReneMiner
31-10-2012, 21:15
Question about this:

I saw that if a poly-list gets created (TBGL_BeginPoly), the Colors (TBGL_COLOR) has to be set before the Vertex-Position is passed.
Is it the same way with Normals?

Are the TBGL_Normal-values that appear before TBGL_Vertex set to all following vertices until a new TBGL_Normal is given? Even if the list is done and the next list gets created? Is it the same way with TBGL_TexCoord2D? Are they re-used as long as no other value is passed?

EDIT: In the meantime I found out- it is that way, vertex positions last and everything is fine. Everything gets repeated until some new setting gets applied.
-done-

Petr Schreiber
02-11-2012, 21:12
TBGL is based on OpenGL, which works like state machine - you set something, and it is applied till you change it to something else.
So yes, even the normals work this way.

TBGL recently introduced new functionalities going around the state oriented design, which is not always the best solution for modular code.


Petr