Rest of rlgl and raymath functions.
This commit is contained in:
40
API.md
40
API.md
@@ -8261,6 +8261,22 @@ Normalize provided vector
|
||||
|
||||
---
|
||||
|
||||
> result = RL.Vector3Project( Vector3 v1, Vector3 v2 )
|
||||
|
||||
Calculate the projection of the vector v1 on to v2
|
||||
|
||||
- Success return Vector3
|
||||
|
||||
---
|
||||
|
||||
> result = RL.Vector3Reject( Vector3 v1, Vector3 v2 )
|
||||
|
||||
Calculate the rejection of the vector v1 on to v2
|
||||
|
||||
- Success return Vector3
|
||||
|
||||
---
|
||||
|
||||
> v1, v2 = RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )
|
||||
|
||||
Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other.
|
||||
@@ -9485,6 +9501,18 @@ Disable vertex attribute index
|
||||
|
||||
---
|
||||
|
||||
> RL.rlEnableStatePointer( int vertexAttribType, Buffer buffer )
|
||||
|
||||
Enable attribute state pointer
|
||||
|
||||
---
|
||||
|
||||
> RL.rlDisableStatePointer( int vertexAttribType )
|
||||
|
||||
Disable attribute state pointer
|
||||
|
||||
---
|
||||
|
||||
## RLGL - Textures state
|
||||
|
||||
---
|
||||
@@ -9569,6 +9597,12 @@ Activate multiple draw color buffers
|
||||
|
||||
---
|
||||
|
||||
> RL.rlBlitFramebuffer( Rectangle srcRect, Rectangle dstRect, int bufferMask )
|
||||
|
||||
Blit active framebuffer to main framebuffer
|
||||
|
||||
---
|
||||
|
||||
## RLGL - General render state
|
||||
|
||||
---
|
||||
@@ -9651,6 +9685,12 @@ Enable wire mode
|
||||
|
||||
---
|
||||
|
||||
> RL.rlEnablePointMode()
|
||||
|
||||
Enable point mode
|
||||
|
||||
---
|
||||
|
||||
> RL.rlDisableWireMode()
|
||||
|
||||
Disable wire mode
|
||||
|
||||
@@ -5462,6 +5462,20 @@ function RL.Vector3Divide( v1, v2 ) end
|
||||
---@return any result
|
||||
function RL.Vector3Normalize( v ) end
|
||||
|
||||
---Calculate the projection of the vector v1 on to v2
|
||||
---- Success return Vector3
|
||||
---@param v1 table
|
||||
---@param v2 table
|
||||
---@return any result
|
||||
function RL.Vector3Project( v1, v2 ) end
|
||||
|
||||
---Calculate the rejection of the vector v1 on to v2
|
||||
---- Success return Vector3
|
||||
---@param v1 table
|
||||
---@param v2 table
|
||||
---@return any result
|
||||
function RL.Vector3Reject( v1, v2 ) end
|
||||
|
||||
---Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other.
|
||||
---Gram-Schmidt function implementation
|
||||
---- Success return Vector3, Vector3
|
||||
@@ -6592,6 +6606,17 @@ function RL.rlEnableVertexAttribute( index ) end
|
||||
---@return any RL.rlDisableVertexAttribute
|
||||
function RL.rlDisableVertexAttribute( index ) end
|
||||
|
||||
---Enable attribute state pointer
|
||||
---@param vertexAttribType integer
|
||||
---@param buffer any
|
||||
---@return any RL.rlEnableStatePointer
|
||||
function RL.rlEnableStatePointer( vertexAttribType, buffer ) end
|
||||
|
||||
---Disable attribute state pointer
|
||||
---@param vertexAttribType integer
|
||||
---@return any RL.rlDisableStatePointer
|
||||
function RL.rlDisableStatePointer( vertexAttribType ) end
|
||||
|
||||
-- RLGL - Textures state
|
||||
|
||||
---Select and active a texture slot
|
||||
@@ -6658,6 +6683,13 @@ function RL.rlDisableFramebuffer() end
|
||||
---@return any RL.rlActiveDrawBuffers
|
||||
function RL.rlActiveDrawBuffers( count ) end
|
||||
|
||||
---Blit active framebuffer to main framebuffer
|
||||
---@param srcRect table
|
||||
---@param dstRect table
|
||||
---@param bufferMask integer
|
||||
---@return any RL.rlBlitFramebuffer
|
||||
function RL.rlBlitFramebuffer( srcRect, dstRect, bufferMask ) end
|
||||
|
||||
-- RLGL - General render state
|
||||
|
||||
---Enable color blending
|
||||
@@ -6714,6 +6746,10 @@ function RL.rlScissor( area ) end
|
||||
---@return any RL.rlEnableWireMode
|
||||
function RL.rlEnableWireMode() end
|
||||
|
||||
---Enable point mode
|
||||
---@return any RL.rlEnablePointMode
|
||||
function RL.rlEnablePointMode() end
|
||||
|
||||
---Disable wire mode
|
||||
---@return any RL.rlDisableWireMode
|
||||
function RL.rlDisableWireMode() end
|
||||
|
||||
@@ -93,10 +93,8 @@ local rlgl = {
|
||||
rlLoadDrawQuad = true, -- Most likely not needed.
|
||||
},
|
||||
info = {
|
||||
rlBlitFramebuffer = "Will be added",
|
||||
rlEnablePointMode = "Will be added",
|
||||
rlEnableStatePointer = "Should probably be added for GRAPHICS_API_OPENGL_11",
|
||||
rlDisableStatePointer = "Should probably be added for GRAPHICS_API_OPENGL_11",
|
||||
rlEnableStatePointer = "Available for GRAPHICS_API_OPENGL_11",
|
||||
rlDisableStatePointer = "Available for GRAPHICS_API_OPENGL_11",
|
||||
},
|
||||
}
|
||||
local raygui = {
|
||||
@@ -123,12 +121,12 @@ local easings = {
|
||||
prefix = "EASEDEF",
|
||||
file = "easings.h",
|
||||
blacklist = {
|
||||
EaseLinearNone = true, -- "Replaced by EaseLinear"
|
||||
EaseLinearIn = true, -- "Replaced by EaseLinear"
|
||||
EaseLinearOut = true, -- "Replaced by EaseLinear"
|
||||
EaseLinearInOut = true, -- "Replaced by EaseLinear"
|
||||
},
|
||||
info = {
|
||||
EaseLinearNone = "Will be added",
|
||||
EaseLinearIn = "Will be added",
|
||||
EaseLinearOut = "Will be added",
|
||||
EaseLinearInOut = "Will be added",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ DETAILED CHANGES:
|
||||
- FIXED: GuiSetStyle, GuiLoadStyle and GuiLoadStyleDefault sets state->guiDefaultFont to GuiGetFont.
|
||||
- ADDED: TextFindIndex.
|
||||
- FIXED: SeekMusicStream was not assigned.
|
||||
- ADDED: rlEnableStatePointer and rlDisableStatePointer for GRAPHICS_API_OPENGL_11.
|
||||
- ADDED: rlBlitFramebuffer and rlEnablePointMode.
|
||||
- ADDED: Vector3Project and Vector3Reject.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Release: ReiLua version 0.7.0 Using Raylib 5.0 and Forked Raygui 4.0
|
||||
|
||||
@@ -31,6 +31,10 @@ int lrlglEnableVertexBufferElement( lua_State* L );
|
||||
int lrlglDisableVertexBufferElement( lua_State* L );
|
||||
int lrlglEnableVertexAttribute( lua_State* L );
|
||||
int lrlglDisableVertexAttribute( lua_State* L );
|
||||
#if defined( GRAPHICS_API_OPENGL_11 )
|
||||
int lrlglEnableStatePointer( lua_State* L );
|
||||
int lrlglDisableStatePointer( lua_State* L );
|
||||
#endif
|
||||
/* Textures state */
|
||||
int lrlglActiveTextureSlot( lua_State* L );
|
||||
int lrlglEnableTexture( lua_State* L );
|
||||
@@ -46,6 +50,7 @@ int lrlglDisableShader( lua_State* L );
|
||||
int lrlglEnableFramebuffer( lua_State* L );
|
||||
int lrlglDisableFramebuffer( lua_State* L );
|
||||
int lrlglActiveDrawBuffers( lua_State* L );
|
||||
int lrlglBlitFramebuffer( lua_State* L );
|
||||
/* General render state. */
|
||||
int lrlglEnableColorBlend( lua_State* L );
|
||||
int lrlglDisableColorBlend( lua_State* L );
|
||||
@@ -60,6 +65,7 @@ int lrlglEnableScissorTest( lua_State* L );
|
||||
int lrlglDisableScissorTest( lua_State* L );
|
||||
int lrlglScissor( lua_State* L );
|
||||
int lrlglEnableWireMode( lua_State* L );
|
||||
int lrlglEnablePointMode( lua_State* L );
|
||||
int lrlglDisableWireMode( lua_State* L );
|
||||
int lrlglSetLineWidth( lua_State* L );
|
||||
int lrlglGetLineWidth( lua_State* L );
|
||||
|
||||
@@ -58,6 +58,8 @@ int lmathVector3Angle( lua_State* L );
|
||||
int lmathVector3Negate( lua_State* L );
|
||||
int lmathVector3Divide( lua_State* L );
|
||||
int lmathVector3Normalize( lua_State* L );
|
||||
int lmathVector3Project( lua_State* L );
|
||||
int lmathVector3Reject( lua_State* L );
|
||||
int lmathVector3OrthoNormalize( lua_State* L );
|
||||
int lmathVector3Transform( lua_State* L );
|
||||
int lmathVector3RotateByQuaternion( lua_State* L );
|
||||
|
||||
@@ -1881,6 +1881,8 @@ void luaRegister() {
|
||||
assingGlobalFunction( "Vector3Negate", lmathVector3Negate );
|
||||
assingGlobalFunction( "Vector3Divide", lmathVector3Divide );
|
||||
assingGlobalFunction( "Vector3Normalize", lmathVector3Normalize );
|
||||
assingGlobalFunction( "Vector3Project", lmathVector3Project );
|
||||
assingGlobalFunction( "Vector3Reject", lmathVector3Reject );
|
||||
assingGlobalFunction( "Vector3OrthoNormalize", lmathVector3OrthoNormalize );
|
||||
assingGlobalFunction( "Vector3Transform", lmathVector3Transform );
|
||||
assingGlobalFunction( "Vector3RotateByQuaternion", lmathVector3RotateByQuaternion );
|
||||
@@ -2057,6 +2059,10 @@ void luaRegister() {
|
||||
assingGlobalFunction( "rlDisableVertexBufferElement", lrlglDisableVertexBufferElement );
|
||||
assingGlobalFunction( "rlEnableVertexAttribute", lrlglEnableVertexAttribute );
|
||||
assingGlobalFunction( "rlDisableVertexAttribute", lrlglDisableVertexAttribute );
|
||||
#if defined( GRAPHICS_API_OPENGL_11 )
|
||||
assingGlobalFunction( "rlEnableStatePointer", lrlglEnableStatePointer );
|
||||
assingGlobalFunction( "rlDisableStatePointer", lrlglDisableStatePointer );
|
||||
#endif
|
||||
/* Textures state. */
|
||||
assingGlobalFunction( "rlActiveTextureSlot", lrlglActiveTextureSlot );
|
||||
assingGlobalFunction( "rlEnableTexture", lrlglEnableTexture );
|
||||
@@ -2072,6 +2078,7 @@ void luaRegister() {
|
||||
assingGlobalFunction( "rlEnableFramebuffer", lrlglEnableFramebuffer );
|
||||
assingGlobalFunction( "rlDisableFramebuffer", lrlglDisableFramebuffer );
|
||||
assingGlobalFunction( "rlActiveDrawBuffers", lrlglActiveDrawBuffers );
|
||||
assingGlobalFunction( "rlBlitFramebuffer", lrlglBlitFramebuffer );
|
||||
/* General render state. */
|
||||
assingGlobalFunction( "rlEnableColorBlend", lrlglEnableColorBlend );
|
||||
assingGlobalFunction( "rlDisableColorBlend", lrlglDisableColorBlend );
|
||||
@@ -2086,6 +2093,7 @@ void luaRegister() {
|
||||
assingGlobalFunction( "rlDisableScissorTest", lrlglDisableScissorTest );
|
||||
assingGlobalFunction( "rlScissor", lrlglScissor );
|
||||
assingGlobalFunction( "rlEnableWireMode", lrlglEnableWireMode );
|
||||
assingGlobalFunction( "rlEnablePointMode", lrlglEnablePointMode );
|
||||
assingGlobalFunction( "rlDisableWireMode", lrlglDisableWireMode );
|
||||
assingGlobalFunction( "rlSetLineWidth", lrlglSetLineWidth );
|
||||
assingGlobalFunction( "rlGetLineWidth", lrlglGetLineWidth );
|
||||
|
||||
55
src/rlgl.c
55
src/rlgl.c
@@ -374,6 +374,35 @@ int lrlglDisableVertexAttribute( lua_State* L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined( GRAPHICS_API_OPENGL_11 )
|
||||
/*
|
||||
> RL.rlEnableStatePointer( int vertexAttribType, Buffer buffer )
|
||||
|
||||
Enable attribute state pointer
|
||||
*/
|
||||
int lrlglEnableStatePointer( lua_State* L ) {
|
||||
int vertexAttribType = luaL_checkinteger( L, 1 );
|
||||
Buffer* buffer = uluaGetBuffer( L, 2 );
|
||||
|
||||
rlEnableStatePointer( vertexAttribType, buffer->data );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.rlDisableStatePointer( int vertexAttribType )
|
||||
|
||||
Disable attribute state pointer
|
||||
*/
|
||||
int lrlglDisableStatePointer( lua_State* L ) {
|
||||
int vertexAttribType = luaL_checkinteger( L, 1 );
|
||||
|
||||
rlDisableStatePointer( vertexAttribType );
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
## RLGL - Textures state
|
||||
*/
|
||||
@@ -526,6 +555,21 @@ int lrlglActiveDrawBuffers( lua_State* L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.rlBlitFramebuffer( Rectangle srcRect, Rectangle dstRect, int bufferMask )
|
||||
|
||||
Blit active framebuffer to main framebuffer
|
||||
*/
|
||||
int lrlglBlitFramebuffer( lua_State* L ) {
|
||||
Rectangle src = uluaGetRectangle( L, 1 );
|
||||
Rectangle dst = uluaGetRectangle( L, 2 );
|
||||
int bufferMask = luaL_checkinteger( L, 3 );
|
||||
|
||||
rlBlitFramebuffer( (int)src.x, (int)src.y, (int)src.width, (int)src.height, (int)dst.x, (int)dst.y, (int)dst.width, (int)dst.height, bufferMask );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
## RLGL - General render state
|
||||
*/
|
||||
@@ -675,6 +719,17 @@ int lrlglEnableWireMode( lua_State* L ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.rlEnablePointMode()
|
||||
|
||||
Enable point mode
|
||||
*/
|
||||
int lrlglEnablePointMode( lua_State* L ) {
|
||||
rlEnablePointMode();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
> RL.rlDisableWireMode()
|
||||
|
||||
|
||||
32
src/rmath.c
32
src/rmath.c
@@ -848,6 +848,38 @@ int lmathVector3Normalize( lua_State* L ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
> result = RL.Vector3Project( Vector3 v1, Vector3 v2 )
|
||||
|
||||
Calculate the projection of the vector v1 on to v2
|
||||
|
||||
- Success return Vector3
|
||||
*/
|
||||
int lmathVector3Project( lua_State* L ) {
|
||||
Vector3 v1 = uluaGetVector3( L, 1 );
|
||||
Vector3 v2 = uluaGetVector3( L, 2 );
|
||||
|
||||
uluaPushVector3( L, Vector3Project( v1, v2 ) );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
> result = RL.Vector3Reject( Vector3 v1, Vector3 v2 )
|
||||
|
||||
Calculate the rejection of the vector v1 on to v2
|
||||
|
||||
- Success return Vector3
|
||||
*/
|
||||
int lmathVector3Reject( lua_State* L ) {
|
||||
Vector3 v1 = uluaGetVector3( L, 1 );
|
||||
Vector3 v2 = uluaGetVector3( L, 2 );
|
||||
|
||||
uluaPushVector3( L, Vector3Reject( v1, v2 ) );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
> v1, v2 = RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user