Representing a plane in opengl

Started by
0 comments, last by blizzard999 18 years, 7 months ago
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.
Advertisement
here

This topic is closed to new replies.

Advertisement