glDepthRange and glPolygonOffset.
This commit is contained in:
28
src/gl.c
28
src/gl.c
@@ -77,6 +77,20 @@ int lglBlitFramebuffer( lua_State* L ) {
|
||||
## OpenGL - State Management
|
||||
*/
|
||||
|
||||
/*
|
||||
> RL.glDepthRange( float nearVal, float farVal )
|
||||
|
||||
Specify mapping of depth values from normalized device coordinates to window coordinates
|
||||
*/
|
||||
int lglDepthRange( lua_State* L ) {
|
||||
float nearVal = luaL_checknumber( L, 1 );
|
||||
float farVal = luaL_checknumber( L, 2 );
|
||||
|
||||
glDepthRange( nearVal, farVal );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.glEnable( int cap )
|
||||
|
||||
@@ -103,6 +117,20 @@ int lglDisable( lua_State* L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.glPolygonOffset( float factor, float units )
|
||||
|
||||
Set the scale and units used to calculate depth values
|
||||
*/
|
||||
int lglPolygonOffset( lua_State* L ) {
|
||||
float factor = luaL_checknumber( L, 1 );
|
||||
float units = luaL_checknumber( L, 2 );
|
||||
|
||||
glPolygonOffset( factor, units );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.glStencilFunc( int func, int ref, int mask )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user