Skip to content

Commit dad4a31

Browse files
raysan5The-Night-WatchArthuroblerionluis605
authored
Update to master (#3780)
* 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>
1 parent 00d1eb2 commit dad4a31

14 files changed

+790
-599
lines changed

examples/models/models_skybox.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int s
194194
unsigned int rbo = rlLoadTextureDepth(size, size, true);
195195
cubemap.id = rlLoadTextureCubemap(0, size, format);
196196

197-
unsigned int fbo = rlLoadFramebuffer(size, size);
197+
unsigned int fbo = rlLoadFramebuffer();
198198
rlFramebufferAttach(fbo, rbo, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_RENDERBUFFER, 0);
199199
rlFramebufferAttach(fbo, cubemap.id, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_CUBEMAP_POSITIVE_X, 0);
200200

examples/shaders/shaders_deferred_render.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(void)
8585

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

9090
if (!gBuffer.framebuffer)
9191
{

examples/shaders/shaders_hybrid_render.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
158158
{
159159
RenderTexture2D target = { 0 };
160160

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

163163
if (target.id > 0)
164164
{

examples/shaders/shaders_shadowmap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ RenderTexture2D LoadShadowmapRenderTexture(int width, int height)
203203
{
204204
RenderTexture2D target = { 0 };
205205

206-
target.id = rlLoadFramebuffer(width, height); // Load an empty framebuffer
206+
target.id = rlLoadFramebuffer(); // Load an empty framebuffer
207207
target.texture.width = width;
208208
target.texture.height = height;
209209

examples/shaders/shaders_write_depth.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ RenderTexture2D LoadRenderTextureDepthTex(int width, int height)
117117
{
118118
RenderTexture2D target = { 0 };
119119

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

122122
if (target.id > 0)
123123
{

parser/output/raylib_api.json

+51-28
Original file line numberDiff line numberDiff line change
@@ -3887,24 +3887,25 @@
38873887
]
38883888
},
38893889
{
3890-
"name": "GetCameraMatrix",
3891-
"description": "Get camera transform matrix (view matrix)",
3892-
"returnType": "Matrix",
3890+
"name": "GetViewRay",
3891+
"description": "Get a ray trace from mouse position in a viewport",
3892+
"returnType": "Ray",
38933893
"params": [
3894+
{
3895+
"type": "Vector2",
3896+
"name": "mousePosition"
3897+
},
38943898
{
38953899
"type": "Camera",
38963900
"name": "camera"
3897-
}
3898-
]
3899-
},
3900-
{
3901-
"name": "GetCameraMatrix2D",
3902-
"description": "Get camera 2d transform matrix",
3903-
"returnType": "Matrix",
3904-
"params": [
3901+
},
39053902
{
3906-
"type": "Camera2D",
3907-
"name": "camera"
3903+
"type": "float",
3904+
"name": "width"
3905+
},
3906+
{
3907+
"type": "float",
3908+
"name": "height"
39083909
}
39093910
]
39103911
},
@@ -3923,21 +3924,6 @@
39233924
}
39243925
]
39253926
},
3926-
{
3927-
"name": "GetScreenToWorld2D",
3928-
"description": "Get the world space position for a 2d camera screen space position",
3929-
"returnType": "Vector2",
3930-
"params": [
3931-
{
3932-
"type": "Vector2",
3933-
"name": "position"
3934-
},
3935-
{
3936-
"type": "Camera2D",
3937-
"name": "camera"
3938-
}
3939-
]
3940-
},
39413927
{
39423928
"name": "GetWorldToScreenEx",
39433929
"description": "Get size position for a 3d world space position",
@@ -3976,6 +3962,43 @@
39763962
}
39773963
]
39783964
},
3965+
{
3966+
"name": "GetScreenToWorld2D",
3967+
"description": "Get the world space position for a 2d camera screen space position",
3968+
"returnType": "Vector2",
3969+
"params": [
3970+
{
3971+
"type": "Vector2",
3972+
"name": "position"
3973+
},
3974+
{
3975+
"type": "Camera2D",
3976+
"name": "camera"
3977+
}
3978+
]
3979+
},
3980+
{
3981+
"name": "GetCameraMatrix",
3982+
"description": "Get camera transform matrix (view matrix)",
3983+
"returnType": "Matrix",
3984+
"params": [
3985+
{
3986+
"type": "Camera",
3987+
"name": "camera"
3988+
}
3989+
]
3990+
},
3991+
{
3992+
"name": "GetCameraMatrix2D",
3993+
"description": "Get camera 2d transform matrix",
3994+
"returnType": "Matrix",
3995+
"params": [
3996+
{
3997+
"type": "Camera2D",
3998+
"name": "camera"
3999+
}
4000+
]
4001+
},
39794002
{
39804003
"name": "SetTargetFPS",
39814004
"description": "Set target FPS (maximum)",

parser/output/raylib_api.lua

+32-21
Original file line numberDiff line numberDiff line change
@@ -3644,19 +3644,14 @@ return {
36443644
}
36453645
},
36463646
{
3647-
name = "GetCameraMatrix",
3648-
description = "Get camera transform matrix (view matrix)",
3649-
returnType = "Matrix",
3650-
params = {
3651-
{type = "Camera", name = "camera"}
3652-
}
3653-
},
3654-
{
3655-
name = "GetCameraMatrix2D",
3656-
description = "Get camera 2d transform matrix",
3657-
returnType = "Matrix",
3647+
name = "GetViewRay",
3648+
description = "Get a ray trace from mouse position in a viewport",
3649+
returnType = "Ray",
36583650
params = {
3659-
{type = "Camera2D", name = "camera"}
3651+
{type = "Vector2", name = "mousePosition"},
3652+
{type = "Camera", name = "camera"},
3653+
{type = "float", name = "width"},
3654+
{type = "float", name = "height"}
36603655
}
36613656
},
36623657
{
@@ -3668,15 +3663,6 @@ return {
36683663
{type = "Camera", name = "camera"}
36693664
}
36703665
},
3671-
{
3672-
name = "GetScreenToWorld2D",
3673-
description = "Get the world space position for a 2d camera screen space position",
3674-
returnType = "Vector2",
3675-
params = {
3676-
{type = "Vector2", name = "position"},
3677-
{type = "Camera2D", name = "camera"}
3678-
}
3679-
},
36803666
{
36813667
name = "GetWorldToScreenEx",
36823668
description = "Get size position for a 3d world space position",
@@ -3697,6 +3683,31 @@ return {
36973683
{type = "Camera2D", name = "camera"}
36983684
}
36993685
},
3686+
{
3687+
name = "GetScreenToWorld2D",
3688+
description = "Get the world space position for a 2d camera screen space position",
3689+
returnType = "Vector2",
3690+
params = {
3691+
{type = "Vector2", name = "position"},
3692+
{type = "Camera2D", name = "camera"}
3693+
}
3694+
},
3695+
{
3696+
name = "GetCameraMatrix",
3697+
description = "Get camera transform matrix (view matrix)",
3698+
returnType = "Matrix",
3699+
params = {
3700+
{type = "Camera", name = "camera"}
3701+
}
3702+
},
3703+
{
3704+
name = "GetCameraMatrix2D",
3705+
description = "Get camera 2d transform matrix",
3706+
returnType = "Matrix",
3707+
params = {
3708+
{type = "Camera2D", name = "camera"}
3709+
}
3710+
},
37003711
{
37013712
name = "SetTargetFPS",
37023713
description = "Set target FPS (maximum)",

0 commit comments

Comments
 (0)