framebuffer

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

Render-to-texture via an offscreen framebuffer object (FBO).

Demonstrates:

  • Creating a texture to serve as a color attachment
  • Creating an FBO and attaching the texture with FramebufferTexture2D
  • Checking framebuffer completeness with CheckFramebufferStatus
  • Rendering a triangle into the FBO (offscreen)
  • Reading back pixels from the FBO with ReadPixels
  • Binding the FBO texture and sampling it in a second pass

The program performs two render passes:

  1. Render a green triangle into a 32x32 FBO texture.
  2. Bind that texture and draw a fullscreen quad onto the default framebuffer (64x64 pbuffer), effectively displaying the FBO contents.

Both passes are verified by reading back pixels.

Jump to

Keyboard shortcuts

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