Macaw OS C reference

Module Baked reflections

#include <macawgpu.h>

A cube map is six views from one place, drawn once, that water can reflect instead of a picture drawn again every frame. Cube maps are numbers, like buffers.

Functions

gpu_envmap
Makes a cube map from six square pictures.
gpu_envmapbytes
Makes a cube map again from the bytes gpu_envpixels gave you, such as ones you saved in a file.
gpu_envloaded
Tells you whether all six faces of a cube map are on the graphics card yet.
gpu_envunload
Takes a cube map off the graphics card to save its memory.
gpu_envpixels
Copies a cube map's six faces out as bytes, so you can save them and make it again with gpu_envmapbytes.
gpu_freeenvmap
Lets go of a cube map you've finished with.