Skip to content

Latest commit

 

History

History
75 lines (61 loc) · 4.41 KB

File metadata and controls

75 lines (61 loc) · 4.41 KB

🚧 WORK IN PROGRESS 🚧

OpenGL Programming Guide

Modern Examples

Even though newer API like Vulkan exist, it is almost impossible to understand without learning the fundamentals of graphics with OpenGL first

The Red Book is a great guide to learning OpenGL. Unfortunately many tutorials/guides in this book are written >10 year ago and are either obtuse, dont compile, or wrapped in a macro spaghetti using the authors framework called Vermillion.

This repository attempts to simplify the old code so that it can be followed by newer readers.

This version of the code:

  • Fix examples in the code to match the book
  • Uses modern C++ where possible to improve readability
  • Tries to reduce the use of Macros
  • Cmake and GLFW 3.4
  • Uses GLAD with 4.6 CORE + ARB extensions
  • Uses newer OpenGL concepts such as Direct State Access

Building

mkdir build && cd build 
cmake .. 
cmake --build .

🚧 Not All Examples Are Correct 🚧

Example Screenshot
Keypress Keypress
Triangles Triangles
Draw Commands Draw Commands
Instancing Instancing
Instancing 2 Instancing 2
Instancing 3 Instancing 3
Point Sprites Point Sprites
Primitive Restart Primitive Restart
Xfb (transform feedback) Transform Feedback
Gouraud Gouraud
Gouraud Float Gouraud
Shadow Map Shadow Map
Cubemap Cubemap
Load texture Load texture
Mip Filters Mip Filters
MipMap ---
MultiTexture MultiTexture
Static Texture Static Texture
Texture Wrapping Volume Wrapping
Volume Texturing Volume Texturing
LightModels LightModels
Simple Tess SimpleTess
Draw XFB Draw XFB
Fur Fur
Viewport Array Viewport Array
DoubleWrite DoubleWrite
OIT (order independent transparency) OIT
Overdraw Count Overdraw Count
Image Processing Image Processing
Particle Simulator Particle Simulator
Raytracer Raytracer
Simplecompute SimpleCompute

Credits

Original code for the OpenGL Programming Guide, 9th Edition The Official Guide to Learning Opengl 4.5 with SPIR-V (Red Book) who's can be found here