Advertisement

12.21.2006 at 02:14PM PST, ID: 22101099
[x]
Attachment Details

glDrawElements and lighting

Asked by vadim85 in 3D Game Programming

Tags: gldrawelements

Hi,
I use glDrawElements to render simple box.
So I defined :
glEnableClientState caVertexArray
glVertexPointer ....

But it looks like the lighting doesn't work properly for that object.

Do I have to define Normals array??
I use quads to render box.
Have I define normal for each face, or for each vertex? Do I need to break Quad to 2 triangles?


Thank you.Start Free Trial
[+][-]12.22.2006 at 06:15AM PST, ID: 18186924

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.23.2006 at 03:44PM PST, ID: 18192987

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.07.2007 at 09:05AM PST, ID: 18486481

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: 3D Game Programming
Tags: gldrawelements
Sign Up Now!
Solution Provided By: thegilb
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.08.2007 at 10:36AM PST, ID: 18681358

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.13.2007 at 08:02PM PDT, ID: 18715726

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32