SYNOPSIS

#include <s3d.h>

int s3d_push_materials_a(int object, const float *mbuf, uint16_t n);

DESCRIPTION

Pushes a buffer of materials. Those materials are in the format float[n*12], with

mbuf[n*12 + 0-3] - ambience

mbuf[n*12 + 4-7] - specular

mbuf[n *12 + 8-11] - diffusion values

of each entry. n is the number of materials pushed. The values are in the order r,g,b,a. If you only want to push one material, use the more easy s3d_push_material_a() function.

 // each line has r,g,b,a value
 float bla[24]=
         {1, 0, 0, 1,
          1, 0, 0, 1,
          1, 0, 0, 1,
          0, 1, 1, 1,
          0, 1, 1, 1,
          0, 1, 1, 1};

 s3d_push_materials_a(object, bla, 2); // push a red and a cyan material

AUTHOR

Simon Wunderlich

Author of s3d