Login  Register

Re: How to add colors or normals to custom object?

Posted by gouessej on Feb 23, 2015; 2:50pm
URL: https://forum.jogamp.org/How-to-add-colors-or-normals-to-custom-object-tp4034048p4034059.html

You don't really understand what you do, you mix some methods of the fixed pipeline with some methods of the programmable pipeline. Using VAOs with glNormalPointer is nonsensical.

A normal should be normalized, i.e its norm should be equal to one. "google" doesn't have the answers to all questions. "For a convex polygon (such as a triangle), a surface normal can be calculated as the vector cross product of two (non-parallel) edges of the polygon" (see Wikipedia: https://en.wikipedia.org/wiki/Normal_%28geometry%29).
Julien Gouesse | Personal blog | Website