Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


quadstrips + light normals


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 StiNKy   Members   -  Reputation: 144

Like
Likes
Like

Posted 21 June 2001 - 12:20 AM

Hi I''m currently trying to render a heightmap: for (currentY = 1; currentY <= 16; currentY++) { glBegin(GL_QUAD_STRIP); for (currentX = 1; currentX <= 16; currentX++) { glVertex3f(currentX, HeightMap[currentX][currentY-1], currentY-1); glVertex3f(currentX, HeightMap[currentX][currentY], currentY); } glEnd(); } When, how, and how often should I put in the normal''s of each of the quads that I''m drawing? I sort of understand how to do normals with single triangles, but not with quads, not to mention quad strips... Thanks in advance StiNKy

Sponsor:

#2 mittens   Moderators   -  Reputation: 1315

Like
Likes
Like

Posted 21 June 2001 - 12:32 AM

I would suggest that you just use all triangles. For two reasons, one is that you are already familiar with how to get it''s normals, and two is that its faster on some cards for all triangles.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

#3 StiNKy   Members   -  Reputation: 144

Like
Likes
Like

Posted 21 June 2001 - 01:05 AM

Thanks for your reply. But if I use quads it finds the best method in which way I connect the two tri''s that represent one block in the height map. don''t understand? nevermind
I''m only familiar with getting it for single triangles, not strips, so could you help me in how I would go about it?

#4 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 21 June 2001 - 10:00 AM

quads will give a problem with lighting when clipped.

u cant do perface normals but per vertex normals are just.
glNormal3f();
glVertex3f(currentX, HeightMap[currentX][currentY], currentY)
glNormal3f();
glVertex3f(currentX, HeightMap[currentX][currentY], currentY)

http://members.xoom.com/myBollux




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS