Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-02-2010, 01:29 AM   #2 (permalink)
warmi
Registered Member
 
Join Date: Nov 2008
Posts: 234
Default

Quote:
Originally Posted by flamingliquid View Post
Ok, so I am just trying to teach myself OpenGL ES, and have a couple of roadblocks. They seem so simple, yet so difficult at the same time. One of which has to do with Normals.

I have a GLfloat array of vertices created from an OBJ file. In order for the lighting to work, I need normals.

How can I calculate normals based on the array of GLfloats?

Thanks.
You can't.

You can only calculate normals for triangles which means you will have to know which of these floats are connected together to form triangles ( normally you would get that from indices)

Once you have your triangle data you can just simple look it up on the net.

Calculate the normal of a triangle with three vertices - XNA Community Forums
warmi is offline   Reply With Quote
 

» Advertisements
» Online Users: 270
19 members and 251 guests
ADY, apatsufas, BdR, ckgni, F_Bryant, jakerocheleau, joeallenpro, ketaskin, MarkC, michelle, Music Man, NSeven, smethorst, Sunny46, themathminister, TheWebWizz, V_SC&, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,710
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:15 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.