summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorjussi2022-05-16 13:44:10 +0300
committerjussi2022-05-16 13:44:10 +0300
commit59ea29d8ff9dad751659a0a42d76a5534f7b4b97 (patch)
tree96a901dd2f9884e901b78bdd93c62fe2fe5d9e44 /API.md
parentb034aa01dc0ca443eba7c7b12ead7732c3e32240 (diff)
downloadreilua-enhanced-59ea29d8ff9dad751659a0a42d76a5534f7b4b97.tar.gz
reilua-enhanced-59ea29d8ff9dad751659a0a42d76a5534f7b4b97.tar.bz2
reilua-enhanced-59ea29d8ff9dad751659a0a42d76a5534f7b4b97.zip
New GenMeshCustom, UpdateMesh and lightmap example.
Diffstat (limited to 'API.md')
-rw-r--r--API.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/API.md b/API.md
index b4e23f4..486e1cf 100644
--- a/API.md
+++ b/API.md
@@ -635,6 +635,18 @@ int id. Defines 3d camera position/orientation
int id. Vertex data defining a mesh
+```
+mesh{} = {
+ vertices = { Vector3, ... },
+ texcoords = { Vector2, ... },
+ texcoords2 = { Vector2, ... },
+ normals = { Vector3, ... },
+ tangents = { Vector4, ... },
+ colors = { Color, ... },
+ indices = { int, ... },
+}
+```
+
---
> Material = MaterialId
@@ -642,7 +654,7 @@ int id. Vertex data defining a mesh
int id. Material type
```
-table = {
+material{} = {
shader = Shader,
maps = {
{
@@ -3200,15 +3212,24 @@ Generate heightmap mesh from image data
---
-> mesh = RL_GenMeshCustom( Vector3{} vertices, Vector2{} texCoords, Vector3{} normals )
+> mesh = RL_GenMeshCustom( Mesh{}, bool dynamic )
-Generate custom mesh
+Generate custom mesh from vertex attribute data and uploads it into a VAO ( if supported ) and VBO
- Failure return -1
- Success return int
---
+> success = RL_UpdateMesh( Mesh{} )
+
+Update mesh vertex data in GPU. ( Mainly intented to be used with custom meshes )
+
+- Failure return false
+- Success return true
+
+---
+
> success = RL_UnloadMesh( Mesh mesh )
Unload mesh data from CPU and GPU