Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

StiNKy

quadstrips + light normals

This topic is 6300 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!