From c35e253e2bdb643d1d6b8b0bc9ccb4c8b1c9f5d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 17 Mar 2024 20:41:54 +0000 Subject: [PATCH 1/3] Update raylib_api.* by CI --- parser/output/raylib_api.json | 14 ++++++++++---- parser/output/raylib_api.lua | 14 ++++++++++---- parser/output/raylib_api.txt | 15 ++++++++++----- parser/output/raylib_api.xml | 11 ++++++----- 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/parser/output/raylib_api.json b/parser/output/raylib_api.json index ec8d57a8ce02..427e03779a69 100644 --- a/parser/output/raylib_api.json +++ b/parser/output/raylib_api.json @@ -335,6 +335,12 @@ "type": "UNKNOWN", "value": "SHADER_LOC_MAP_METALNESS", "description": "" + }, + { + "name": "GetMouseRay", + "type": "UNKNOWN", + "value": "GetScreenToWorldRay", + "description": "Compatibility hack for previous raylib versions" } ], "structs": [ @@ -3873,12 +3879,12 @@ }, { "name": "GetScreenToWorldRay", - "description": "Get a ray trace from mouse position", + "description": "Get a ray trace from screen position (i.e mouse)", "returnType": "Ray", "params": [ { "type": "Vector2", - "name": "mousePosition" + "name": "position" }, { "type": "Camera", @@ -3888,12 +3894,12 @@ }, { "name": "GetScreenToWorldRayEx", - "description": "Get a ray trace from mouse position in a viewport", + "description": "Get a ray trace from screen position (i.e mouse) in a viewport", "returnType": "Ray", "params": [ { "type": "Vector2", - "name": "mousePosition" + "name": "position" }, { "type": "Camera", diff --git a/parser/output/raylib_api.lua b/parser/output/raylib_api.lua index 01c1abf307b7..20315afd065e 100644 --- a/parser/output/raylib_api.lua +++ b/parser/output/raylib_api.lua @@ -335,6 +335,12 @@ return { type = "UNKNOWN", value = "SHADER_LOC_MAP_METALNESS", description = "" + }, + { + name = "GetMouseRay", + type = "UNKNOWN", + value = "GetScreenToWorldRay", + description = "Compatibility hack for previous raylib versions" } }, structs = { @@ -3636,19 +3642,19 @@ return { }, { name = "GetScreenToWorldRay", - description = "Get a ray trace from mouse position", + description = "Get a ray trace from screen position (i.e mouse)", returnType = "Ray", params = { - {type = "Vector2", name = "mousePosition"}, + {type = "Vector2", name = "position"}, {type = "Camera", name = "camera"} } }, { name = "GetScreenToWorldRayEx", - description = "Get a ray trace from mouse position in a viewport", + description = "Get a ray trace from screen position (i.e mouse) in a viewport", returnType = "Ray", params = { - {type = "Vector2", name = "mousePosition"}, + {type = "Vector2", name = "position"}, {type = "Camera", name = "camera"}, {type = "float", name = "width"}, {type = "float", name = "height"} diff --git a/parser/output/raylib_api.txt b/parser/output/raylib_api.txt index d49ac33e4f3a..6a1c17c056bc 100644 --- a/parser/output/raylib_api.txt +++ b/parser/output/raylib_api.txt @@ -1,5 +1,5 @@ -Defines found: 56 +Defines found: 57 Define 001: RAYLIB_H Name: RAYLIB_H @@ -281,6 +281,11 @@ Define 056: SHADER_LOC_MAP_SPECULAR Type: UNKNOWN Value: SHADER_LOC_MAP_METALNESS Description: +Define 057: GetMouseRay + Name: GetMouseRay + Type: UNKNOWN + Value: GetScreenToWorldRay + Description: Compatibility hack for previous raylib versions Structures found: 34 @@ -1424,14 +1429,14 @@ Function 083: UnloadShader() (1 input parameters) Function 084: GetScreenToWorldRay() (2 input parameters) Name: GetScreenToWorldRay Return type: Ray - Description: Get a ray trace from mouse position - Param[1]: mousePosition (type: Vector2) + Description: Get a ray trace from screen position (i.e mouse) + Param[1]: position (type: Vector2) Param[2]: camera (type: Camera) Function 085: GetScreenToWorldRayEx() (4 input parameters) Name: GetScreenToWorldRayEx Return type: Ray - Description: Get a ray trace from mouse position in a viewport - Param[1]: mousePosition (type: Vector2) + Description: Get a ray trace from screen position (i.e mouse) in a viewport + Param[1]: position (type: Vector2) Param[2]: camera (type: Camera) Param[3]: width (type: float) Param[4]: height (type: float) diff --git a/parser/output/raylib_api.xml b/parser/output/raylib_api.xml index 45697f24d7ae..c34c4c5ae2e0 100644 --- a/parser/output/raylib_api.xml +++ b/parser/output/raylib_api.xml @@ -1,6 +1,6 @@ - + @@ -57,6 +57,7 @@ + @@ -902,12 +903,12 @@ - - + + - - + + From e26e15c79dae4dbd5777419a3f040cf8a69ef3b4 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Fri, 27 Sep 2024 10:08:09 -0700 Subject: [PATCH 2/3] Add comment that draw pixel uses geometry and may be slow --- src/raylib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index f298fd731985..106a96ae5d5e 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1234,8 +1234,8 @@ RLAPI Texture2D GetShapesTexture(void); // Get t RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing // Basic shapes drawing functions -RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel -RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) +RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care] +RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care] RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines) RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads) From 8adeb94b1882af12ddb82d0c9e4825947e65f3bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Sep 2024 17:08:36 +0000 Subject: [PATCH 3/3] Update raylib_api.* by CI --- parser/output/raylib_api.json | 4 ++-- parser/output/raylib_api.lua | 4 ++-- parser/output/raylib_api.txt | 4 ++-- parser/output/raylib_api.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parser/output/raylib_api.json b/parser/output/raylib_api.json index 2e599496d95c..ca3b276cf0a8 100644 --- a/parser/output/raylib_api.json +++ b/parser/output/raylib_api.json @@ -5274,7 +5274,7 @@ }, { "name": "DrawPixel", - "description": "Draw a pixel", + "description": "Draw a pixel using geometry [Can be slow, use with care]", "returnType": "void", "params": [ { @@ -5293,7 +5293,7 @@ }, { "name": "DrawPixelV", - "description": "Draw a pixel (Vector version)", + "description": "Draw a pixel using geometry (Vector version) [Can be slow, use with care]", "returnType": "void", "params": [ { diff --git a/parser/output/raylib_api.lua b/parser/output/raylib_api.lua index 69ae07eda314..b010e19cf13f 100644 --- a/parser/output/raylib_api.lua +++ b/parser/output/raylib_api.lua @@ -4614,7 +4614,7 @@ return { }, { name = "DrawPixel", - description = "Draw a pixel", + description = "Draw a pixel using geometry [Can be slow, use with care]", returnType = "void", params = { {type = "int", name = "posX"}, @@ -4624,7 +4624,7 @@ return { }, { name = "DrawPixelV", - description = "Draw a pixel (Vector version)", + description = "Draw a pixel using geometry (Vector version) [Can be slow, use with care]", returnType = "void", params = { {type = "Vector2", name = "position"}, diff --git a/parser/output/raylib_api.txt b/parser/output/raylib_api.txt index 458d12da0642..19abf2d00350 100644 --- a/parser/output/raylib_api.txt +++ b/parser/output/raylib_api.txt @@ -2102,14 +2102,14 @@ Function 207: GetShapesTextureRectangle() (0 input parameters) Function 208: DrawPixel() (3 input parameters) Name: DrawPixel Return type: void - Description: Draw a pixel + Description: Draw a pixel using geometry [Can be slow, use with care] Param[1]: posX (type: int) Param[2]: posY (type: int) Param[3]: color (type: Color) Function 209: DrawPixelV() (2 input parameters) Name: DrawPixelV Return type: void - Description: Draw a pixel (Vector version) + Description: Draw a pixel using geometry (Vector version) [Can be slow, use with care] Param[1]: position (type: Vector2) Param[2]: color (type: Color) Function 210: DrawLine() (5 input parameters) diff --git a/parser/output/raylib_api.xml b/parser/output/raylib_api.xml index 140f4910d273..13afbcb64cf7 100644 --- a/parser/output/raylib_api.xml +++ b/parser/output/raylib_api.xml @@ -1297,12 +1297,12 @@ - + - +