Advertisement Jump to content
Sign in to follow this  
dividbyzero

OpenGL Representing a plane in opengl

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

RE: Representing a plane using opengl api Firstly, I understand that OpenGL does not have an infinite plane primitive. Only quads, triangles, lines 'n' points. I am well aware of all that. I am converting my engine to opengl. My engine supports triangles, sphere, (infinite) planes, (infinite) lines, points etc... My infinite plane primitive is represented by: float d; vector3<float> normal; Where d is the offset from the origin, meaning that the plane equation is: P . normal = d and so on... I already have my normal, but where am I going to get my "four corner vertices" for opengl? glBegin(GL_POLYGON / GL_QUADS); glNormal3f(nx, ny, nz); glVertex3f(...); glVertex3f(...); glVertex3f(...); glVertex3f(...); glEnd(); In short, how do I calculate the 4 vertex's required for opengl. Thanks heaps peeps.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!