Function gpu_envmapbytes
#include <macawgpu.h>int gpu_envmapbytes(
const void *bytes,
int n,
double x,
double y,
double z,
const double *box
);
Makes a cube map again from the bytes gpu_envpixels gave you, such as ones you saved in a file.
Parameters
bytesconst void *- The bytes from
gpu_envpixels. nint- How many bytes there are.
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 }, as forgpu_envmap.NULLfor none.
Returns int
The cube map's number, or 0 if the bytes aren't six square faces or the card can't do cube maps.
In Baked reflections, with gpu_envmap, gpu_envloaded, gpu_envunload, gpu_envpixels, gpu_freeenvmap.