[HOpenGL] Convex polygons

Rafael Cunha de Almeida almeidaraf at gmail.com
Sun Mar 22 17:27:21 EDT 2009


I'm reading the red book and it says opengl cannot render convex
polygons. Yet, when I compile this code:
    renderPrimitive Polygon $ do
        vertex $ Vertex2 0 (0::GLfloat)
        vertex $ Vertex2 0 (3::GLfloat)
        vertex $ Vertex2 4 (3::GLfloat)
        vertex $ Vertex2 3 (1.5::GLfloat)
        vertex $ Vertex2 4 (0::GLfloat)
The convex polygon is displayed correctly. Does hopengl do something
behind the scenes or I just "lucked" out that my opengl/hardware can
handle this particular convex polygon case?


More information about the HOpenGL mailing list