texture

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL