How to Draw a Plane in Opengl

OpenGL Examples

Here are some OpenGL example programs, presented in an lodge in which new topics are added in each successive example. Many of these are modifications of programs in the OpenGL Carmine Volume.

Triangle

  • Introductory program; only a static picture of a colored triangle.
  • Shows how to use GLUT.
  • Has minimal structure: only main() and a display callback.
  • Uses only the default viewing parameters (in fact, it never mentions viewing at all). This is an orthographic view volume with premises of -i..1 in all three dimensions.
  • Draws only using glColor and glVertex within glBegin and glEnd in the display callback.
  • Uses only the GL_POLYGON drawing mode.
  • Illustrates glClear and glFlush.

triangle.cpp

// A simple introductory program; its main window contains a static picture // of a triangle, whose iii vertices are red, green and blue.  The program // illustrates viewing with default viewing parameters just.  #ifdef __APPLE_CC__ #include <GLUT/overabundance.h> #else #include <GL/glut.h> 

0 Response to "How to Draw a Plane in Opengl"

Publicar un comentario

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel