summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorjussi2023-10-31 02:11:46 +0200
committerjussi2023-10-31 02:11:46 +0200
commit65fababd8d36b47c85e7d6b43f649ed88c7e8bcf (patch)
tree97c36c1a507033e96594ef4aea3ac161b0499c06 /API.md
parentc3295e014d979c0213b3fb7e4837b5356bc8fdb4 (diff)
downloadreilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.tar.gz
reilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.tar.bz2
reilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.zip
Shaders management functions.
Diffstat (limited to 'API.md')
-rw-r--r--API.md65
1 files changed, 63 insertions, 2 deletions
diff --git a/API.md b/API.md
index ee4173a..43b20fc 100644
--- a/API.md
+++ b/API.md
@@ -6854,15 +6854,76 @@ Delete framebuffer from GPU
---
-> success = RL.rlLoadShaderCode( string vsCode, string fsCode )
+> shaderId = RL.rlLoadShaderCode( string vsCode, string fsCode )
Load shader from code strings
-- Failure return nil
- Success return int
---
+> shaderId = RL.rlCompileShader( string shaderCode, int type )
+
+Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
+
+- Success return int
+
+---
+
+> shaderProgramId = RL.rlLoadShaderProgram( int vShaderId, int fShaderId )
+
+Load custom shader program
+
+- Success return int
+
+---
+
+> RL.rlUnloadShaderProgram( int id )
+
+Unload shader program
+
+---
+
+> location = RL.rlGetLocationUniform( int shaderId, string uniformName )
+
+Get shader location uniform
+
+- Success return int
+
+---
+
+> location = RL.rlGetLocationAttrib( int shaderId, string attribName )
+
+Get shader location attribute
+
+- Success return int
+
+---
+
+> RL.rlSetUniform( int locIndex, Buffer value, int uniformType, int count )
+
+Set shader value uniform
+
+---
+
+> RL.rlSetUniformMatrix( int locIndex, Matrix mat )
+
+Set shader value matrix
+
+---
+
+> RL.rlSetUniformSampler( int locIndex, int textureId )
+
+Set shader value sampler
+
+---
+
+> RL.rlSetShader( int id, int{} locs )
+
+Set shader currently active (id and locations)
+
+---
+
## RLGL - Matrix state management
---