Lights.
This commit is contained in:
46
API.md
46
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
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user