Documentation
¶
Overview ¶
Textured quad: upload pixel data to a texture and render it on a quad.
Demonstrates:
- Creating and configuring a GL texture (GenTextures, BindTexture, TexParameteri, TexImage2D)
- Using texture coordinates in shaders to sample from the texture
- Drawing a quad as two triangles via an element buffer (DrawElements)
- Reading back pixels to verify texture sampling
A 2x2 checkerboard texture (red/green/blue/white) is created from raw pixel data and mapped onto a fullscreen quad. The program reads back the four quadrant centers to verify correct texturing.
Click to show internal directories.
Click to hide internal directories.