Update binding.

This commit is contained in:
Astie Teddy 2020-09-18 18:10:29 +02:00
parent 2914f26360
commit 3e28c06db5
4 changed files with 44 additions and 19 deletions

2
raylib

@ -1 +1 @@
Subproject commit fa2c1146366557e5ce779d8b5c2575579dfa6389
Subproject commit 79d63e6ca1a1fa3b9e5e8647c522157e616f023f

View File

@ -90,11 +90,38 @@ ffi.cdef [[
typedef struct RenderTexture2D {
unsigned int id;
Texture2D texture;
Texture2D depth;
Texture texture;
Texture depth;
} RenderTexture2D;
typedef RenderTexture2D RenderTexture;
typedef enum { OPENGL_11 = 1, OPENGL_21, OPENGL_33, OPENGL_ES_20 } GlVersion;
typedef enum {
RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
RL_ATTACHMENT_COLOR_CHANNEL1,
RL_ATTACHMENT_COLOR_CHANNEL2,
RL_ATTACHMENT_COLOR_CHANNEL3,
RL_ATTACHMENT_COLOR_CHANNEL4,
RL_ATTACHMENT_COLOR_CHANNEL5,
RL_ATTACHMENT_COLOR_CHANNEL6,
RL_ATTACHMENT_COLOR_CHANNEL7,
RL_ATTACHMENT_DEPTH = 100,
RL_ATTACHMENT_STENCIL = 200,
} FramebufferAttachType;
typedef enum {
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X,
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y,
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y,
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z,
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z,
RL_ATTACHMENT_TEXTURE2D = 100,
RL_ATTACHMENT_RENDERBUFFER = 200,
} FramebufferTexType;
typedef struct NPatchInfo {
Rectangle sourceRec;
int left;

View File

@ -383,9 +383,9 @@ void SetMatrixProjection(Matrix proj)
void SetMatrixModelview(Matrix view)
Matrix GetMatrixModelview(void)
Matrix GetMatrixProjection(void)
Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size)
Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size)
Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size)
TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size)
TextureCubemap GenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size)
TextureCubemap GenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size)
Texture2D GenTextureBRDF(Shader shader, int size)
void BeginShaderMode(Shader shader)
void EndShaderMode(void)

View File

@ -16,14 +16,16 @@ void rlVertex2f(float x, float y)
void rlVertex3f(float x, float y, float z)
void rlTexCoord2f(float x, float y)
void rlNormal3f(float x, float y, float z)
void rlColor4ub(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void rlColor3f(float x, float y, float z)
void rlColor4f(float x, float y, float z, float w)
void rlEnableTexture(unsigned int id)
void rlDisableTexture(void)
void rlTextureParameters(unsigned int id, int param, int value)
void rlEnableRenderTexture(unsigned int id)
void rlDisableRenderTexture(void)
void rlEnableShader(unsigned int id)
void rlDisableShader(void)
void rlEnableFramebuffer(unsigned int id)
void rlDisableFramebuffer(void)
void rlEnableDepthTest(void)
void rlDisableDepthTest(void)
void rlEnableBackfaceCulling(void)
@ -33,12 +35,7 @@ void rlDisableScissorTest(void)
void rlScissor(int x, int y, int width, int height)
void rlEnableWireMode(void)
void rlDisableWireMode(void)
void rlDeleteTextures(unsigned int id)
void rlDeleteRenderTextures(RenderTexture2D target)
void rlDeleteShader(unsigned int id)
void rlDeleteVertexArrays(unsigned int id)
void rlDeleteBuffers(unsigned int id)
void rlClearColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void rlClearScreenBuffers(void)
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer, int size, bool dynamic)
@ -52,7 +49,7 @@ void rlSetDebugMarker(const char *text)
void rlSetBlendMode(int glSrcFactor, int glDstFactor, int glEquation)
void rlLoadExtensions(void *loader)
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
unsigned int rlLoadTextureDepth(int width, int height, int bits, bool useRenderBuffer)
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data)
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
@ -60,9 +57,10 @@ void rlUnloadTexture(unsigned int id)
void rlGenerateMipmaps(Texture2D *texture)
void *rlReadTexturePixels(Texture2D texture)
unsigned char *rlReadScreenPixels(int width, int height)
RenderTexture2D rlLoadRenderTexture(int width, int height, int format, int depthBits, bool useDepthTexture)
void rlRenderTextureAttach(RenderTexture target, unsigned int id, int attachType)
bool rlRenderTextureComplete(RenderTexture target)
unsigned int rlLoadFramebuffer(int width, int height)
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType)
bool rlFramebufferComplete(unsigned int id)
void rlUnloadFramebuffer(unsigned int id)
void rlLoadMesh(Mesh *mesh, bool dynamic)
void rlUpdateMesh(Mesh mesh, int buffer, int num)
void rlUpdateMeshAt(Mesh mesh, int buffer, int num, int index)