   glSecondaryColor inside glBegin not working
  Hello.  I am implementing per-vertex specular lighting for water, but I need can't seem to get glSecondaryColor to work inside glBegin and glEnd.  It only works if I place it outside.  It works in this ati demo hereAny ideas how to fix it?   
Quote:Original post by ErkokiteHello.  I am implementing per-vertex specular lighting for water, but I need can't seem to get glSecondaryColor to work inside glBegin and glEnd.  It only works if I place it outside.  It works in this ati demo hereAny ideas how to fix it?Here is the spec for the extension.The spec says it CAN be used inside the blocks.  Therefore, something is almost certainly wrong with your code.You said it "works" if you reorder the functions.  That's a big warning sign of other flaws. You probably have other errors that you are confusing with this one.  Check for errors with glGetError() at various places to help find the other errors. frob.   ;Quote:Original post by frobYou said it "works" if you reorder the functions.  That's a big warning sign of other flaws. You probably have other errors that you are confusing with this one.  Check for errors with glGetError() at various places to help find the other errors. frob.Like frob said, if order corrects the error it probably indicates other flaws.  One thing you'll want to take careful note of is your enables/disables.   