---
name: "s3d_load_texture"
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_load_texture"
---

# s3d\_load\_texture(3)

load texture from memory

## NAME

s3d\_load\_texture - load texture from memory

## SYNOPSIS

```
#include <s3d.h>
```

**int s3d\_load\_texture(int** *object***, uint32\_t** *tex***, uint16\_t** *xpos***, uint16\_t** *ypos***, uint16\_t** *w***, uint16\_t** *h***, const uint8\_t \****data***);**

## DESCRIPTION

This will load an 32bit rgba image supplied in data at position xpos,ypos of the texture tex. The image has the width w and height h. This can be used to update only parts of the texture. It's no problem to supply big textures, as the image will be sent to server in fragments. Of course, you will have created the texture with s3d\_push\_texture, have an material assigned to the texture with s3d\_pep\_material\_texture() and have your polygons set sane polygon texture coords using s3d\_pep\_polygon\_tex\_coord().

## AUTHOR

**Simon Wunderlich**

Author of s3d
