summaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 2513649..9dfbe01 100644
--- a/src/core.c
+++ b/src/core.c
@@ -885,6 +885,21 @@ int lcoreIsShaderReady( lua_State *L ) {
}
/*
+> shaderId = RL.GetShaderId( Shader shader )
+
+Get shader program id
+
+- Success return int
+*/
+int lcoreGetShaderId( lua_State *L ) {
+ Shader *shader = uluaGetShader( L, 1 );
+
+ lua_pushinteger( L, shader->id );
+
+ return 1;
+}
+
+/*
> location = RL.GetShaderLocation( Shader shader, string uniformName )
Get shader uniform location