Rest of rlgl General render state functions.
This commit is contained in:
101
API.md
101
API.md
@@ -7160,6 +7160,39 @@ Set face culling mode
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
> RL.rlEnableScissorTest()
|
||||||
|
|
||||||
|
Enable scissor test
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlDisableScissorTest()
|
||||||
|
|
||||||
|
Disable scissor test
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> success = RL.rlScissor( Rectangle area )
|
||||||
|
|
||||||
|
Scissor test
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlEnableWireMode()
|
||||||
|
|
||||||
|
Enable wire mode
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlDisableWireMode()
|
||||||
|
|
||||||
|
Disable wire mode
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
> success = RL.rlSetLineWidth( float width )
|
> success = RL.rlSetLineWidth( float width )
|
||||||
|
|
||||||
Set the line drawing width
|
Set the line drawing width
|
||||||
@@ -7189,6 +7222,74 @@ Disable line aliasing
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
> RL.rlEnableStereoRender()
|
||||||
|
|
||||||
|
Enable stereo rendering
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlDisableStereoRender()
|
||||||
|
|
||||||
|
Enable stereo rendering
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> enabled = RL.rlIsStereoRenderEnabled()
|
||||||
|
|
||||||
|
Check if stereo render is enabled
|
||||||
|
|
||||||
|
- Success return bool
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> success = RL.rlClearColor( Color color )
|
||||||
|
|
||||||
|
Clear color buffer with color
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlClearScreenBuffers()
|
||||||
|
|
||||||
|
Clear used screen buffers ( color and depth )
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> RL.rlCheckErrors()
|
||||||
|
|
||||||
|
Check and log OpenGL error codes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> success = RL.rlSetBlendMode( int mode )
|
||||||
|
|
||||||
|
Set blending mode
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> success = RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )
|
||||||
|
|
||||||
|
Set blending mode factor and equation ( using OpenGL factors )
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> success = RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )
|
||||||
|
|
||||||
|
Set blending mode factors and equations separately ( using OpenGL factors )
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## RLGL - Initialization functions
|
## RLGL - Initialization functions
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -5803,6 +5803,29 @@ function RL.rlDisableBackfaceCulling() end
|
|||||||
---@return any success
|
---@return any success
|
||||||
function RL.rlSetCullFace( mode ) end
|
function RL.rlSetCullFace( mode ) end
|
||||||
|
|
||||||
|
---Enable scissor test
|
||||||
|
---@return any RL.rlEnableScissorTest
|
||||||
|
function RL.rlEnableScissorTest() end
|
||||||
|
|
||||||
|
---Disable scissor test
|
||||||
|
---@return any RL.rlDisableScissorTest
|
||||||
|
function RL.rlDisableScissorTest() end
|
||||||
|
|
||||||
|
---Scissor test
|
||||||
|
---- Failure return false
|
||||||
|
---- Success return true
|
||||||
|
---@param area table
|
||||||
|
---@return any success
|
||||||
|
function RL.rlScissor( area ) end
|
||||||
|
|
||||||
|
---Enable wire mode
|
||||||
|
---@return any RL.rlEnableWireMode
|
||||||
|
function RL.rlEnableWireMode() end
|
||||||
|
|
||||||
|
---Disable wire mode
|
||||||
|
---@return any RL.rlDisableWireMode
|
||||||
|
function RL.rlDisableWireMode() end
|
||||||
|
|
||||||
---Set the line drawing width
|
---Set the line drawing width
|
||||||
---- Failure return false
|
---- Failure return false
|
||||||
---- Success return true
|
---- Success return true
|
||||||
@@ -5823,6 +5846,62 @@ function RL.rlEnableSmoothLines() end
|
|||||||
---@return any RL.rlDisableSmoothLines
|
---@return any RL.rlDisableSmoothLines
|
||||||
function RL.rlDisableSmoothLines() end
|
function RL.rlDisableSmoothLines() end
|
||||||
|
|
||||||
|
---Enable stereo rendering
|
||||||
|
---@return any RL.rlEnableStereoRender
|
||||||
|
function RL.rlEnableStereoRender() end
|
||||||
|
|
||||||
|
---Enable stereo rendering
|
||||||
|
---@return any RL.rlDisableStereoRender
|
||||||
|
function RL.rlDisableStereoRender() end
|
||||||
|
|
||||||
|
---Check if stereo render is enabled
|
||||||
|
---- Success return bool
|
||||||
|
---@return any enabled
|
||||||
|
function RL.rlIsStereoRenderEnabled() end
|
||||||
|
|
||||||
|
---Clear color buffer with color
|
||||||
|
---- Failure return false
|
||||||
|
---- Success return true
|
||||||
|
---@param color table
|
||||||
|
---@return any success
|
||||||
|
function RL.rlClearColor( color ) end
|
||||||
|
|
||||||
|
---Clear used screen buffers ( color and depth )
|
||||||
|
---@return any RL.rlClearScreenBuffers
|
||||||
|
function RL.rlClearScreenBuffers() end
|
||||||
|
|
||||||
|
---Check and log OpenGL error codes
|
||||||
|
---@return any RL.rlCheckErrors
|
||||||
|
function RL.rlCheckErrors() end
|
||||||
|
|
||||||
|
---Set blending mode
|
||||||
|
---- Failure return false
|
||||||
|
---- Success return true
|
||||||
|
---@param mode integer
|
||||||
|
---@return any success
|
||||||
|
function RL.rlSetBlendMode( mode ) end
|
||||||
|
|
||||||
|
---Set blending mode factor and equation ( using OpenGL factors )
|
||||||
|
---- Failure return false
|
||||||
|
---- Success return true
|
||||||
|
---@param glSrcFactor integer
|
||||||
|
---@param glDstFactor integer
|
||||||
|
---@param glEquation integer
|
||||||
|
---@return any success
|
||||||
|
function RL.rlSetBlendFactors( glSrcFactor, glDstFactor, glEquation ) end
|
||||||
|
|
||||||
|
---Set blending mode factors and equations separately ( using OpenGL factors )
|
||||||
|
---- Failure return false
|
||||||
|
---- Success return true
|
||||||
|
---@param glSrcRGB integer
|
||||||
|
---@param glDstRGB integer
|
||||||
|
---@param glSrcAlpha integer
|
||||||
|
---@param glDstAlpha integer
|
||||||
|
---@param glEqRGB integer
|
||||||
|
---@param glEqAlpha integer
|
||||||
|
---@return any success
|
||||||
|
function RL.rlSetBlendFactorsSeparate( glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha ) end
|
||||||
|
|
||||||
-- RLGL - Initialization functions
|
-- RLGL - Initialization functions
|
||||||
|
|
||||||
---Get current OpenGL version
|
---Get current OpenGL version
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ KEY CHANGES:
|
|||||||
- ADDED: rlgl Matrix operations functions
|
- ADDED: rlgl Matrix operations functions
|
||||||
- ADDED: rlgl Vertex level operations
|
- ADDED: rlgl Vertex level operations
|
||||||
- ADDED: Draw Textured Polygon Example
|
- ADDED: Draw Textured Polygon Example
|
||||||
|
- ADDED: rlgl General render state functions
|
||||||
|
|
||||||
Detailed changes:
|
Detailed changes:
|
||||||
- FIXED: uluaGetRay was looking for integers instead of tables
|
- FIXED: uluaGetRay was looking for integers instead of tables
|
||||||
@@ -84,7 +85,6 @@ Detailed changes:
|
|||||||
- FIXED: UnloadTexture did not set texture id to NULL.
|
- FIXED: UnloadTexture did not set texture id to NULL.
|
||||||
- ADDED: DrawBillboardPro
|
- ADDED: DrawBillboardPro
|
||||||
- ADDED: rlGetVersion
|
- ADDED: rlGetVersion
|
||||||
- ADDED: More rlgl General render state functions.
|
|
||||||
- ADDED: GetMaterialTexture, GetMaterialColor, GetMaterialValue and GetMaterialShader
|
- ADDED: GetMaterialTexture, GetMaterialColor, GetMaterialValue and GetMaterialShader
|
||||||
- ADDED: SetMaterialParams and GetMaterialParams
|
- ADDED: SetMaterialParams and GetMaterialParams
|
||||||
- ADDED: GetTextureId
|
- ADDED: GetTextureId
|
||||||
|
|||||||
2
devnotes
2
devnotes
@@ -5,10 +5,10 @@ Current {
|
|||||||
* Shaders management
|
* Shaders management
|
||||||
* Matrix state management
|
* Matrix state management
|
||||||
* Compute shader management
|
* Compute shader management
|
||||||
* New type validators.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Backlog {
|
Backlog {
|
||||||
|
* New type validators.
|
||||||
* Platformer example physics process for true framerate independence.
|
* Platformer example physics process for true framerate independence.
|
||||||
* Extend color lib functionality.
|
* Extend color lib functionality.
|
||||||
|
|
||||||
|
|||||||
@@ -44,10 +44,24 @@ int lrlglDisableDepthMask( lua_State *L );
|
|||||||
int lrlglEnableBackfaceCulling( lua_State *L );
|
int lrlglEnableBackfaceCulling( lua_State *L );
|
||||||
int lrlglDisableBackfaceCulling( lua_State *L );
|
int lrlglDisableBackfaceCulling( lua_State *L );
|
||||||
int lrlglSetCullFace( lua_State *L );
|
int lrlglSetCullFace( lua_State *L );
|
||||||
|
int lrlglEnableScissorTest( lua_State *L );
|
||||||
|
int lrlglDisableScissorTest( lua_State *L );
|
||||||
|
int lrlglScissor( lua_State *L );
|
||||||
|
int lrlglEnableWireMode( lua_State *L );
|
||||||
|
int lrlglDisableWireMode( lua_State *L );
|
||||||
int lrlglSetLineWidth( lua_State *L );
|
int lrlglSetLineWidth( lua_State *L );
|
||||||
int lrlglGetLineWidth( lua_State *L );
|
int lrlglGetLineWidth( lua_State *L );
|
||||||
int lrlglEnableSmoothLines( lua_State *L );
|
int lrlglEnableSmoothLines( lua_State *L );
|
||||||
int lrlglDisableSmoothLines( lua_State *L );
|
int lrlglDisableSmoothLines( lua_State *L );
|
||||||
|
int lrlglEnableStereoRender( lua_State *L );
|
||||||
|
int lrlglDisableStereoRender( lua_State *L );
|
||||||
|
int lrlglIsStereoRenderEnabled( lua_State *L );
|
||||||
|
int lrlglClearColor( lua_State *L );
|
||||||
|
int lrlglClearScreenBuffers( lua_State *L );
|
||||||
|
int lrlglCheckErrors( lua_State *L );
|
||||||
|
int lrlglSetBlendMode( lua_State *L );
|
||||||
|
int lrlglSetBlendFactors( lua_State *L );
|
||||||
|
int lrlglSetBlendFactorsSeparate( lua_State *L );
|
||||||
/* Initialization functions */
|
/* Initialization functions */
|
||||||
int lrlglGetVersion( lua_State *L );
|
int lrlglGetVersion( lua_State *L );
|
||||||
/* Render batch management */
|
/* Render batch management */
|
||||||
|
|||||||
@@ -1519,10 +1519,24 @@ void luaRegister() {
|
|||||||
assingGlobalFunction( "rlEnableBackfaceCulling", lrlglEnableBackfaceCulling );
|
assingGlobalFunction( "rlEnableBackfaceCulling", lrlglEnableBackfaceCulling );
|
||||||
assingGlobalFunction( "rlDisableBackfaceCulling", lrlglDisableBackfaceCulling );
|
assingGlobalFunction( "rlDisableBackfaceCulling", lrlglDisableBackfaceCulling );
|
||||||
assingGlobalFunction( "rlSetCullFace", lrlglSetCullFace );
|
assingGlobalFunction( "rlSetCullFace", lrlglSetCullFace );
|
||||||
|
assingGlobalFunction( "rlEnableScissorTest", lrlglEnableScissorTest );
|
||||||
|
assingGlobalFunction( "rlDisableScissorTest", lrlglDisableScissorTest );
|
||||||
|
assingGlobalFunction( "rlScissor", lrlglScissor );
|
||||||
|
assingGlobalFunction( "rlEnableWireMode", lrlglEnableWireMode );
|
||||||
|
assingGlobalFunction( "rlDisableWireMode", lrlglDisableWireMode );
|
||||||
assingGlobalFunction( "rlSetLineWidth", lrlglSetLineWidth );
|
assingGlobalFunction( "rlSetLineWidth", lrlglSetLineWidth );
|
||||||
assingGlobalFunction( "rlGetLineWidth", lrlglGetLineWidth );
|
assingGlobalFunction( "rlGetLineWidth", lrlglGetLineWidth );
|
||||||
assingGlobalFunction( "rlEnableSmoothLines", lrlglEnableSmoothLines );
|
assingGlobalFunction( "rlEnableSmoothLines", lrlglEnableSmoothLines );
|
||||||
assingGlobalFunction( "rlDisableSmoothLines", lrlglDisableSmoothLines );
|
assingGlobalFunction( "rlDisableSmoothLines", lrlglDisableSmoothLines );
|
||||||
|
assingGlobalFunction( "rlEnableStereoRender", lrlglEnableStereoRender );
|
||||||
|
assingGlobalFunction( "rlDisableStereoRender", lrlglDisableStereoRender );
|
||||||
|
assingGlobalFunction( "rlIsStereoRenderEnabled", lrlglIsStereoRenderEnabled );
|
||||||
|
assingGlobalFunction( "rlClearColor", lrlglClearColor );
|
||||||
|
assingGlobalFunction( "rlClearScreenBuffers", lrlglClearScreenBuffers );
|
||||||
|
assingGlobalFunction( "rlCheckErrors", lrlglCheckErrors );
|
||||||
|
assingGlobalFunction( "rlSetBlendMode", lrlglSetBlendMode );
|
||||||
|
assingGlobalFunction( "rlSetBlendFactors", lrlglSetBlendFactors );
|
||||||
|
assingGlobalFunction( "rlSetBlendFactorsSeparate", lrlglSetBlendFactorsSeparate );
|
||||||
/* Initialization functions. */
|
/* Initialization functions. */
|
||||||
assingGlobalFunction( "rlGetVersion", lrlglGetVersion );
|
assingGlobalFunction( "rlGetVersion", lrlglGetVersion );
|
||||||
/* Render batch management. */
|
/* Render batch management. */
|
||||||
|
|||||||
218
src/rlgl.c
218
src/rlgl.c
@@ -723,6 +723,72 @@ int lrlglSetCullFace( lua_State *L ) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlEnableScissorTest()
|
||||||
|
|
||||||
|
Enable scissor test
|
||||||
|
*/
|
||||||
|
int lrlglEnableScissorTest( lua_State *L ) {
|
||||||
|
rlEnableScissorTest();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlDisableScissorTest()
|
||||||
|
|
||||||
|
Disable scissor test
|
||||||
|
*/
|
||||||
|
int lrlglDisableScissorTest( lua_State *L ) {
|
||||||
|
rlDisableScissorTest();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> success = RL.rlScissor( Rectangle area )
|
||||||
|
|
||||||
|
Scissor test
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
*/
|
||||||
|
int lrlglScissor( lua_State *L ) {
|
||||||
|
if ( !lua_istable( L, 1 ) ) {
|
||||||
|
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlScissor( Rectangle area )" );
|
||||||
|
lua_pushboolean( L, false );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
Rectangle area = uluaGetRectangleIndex( L, 1 );
|
||||||
|
|
||||||
|
rlScissor( area.x, area.y, area.width, area.height );
|
||||||
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlEnableWireMode()
|
||||||
|
|
||||||
|
Enable wire mode
|
||||||
|
*/
|
||||||
|
int lrlglEnableWireMode( lua_State *L ) {
|
||||||
|
rlEnableWireMode();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlDisableWireMode()
|
||||||
|
|
||||||
|
Disable wire mode
|
||||||
|
*/
|
||||||
|
int lrlglDisableWireMode( lua_State *L ) {
|
||||||
|
rlDisableWireMode();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
> success = RL.rlSetLineWidth( float width )
|
> success = RL.rlSetLineWidth( float width )
|
||||||
|
|
||||||
@@ -778,6 +844,158 @@ int lrlglDisableSmoothLines( lua_State *L ) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlEnableStereoRender()
|
||||||
|
|
||||||
|
Enable stereo rendering
|
||||||
|
*/
|
||||||
|
int lrlglEnableStereoRender( lua_State *L ) {
|
||||||
|
rlEnableStereoRender();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlDisableStereoRender()
|
||||||
|
|
||||||
|
Enable stereo rendering
|
||||||
|
*/
|
||||||
|
int lrlglDisableStereoRender( lua_State *L ) {
|
||||||
|
rlDisableStereoRender();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> enabled = RL.rlIsStereoRenderEnabled()
|
||||||
|
|
||||||
|
Check if stereo render is enabled
|
||||||
|
|
||||||
|
- Success return bool
|
||||||
|
*/
|
||||||
|
int lrlglIsStereoRenderEnabled( lua_State *L ) {
|
||||||
|
lua_pushboolean( L, rlIsStereoRenderEnabled() );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> success = RL.rlClearColor( Color color )
|
||||||
|
|
||||||
|
Clear color buffer with color
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
*/
|
||||||
|
int lrlglClearColor( lua_State *L ) {
|
||||||
|
if ( !lua_istable( L, 1 ) ) {
|
||||||
|
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlClearColor( Color color )" );
|
||||||
|
lua_pushboolean( L, false );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
Color color = uluaGetColorIndex( L, 1 );
|
||||||
|
|
||||||
|
rlClearColor( color.r, color.g, color.b, color.a );
|
||||||
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlClearScreenBuffers()
|
||||||
|
|
||||||
|
Clear used screen buffers ( color and depth )
|
||||||
|
*/
|
||||||
|
int lrlglClearScreenBuffers( lua_State *L ) {
|
||||||
|
rlClearScreenBuffers();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> RL.rlCheckErrors()
|
||||||
|
|
||||||
|
Check and log OpenGL error codes
|
||||||
|
*/
|
||||||
|
int lrlglCheckErrors( lua_State *L ) {
|
||||||
|
rlCheckErrors();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> success = RL.rlSetBlendMode( int mode )
|
||||||
|
|
||||||
|
Set blending mode
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
*/
|
||||||
|
int lrlglSetBlendMode( lua_State *L ) {
|
||||||
|
if ( !lua_isnumber( L, 1 ) ) {
|
||||||
|
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendMode( int mode )" );
|
||||||
|
lua_pushboolean( L, false );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
rlSetBlendMode( lua_tointeger( L, 1 ) );
|
||||||
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> success = RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )
|
||||||
|
|
||||||
|
Set blending mode factor and equation ( using OpenGL factors )
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
*/
|
||||||
|
int lrlglSetBlendFactors( lua_State *L ) {
|
||||||
|
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
|
||||||
|
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )" );
|
||||||
|
lua_pushboolean( L, false );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
int glSrcFactor = lua_tointeger( L, 1 );
|
||||||
|
int glDstFactor = lua_tointeger( L, 2 );
|
||||||
|
int glEquation = lua_tointeger( L, 3 );
|
||||||
|
|
||||||
|
rlSetBlendFactors( glSrcFactor, glDstFactor, glEquation );
|
||||||
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
> success = RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )
|
||||||
|
|
||||||
|
Set blending mode factors and equations separately ( using OpenGL factors )
|
||||||
|
|
||||||
|
- Failure return false
|
||||||
|
- Success return true
|
||||||
|
*/
|
||||||
|
int lrlglSetBlendFactorsSeparate( lua_State *L ) {
|
||||||
|
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|
||||||
|
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
|
||||||
|
TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )" );
|
||||||
|
lua_pushboolean( L, false );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
int glSrcRGB = lua_tointeger( L, 1 );
|
||||||
|
int glDstRGB = lua_tointeger( L, 2 );
|
||||||
|
int glSrcAlpha = lua_tointeger( L, 3 );
|
||||||
|
int glDstAlpha = lua_tointeger( L, 4 );
|
||||||
|
int glEqRGB = lua_tointeger( L, 5 );
|
||||||
|
int glEqAlpha = lua_tointeger( L, 6 );
|
||||||
|
|
||||||
|
rlSetBlendFactorsSeparate( glSrcRGB, glDstRGB, glSrcAlpha, glDstAlpha, glEqRGB, glEqAlpha );
|
||||||
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
## RLGL - Initialization functions
|
## RLGL - Initialization functions
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user