New rlgl functions and texture can be given as table.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
/* Framebuffer state. */
|
||||
int lrlglEnableFramebuffer( lua_State *L );
|
||||
int lrlglDisableFramebuffer( lua_State *L );
|
||||
int lrlglActiveDrawBuffers( lua_State *L );
|
||||
/* General render state. */
|
||||
int lrlglEnableColorBlend( lua_State *L );
|
||||
int lrlglDisableColorBlend( lua_State *L );
|
||||
@@ -15,4 +19,13 @@ int lrlglGetLineWidth( lua_State *L );
|
||||
int lrlglEnableSmoothLines( lua_State *L );
|
||||
int lrlglDisableSmoothLines( lua_State *L );
|
||||
/* Initialization functions */
|
||||
int lrlglGetVersion( lua_State *L );
|
||||
int lrlglGetVersion( lua_State *L );
|
||||
/* Textures management */
|
||||
int lrlglLoadTexture( lua_State *L );
|
||||
int lrlglLoadTextureDepth( lua_State *L );
|
||||
int lrlglUnloadTexture( lua_State *L );
|
||||
/* Framebuffer management (fbo) */
|
||||
int lrlglLoadFramebuffer( lua_State *L );
|
||||
int lrlglFramebufferAttach( lua_State *L );
|
||||
int lrlglFramebufferComplete( lua_State *L );
|
||||
int lrlglUnloadFramebuffer( lua_State *L );
|
||||
@@ -7,38 +7,33 @@ void luaCallProcess();
|
||||
void luaCallDraw();
|
||||
void luaCallExit();
|
||||
void luaRegister();
|
||||
/* Lua Util functions */
|
||||
/* Type validators. */
|
||||
bool isValidTexture( lua_State *L, int index );
|
||||
bool isValidRenderTexture( lua_State *L, int index );
|
||||
/* Lua Util functions. */
|
||||
Color uluaGetColor( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Color uluaGetColorIndex( lua_State *L, int index );
|
||||
Vector2 uluaGetVector2( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Vector2 uluaGetVector2Index( lua_State *L, int index );
|
||||
Vector3 uluaGetVector3( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Vector3 uluaGetVector3Index( lua_State *L, int index );
|
||||
Vector4 uluaGetVector4( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Vector4 uluaGetVector4Index( lua_State *L, int index );
|
||||
Rectangle uluaGetRectangle( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Rectangle uluaGetRectangleIndex( lua_State *L, int index );
|
||||
Quaternion uluaGetQuaternion( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Quaternion uluaGetQuaternionIndex( lua_State *L, int index );
|
||||
Matrix uluaGetMatrix( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Matrix uluaGetMatrixIndex( lua_State *L, int index );
|
||||
BoundingBox uluaGetBoundingBox( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
BoundingBox uluaGetBoundingBoxIndex( lua_State *L, int index );
|
||||
Ray uluaGetRay( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
Ray uluaGetRayIndex( lua_State *L, int index );
|
||||
NPatchInfo uluaGetNPatchInfo( lua_State *L );
|
||||
/* Only works with positive index. */
|
||||
NPatchInfo uluaGetNPatchInfoIndex( lua_State *L, int index );
|
||||
|
||||
Texture uluaGetTexture( lua_State *L, int index );
|
||||
RenderTexture uluaGetRenderTexture( lua_State *L, int index );
|
||||
/* Push types. */
|
||||
void uluaPushColor( lua_State *L, Color color );
|
||||
void uluaPushVector2( lua_State *L, Vector2 vector );
|
||||
void uluaPushVector3( lua_State *L, Vector3 vector );
|
||||
|
||||
@@ -9,6 +9,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int texRef; /* TextureReference. */
|
||||
Texture texture;
|
||||
RenderTexture renderTexture;
|
||||
} ReiTexture;
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
/* TEXTURE_TYPE_ALL is internal and used for accepting every type. */
|
||||
enum TEXTURE_TYPE { TEXTURE_TYPE_TEXTURE, TEXTURE_TYPE_RENDER_TEXTURE, TEXTURE_TYPE_ALL };
|
||||
enum TextureType { TEXTURE_TYPE_TEXTURE, TEXTURE_TYPE_RENDER_TEXTURE, TEXTURE_TYPE_ALL };
|
||||
|
||||
/* Validators. */
|
||||
bool validImage( size_t id );
|
||||
bool validTexture( size_t id, int type );
|
||||
bool validRenderTexture( size_t id );
|
||||
bool validSourceTexture( size_t id );
|
||||
// bool validTexture( size_t id, int type );
|
||||
// bool validTexture( lua_State *L, int index );
|
||||
Texture2D* texturesGetSourceTexture( size_t id );
|
||||
void texturesFreeTexture( size_t id );
|
||||
/* Image Loading. */
|
||||
@@ -91,6 +90,7 @@ int ltexturesGetTextureType( lua_State *L );
|
||||
int ltexturesGenTextureMipmaps( lua_State *L );
|
||||
int ltexturesSetTextureFilter( lua_State *L );
|
||||
int ltexturesSetTextureWrap( lua_State *L );
|
||||
int ltexturesGetTextureId( lua_State *L );
|
||||
int ltexturesGetTextureSize( lua_State *L );
|
||||
int ltexturesGetTextureMipmaps( lua_State *L );
|
||||
int ltexturesGetTextureFormat( lua_State *L );
|
||||
|
||||
Reference in New Issue
Block a user