Documentation
¶
Overview ¶
Hello Triangle: the classic first OpenGL ES 2.0 program.
Demonstrates:
- Compiling a vertex shader and a fragment shader
- Linking them into a program
- Uploading triangle vertex data into a VBO
- Setting up vertex attribute pointers
- Drawing with DrawArrays
- Reading back pixels to verify the triangle was rasterized
The triangle covers the center of a 64x64 pbuffer. After rendering, the program reads back the center pixel (which should be inside the triangle) and a corner pixel (which should be the clear color) to confirm correctness.
Click to show internal directories.
Click to hide internal directories.