1) You have to define an array of vertices, that contain the points of your polygon lines. Like in your example: GLfloat vertices[] = { 20.0f, 150.0f, 0.0f, ... ... <看更多>
Search
Search
1) You have to define an array of vertices, that contain the points of your polygon lines. Like in your example: GLfloat vertices[] = { 20.0f, 150.0f, 0.0f, ... ... <看更多>
OpenGL's GL_QUADS primitive draws a four- sided polygon. • This quad has a clockwise winding. • All four corners of the quadrilateral must lie in a plane ... ... <看更多>
Draw concave polygon using stencil buffer, technique from: // "Drawing Filled, Concave Polygons Using the Stencil Buffer". // OpenGl Programming Guide - The ... ... <看更多>
A problem I see in your code is that you take the sizeof() an unsized array, which yields the size of the pointer to that array and not the ... ... <看更多>