Skip to content

Commit

Permalink
Update to master (#3780)
Browse files Browse the repository at this point in the history
* Update rtext.c

* Add gamepad support to PLATFORM_DESKTOP_SDL (#3776)

Co-authored-by: Arthur <[email protected]>

* [rcore] Fix `GetFileNameWithoutExt()` (#3771)

* Update rcore.c

fix [rcore] GetFileNameWithoutExt

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Review formating and some defines naming consistency

* Added viewport independent raycast (#3709)

* added viewport independent raycast

* Renamed GetMouseRayEx to GetViewRay

* Update raylib_api.* by CI

* REVIEWED: `rlLoadFramebuffer()`, parameters not required

* Reorder functions

* Update raylib_api.* by CI

* Update rtext.c (#3777) (#3779)

* REVIEWED: `rlLoadFramebuffer()`

---------

Co-authored-by: A <[email protected]>
Co-authored-by: Arthur <[email protected]>
Co-authored-by: oblerion <[email protected]>
Co-authored-by: Luís Almeida <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
6 people authored Feb 4, 2024
1 parent 00d1eb2 commit dad4a31
Show file tree
Hide file tree
Showing 14 changed files with 790 additions and 599 deletions.
2 changes: 1 addition & 1 deletion examples/models/models_skybox.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int s
unsigned int rbo = rlLoadTextureDepth(size, size, true);
cubemap.id = rlLoadTextureCubemap(0, size, format);

unsigned int fbo = rlLoadFramebuffer(size, size);
unsigned int fbo = rlLoadFramebuffer();
rlFramebufferAttach(fbo, rbo, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_RENDERBUFFER, 0);
rlFramebufferAttach(fbo, cubemap.id, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_CUBEMAP_POSITIVE_X, 0);

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_deferred_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int main(void)

// Initialize the G-buffer
GBuffer gBuffer = { 0 };
gBuffer.framebuffer = rlLoadFramebuffer(screenWidth, screenHeight);
gBuffer.framebuffer = rlLoadFramebuffer();

if (!gBuffer.framebuffer)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_hybrid_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
{
RenderTexture2D target = { 0 };

target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
target.id = rlLoadFramebuffer(); // Load an empty framebuffer

if (target.id > 0)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_shadowmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ RenderTexture2D LoadShadowmapRenderTexture(int width, int height)
{
RenderTexture2D target = { 0 };

target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
target.id = rlLoadFramebuffer(); // Load an empty framebuffer
target.texture.width = width;
target.texture.height = height;

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_write_depth.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
{
RenderTexture2D target = { 0 };

target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
target.id = rlLoadFramebuffer(); // Load an empty framebuffer

if (target.id > 0)
{
Expand Down
79 changes: 51 additions & 28 deletions parser/output/raylib_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3887,24 +3887,25 @@
]
},
{
"name": "GetCameraMatrix",
"description": "Get camera transform matrix (view matrix)",
"returnType": "Matrix",
"name": "GetViewRay",
"description": "Get a ray trace from mouse position in a viewport",
"returnType": "Ray",
"params": [
{
"type": "Vector2",
"name": "mousePosition"
},
{
"type": "Camera",
"name": "camera"
}
]
},
{
"name": "GetCameraMatrix2D",
"description": "Get camera 2d transform matrix",
"returnType": "Matrix",
"params": [
},
{
"type": "Camera2D",
"name": "camera"
"type": "float",
"name": "width"
},
{
"type": "float",
"name": "height"
}
]
},
Expand All @@ -3923,21 +3924,6 @@
}
]
},
{
"name": "GetScreenToWorld2D",
"description": "Get the world space position for a 2d camera screen space position",
"returnType": "Vector2",
"params": [
{
"type": "Vector2",
"name": "position"
},
{
"type": "Camera2D",
"name": "camera"
}
]
},
{
"name": "GetWorldToScreenEx",
"description": "Get size position for a 3d world space position",
Expand Down Expand Up @@ -3976,6 +3962,43 @@
}
]
},
{
"name": "GetScreenToWorld2D",
"description": "Get the world space position for a 2d camera screen space position",
"returnType": "Vector2",
"params": [
{
"type": "Vector2",
"name": "position"
},
{
"type": "Camera2D",
"name": "camera"
}
]
},
{
"name": "GetCameraMatrix",
"description": "Get camera transform matrix (view matrix)",
"returnType": "Matrix",
"params": [
{
"type": "Camera",
"name": "camera"
}
]
},
{
"name": "GetCameraMatrix2D",
"description": "Get camera 2d transform matrix",
"returnType": "Matrix",
"params": [
{
"type": "Camera2D",
"name": "camera"
}
]
},
{
"name": "SetTargetFPS",
"description": "Set target FPS (maximum)",
Expand Down
53 changes: 32 additions & 21 deletions parser/output/raylib_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3644,19 +3644,14 @@ return {
}
},
{
name = "GetCameraMatrix",
description = "Get camera transform matrix (view matrix)",
returnType = "Matrix",
params = {
{type = "Camera", name = "camera"}
}
},
{
name = "GetCameraMatrix2D",
description = "Get camera 2d transform matrix",
returnType = "Matrix",
name = "GetViewRay",
description = "Get a ray trace from mouse position in a viewport",
returnType = "Ray",
params = {
{type = "Camera2D", name = "camera"}
{type = "Vector2", name = "mousePosition"},
{type = "Camera", name = "camera"},
{type = "float", name = "width"},
{type = "float", name = "height"}
}
},
{
Expand All @@ -3668,15 +3663,6 @@ return {
{type = "Camera", name = "camera"}
}
},
{
name = "GetScreenToWorld2D",
description = "Get the world space position for a 2d camera screen space position",
returnType = "Vector2",
params = {
{type = "Vector2", name = "position"},
{type = "Camera2D", name = "camera"}
}
},
{
name = "GetWorldToScreenEx",
description = "Get size position for a 3d world space position",
Expand All @@ -3697,6 +3683,31 @@ return {
{type = "Camera2D", name = "camera"}
}
},
{
name = "GetScreenToWorld2D",
description = "Get the world space position for a 2d camera screen space position",
returnType = "Vector2",
params = {
{type = "Vector2", name = "position"},
{type = "Camera2D", name = "camera"}
}
},
{
name = "GetCameraMatrix",
description = "Get camera transform matrix (view matrix)",
returnType = "Matrix",
params = {
{type = "Camera", name = "camera"}
}
},
{
name = "GetCameraMatrix2D",
description = "Get camera 2d transform matrix",
returnType = "Matrix",
params = {
{type = "Camera2D", name = "camera"}
}
},
{
name = "SetTargetFPS",
description = "Set target FPS (maximum)",
Expand Down
Loading

0 comments on commit dad4a31

Please sign in to comment.