Function gpu_envmap
#include <macawgpu.h>int gpu_envmap(
const int *faces,
double x,
double y,
double z,
const double *box
);
Makes a cube map from six square pictures. It goes onto the graphics card a face a frame the first time you draw with it.
Parameters
facesconst int *- An array of six picture numbers, the views looking along +x, -x, +y, -y, +z and -z, in that order.
xdouble- The x of the place the views were drawn from.
ydouble- The y of that place.
zdouble- The z of that place.
boxconst double *- An array of six
doubles,{ x0, y0, z0, x1, y1, z1 }: the room's lowest and highest corners.NULLfor none.
Returns int
The cube map's number, or 0 if the graphics card can't do cube maps.
In Baked reflections, with gpu_envmapbytes, gpu_envloaded, gpu_envunload, gpu_envpixels, gpu_freeenvmap.