Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Apr 24, 2024
1 parent 1a67dfd commit 07a0918
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 39 deletions.
168 changes: 146 additions & 22 deletions api/rlgl.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "RLGL_VERSION",
"type": "STRING",
"value": "4.5",
"value": "5.0",
"description": ""
},
{
Expand Down Expand Up @@ -504,6 +504,18 @@
"value": 32773,
"description": "GL_BLEND_COLOR"
},
{
"name": "RL_READ_FRAMEBUFFER",
"type": "INT",
"value": 36008,
"description": "GL_READ_FRAMEBUFFER"
},
{
"name": "RL_DRAW_FRAMEBUFFER",
"type": "INT",
"value": 36009,
"description": "GL_DRAW_FRAMEBUFFER"
},
{
"name": "RL_MATRIX_TYPE",
"type": "GUARD",
Expand Down Expand Up @@ -678,6 +690,18 @@
"value": 34046,
"description": ""
},
{
"name": "GL_PROGRAM_POINT_SIZE",
"type": "INT",
"value": 34370,
"description": ""
},
{
"name": "GL_LINE_WIDTH",
"type": "INT",
"value": 2849,
"description": ""
},
{
"name": "GL_UNSIGNED_SHORT_5_6_5",
"type": "INT",
Expand Down Expand Up @@ -726,41 +750,77 @@
"value": "GL_FRAMEBUFFER",
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION",
"type": "INT",
"value": 0,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD",
"type": "INT",
"value": 1,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL",
"type": "INT",
"value": 2,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR",
"type": "INT",
"value": 3,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT",
"type": "INT",
"value": 4,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2",
"type": "INT",
"value": 5,
"description": ""
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION",
"type": "STRING",
"value": "vertexPosition",
"description": "Bound by default to shader location: 0"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION"
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD",
"type": "STRING",
"value": "vertexTexCoord",
"description": "Bound by default to shader location: 1"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD"
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL",
"type": "STRING",
"value": "vertexNormal",
"description": "Bound by default to shader location: 2"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL"
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR",
"type": "STRING",
"value": "vertexColor",
"description": "Bound by default to shader location: 3"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR"
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT",
"type": "STRING",
"value": "vertexTangent",
"description": "Bound by default to shader location: 4"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT"
},
{
"name": "RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2",
"type": "STRING",
"value": "vertexTexCoord2",
"description": "Bound by default to shader location: 5"
"description": "Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2"
},
{
"name": "RL_DEFAULT_SHADER_UNIFORM_NAME_MVP",
Expand Down Expand Up @@ -816,6 +876,12 @@
"value": "texture2",
"description": "texture2 (texture slot active 2)"
},
{
"name": "rlMatrixToFloat(mat)",
"type": "MACRO",
"value": "(rlMatrixToFloatV(mat).v)",
"description": "Get float vector for Matrix"
},
{
"name": "MIN(a,b)",
"type": "MACRO",
Expand Down Expand Up @@ -951,9 +1017,9 @@
"description": "OpenGL Vertex Array Object id"
},
{
"type": "unsigned int[4]",
"type": "unsigned int[5]",
"name": "vboId",
"description": "OpenGL Vertex Buffer Objects id (4 types of vertex data)"
"description": "OpenGL Vertex Buffer Objects id (5 types of vertex data)"
}
]
},
Expand Down Expand Up @@ -2068,6 +2134,31 @@
}
]
},
{
"name": "rlSetClipPlanes",
"description": "Set clip planes distances",
"returnType": "void",
"params": [
{
"type": "double",
"name": "near"
},
{
"type": "double",
"name": "far"
}
]
},
{
"name": "rlGetCullDistanceNear",
"description": "Get cull plane distance near",
"returnType": "double"
},
{
"name": "rlGetCullDistanceFar",
"description": "Get cull plane distance far",
"returnType": "double"
},
{
"name": "rlBegin",
"description": "Initialize drawing mode (how to organize vertex)",
Expand Down Expand Up @@ -2441,6 +2532,11 @@
"description": "Disable render texture (fbo), return to default framebuffer",
"returnType": "void"
},
{
"name": "rlGetActiveFramebuffer",
"description": "Get the currently active render texture (fbo), 0 for default framebuffer",
"returnType": "unsigned int"
},
{
"name": "rlActiveDrawBuffers",
"description": "Activate multiple draw color buffers",
Expand Down Expand Up @@ -2495,6 +2591,21 @@
}
]
},
{
"name": "rlBindFramebuffer",
"description": "Bind framebuffer (FBO)",
"returnType": "void",
"params": [
{
"type": "unsigned int",
"name": "target"
},
{
"type": "unsigned int",
"name": "framebuffer"
}
]
},
{
"name": "rlEnableColorBlend",
"description": "Enable color blending",
Expand Down Expand Up @@ -2535,6 +2646,29 @@
"description": "Disable backface culling",
"returnType": "void"
},
{
"name": "rlColorMask",
"description": "Color mask control",
"returnType": "void",
"params": [
{
"type": "bool",
"name": "r"
},
{
"type": "bool",
"name": "g"
},
{
"type": "bool",
"name": "b"
},
{
"type": "bool",
"name": "a"
}
]
},
{
"name": "rlSetCullFace",
"description": "Set face culling mode",
Expand Down Expand Up @@ -3024,8 +3158,8 @@
"name": "stride"
},
{
"type": "const void *",
"name": "pointer"
"type": "int",
"name": "offset"
}
]
},
Expand Down Expand Up @@ -3356,17 +3490,7 @@
{
"name": "rlLoadFramebuffer",
"description": "Load an empty framebuffer",
"returnType": "unsigned int",
"params": [
{
"type": "int",
"name": "width"
},
{
"type": "int",
"name": "height"
}
]
"returnType": "unsigned int"
},
{
"name": "rlFramebufferAttach",
Expand Down
20 changes: 10 additions & 10 deletions mangle_names.patch
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ index d8568d9..5f38019 100644
#endif

diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index 211a6cb..1cb2689 100644
index de289ca..dd087cd 100644
--- a/src/platforms/rcore_desktop.c
+++ b/src/platforms/rcore_desktop.c
@@ -951,7 +951,7 @@ const char *GetClipboardText(void)
Expand Down Expand Up @@ -446,7 +446,7 @@ index b946322..4727c69 100644
// Mesh management functions
RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
diff --git a/src/rcore.c b/src/rcore.c
index d2e4a35..acb156c 100644
index b229589..1f09fb4 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -638,16 +638,16 @@ void InitWindow(int width, int height, const char *title)
Expand Down Expand Up @@ -497,10 +497,10 @@ index d2e4a35..acb156c 100644
#endif

diff --git a/src/rmodels.c b/src/rmodels.c
index e669a2f..a967b84 100644
index 5efc322..26b8636 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -3574,13 +3574,13 @@ void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float
@@ -3580,13 +3580,13 @@ void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float
// Draw a billboard
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint)
{
Expand All @@ -516,16 +516,16 @@ index e669a2f..a967b84 100644
{
// NOTE: Billboard locked on axis-Y
Vector3 up = { 0.0f, 1.0f, 0.0f };
@@ -3588,7 +3588,7 @@ void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector
DrawBillboardPro(camera, texture, source, position, up, size, Vector2Zero(), 0.0f, tint);
}
@@ -3596,7 +3596,7 @@ void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector

// Draw a billboard with additional parameters
// NOTE: Size defines the destination rectangle size, stretching the source texture as required
-void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint)
+void DrawBillboardPro(Camera camera, Texture2D texture, rlRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint)
{
// NOTE: Billboard size will maintain source rectangle aspect ratio, size will represent billboard width
Vector2 sizeRatio = { size.x*fabsf((float)source.width/source.height), size.y };
@@ -4807,7 +4807,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
@@ -4815,7 +4815,7 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
}
else // Check if image is provided as image path
{
Expand All @@ -535,7 +535,7 @@ index e669a2f..a967b84 100644
}
else if (cgltfImage->buffer_view->buffer->data != NULL) // Check if image is provided as data buffer
diff --git a/src/rshapes.c b/src/rshapes.c
index e2b55bc..db1aebd 100644
index 9020195..7231363 100644
--- a/src/rshapes.c
+++ b/src/rshapes.c
@@ -80,7 +80,7 @@
Expand Down Expand Up @@ -995,7 +995,7 @@ index 47f3e06..c627686 100644
// Save data properly in sprite font
font.glyphs[i].value = charId;
diff --git a/src/rtextures.c b/src/rtextures.c
index 90c0de2..7ba0962 100644
index 0658a68..3e117aa 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -271,7 +271,7 @@ static Vector4 *LoadImageDataNormalized(Image image); // Load pixel data f
Expand Down
Loading

0 comments on commit 07a0918

Please sign in to comment.