Using OpenGL in immediate mode

We will start with the most basic approach that's called immediate mode. In this mode, no additional setup of OpenGL buffers or shaders is required. You can just supply a bunch of geometric primitives and get the result right away. Immediate mode is now deprecated because it works much slower and is less flexible than more advanced techniques. However, it's so much easier than them that basically every OpenGL tutorial starts with describing the immediate mode calls. In this section, we'll show how to perform some simple OpenGL drawing with very little code. A more modern approach will be covered in the next section of this chapter.

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.