---
name: "s3d_push_materials_a"
section: "3"
platform: "linux"
package: "s3d-doc"
version: "0.2.2.1-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/s3d_push_materials_a"
---

# s3d\_push\_materials\_a(3)

push many materials

## NAME

s3d\_push\_materials\_a - push many materials

## 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
