Introduction

This sample demonstrates the concept of "immediate mode" rendering, which was introduced in OpenGL 1.0.

Immediate mode is the simplest way to render geometry in OpenGL. It is also the slowest by far, which makes it unsuitable for applications concerned about performance.

Please note that immediate mode rendering is no longer supported in OpenGL 3.1 or higher.

Controls

Press Esc or click the close button to exit.

Implementation

Immediate mode rendering takes place within a GL.Begin()-GL.End() region. GL.Begin() takes a BeginMode parameter than marks the kind of primitives to emit (points, lines, triangles, quads); GL.Vertex, GL.Normal, GL.Color, GL.TexCoords emit the specified vertex attribute; GL.End() marks the end of the immediate mode region.

See http://www.opentk.com/doc/chapter/2/opengl/geometry/primitives for more information on geometric primitives.

The DrawCube method shows how to render a simple, colored cube using immediate mode.