Added Shader:getExternVariable(name).

Returns the base type name ('float', 'image', etc.), the number of components (2 for a vec2), and number of array elements (1 for a non-array variable) for the extern variable with the specified name in the shader.

Returns nil if the variable either doesn't exist or was optimized out by the driver's shader compiler.
This commit is contained in:
Alex Szpakowski
2014-04-25 20:32:42 -03:00
parent 853f741ba3
commit f30a0d72f0
4 changed files with 114 additions and 22 deletions
@@ -38,6 +38,7 @@ int w_Shader_sendFloat(lua_State *L);
int w_Shader_sendMatrix(lua_State *L);
int w_Shader_sendTexture(lua_State *L);
int w_Shader_send(lua_State *L);
int w_Shader_getExternVariable(lua_State *L);
extern "C" int luaopen_shader(lua_State *L);
} // opengl