firstly - is there a quick way to render a scene in the back buffer and then tint the whole scene as if looking through a color filter??
secondly - when creating objects you need to define the normals for lighting. What's the easiest way to do this?
Thanks, just starting to learn opengl if ya can't tell...
12-11-2001, 05:29 PM
nothing comes to mind for the first one, you could always try drawing a big transluscent quad or playing with the color mask
as for the second question, normals I will give a quick explanation, but look into the previous posts on this forum, normal calculation is a really common question.
Basically you have 3 points that make up a triangle, call them A,B and C Now, from these you can create several vectors that make up the triangle, i.e. A-B, A-C etc
pick two, A-B and A-C work well, but depending on the winding of the vertices you might have to fool around. Take the cross-product of these two vectors (check any pre-calc book), thats the normal of the triangle. In order to find the normal of each vertex, figure out which faces each vertex is a part of and average them
hope this helps
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.