Jump to content
  • Advertisement


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


only render one edge of QUAD

This topic is 5581 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

Well maybe not only render one edge but make only one edge visible... I have my terrain rendered using quads... Some quads I want to have a line rendered through it...like so
          |                |
  edge3   ep\              |  edge1
          |  \----\        |
          |        \-------ep
          |                |
0, 1, 2, 3 are vertices of the original quad...ep are edge points
that help produce 2 new quads by splitting the original...

Now I only want to see the line between edge3.ep and edge1.ep

So Im rendering 2 quads now... vert 2,3, edge3.ep and edge1.ep
vert 0, 1, edge1.ep, edge3.ep...

During rendering of quad I make verts 0, 1, 2, and 3 have 0.0f alpha color values and verts edge3.ep and edge1.ep alpha color values 1.0f...
at first I thought this would work fine, but OpenGL gradually interpolates the opacity between the ep edge and the original vert edges...

Does anyone have a clue as to how I could only render the line between edge1.ep and edge3.ep?


Share this post

Link to post
Share on other sites

glVertex3f(edge1.ep.x, edge1.ep.y, edge1.ep.z);
glVertex3f(edge2.ep.x, edge2.ep.y, edge2.ep.z);

either the rest of you were sleeping, or I didn't
quite make the question as clear as it could have
been... anyway...taking breaks helps solve problems
for sure!


[edited by - dnagcat on July 6, 2003 2:04:31 AM]

Share this post

Link to post
Share on other sites
Even though you''ve answered your own question, you may want to use degerated quads, rather then using lines.

Just render the quad

(ep, ep)
(ep1, ep1)
(ep1, ep1)
(ep1, ep1)

It will help you when you try to use display lists, because you won''t have to switch contexts to render lines, you can render lines in the same list...

SNOBOL-If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the right foot.
Download and play Slime King I.

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!