From fbfe1e0cb6207b6c8afd42457cb1304c7264734f Mon Sep 17 00:00:00 2001 From: jussi Date: Tue, 5 Apr 2022 01:38:03 +0300 Subject: Lights. --- API.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'API.md') diff --git a/API.md b/API.md index 5c6aa57..5ff11d2 100644 --- a/API.md +++ b/API.md @@ -547,6 +547,12 @@ HUEBAR_SELECTOR_HEIGHT HUEBAR_SELECTOR_OVERFLOW +## Globals - LightType + +LIGHT_DIRECTIONAL + +LIGHT_POINT + ## Types Raylib structs in Lua @@ -1151,6 +1157,24 @@ Get shader attribute location --- +> success = RL_SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location ) + +Set shader location index + +- Failure return false +- Success return true + +--- + +> location = RL_GetShaderLocationIndex( Shader shader, int shaderLocationIndex ) + +Get shader location index + +- Failure return false +- Success return int + +--- + > success = RL_SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat ) Set shader uniform value ( matrix 4x4 ) @@ -3953,3 +3977,25 @@ Check icon pixel value - Success return bool --- + +## Lights - Basics + +--- + +> light = RL_CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader ) + +Create a light and get shader locations + +- Failure return -1 +- Success return int + +--- + +> success = RL_UpdateLightValues( Shader shader, Light light ) + +Send light properties to shader + +- Failure return false +- Success return true + +--- -- cgit v1.2.3