2D Drawing Lines And Polygons
Drawing Commands
- GL_POINTS //Unconnected
- GL_LINES // Unconnected
- GL_LINE_STRIP // Connected
- GL_POLYGON // Closed
- GL_TRIANGLES // Separate
- GL_TRIANGLE_STRIP // Joined
- GL_TRIANGLE_FAN // Joined all connected at p0
- GL_QUADS // Separate
- GL_QUAD_STRIP // Joined
- GL_LINE // Sets drawing method to outline
- GL_FILL //Sets drawing method to fill
- GL_FRONT_AND_BACK vs GL_FRONT vs GL_BACK // Which faces get drawn
Enable Options
- GL_BLEND // Blending alpha values
- GL_LIGHTING // Enable lighting as a whole
- GL_LIGHT0 // Enable an individual light (can do this for LIGHT1, etc up to at least LIGHT7)
- GL_LINE_SMOOTH
- GL_NORMALIZE // Turns on auto-normalisation of normals
- GL_MULTISAMPLE
- GL_POLYGON_OFFSET_(POINT|LINE|FILL) // enable offsetting to prevent z fighting
- GL_TEXTURE_2D // Allows use of textures
Camera
- GL_PROJECTION //Pyramid (foreshortening)
- GL_ORTHOGRAPHIC //Rectangular Prism
Lights
- GL_POSITION // Sets the position of the lights ource
- GL_AMBIENT/GL_SPECULAR/GL_DIFFUSE/GL_SHININESS // Sets the light/material type
- GL_LIGHT_MODEL_AMBIENT // Sets the global ambient data
- GL_SPOT_CUTOFF // Says that we’re setting the angle for the spotlight
- GL_SPOT_EXPONENT // Says that we’re setting the brightness
- GL_SPOT_DIRECTION // Says that we’re setting the direction vector
- GL_CONSTANT_ATTENUATION/GL_LINEAR_ATTENUATION/GL_QUADRATIC_ATTENUATION // Each factors in the attenuation equation (by default there is no attenuation in OpenGL - setting these 3 things changes that)
Textures
page revision: 3, last edited: 13 Aug 2014 04:35