2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-06-30 19:03:42 -04:00

Update to raylib 5.5 (#279)

This commit is contained in:
JupiterRider
2024-12-21 16:00:13 +01:00
committed by GitHub
parent 7b5b322a5b
commit a3dfd57b5a
23 changed files with 504 additions and 124 deletions

View File

@ -54,7 +54,7 @@ public class Picking3d
{
if (!collision.Hit)
{
ray = GetMouseRay(GetMousePosition(), camera);
ray = GetScreenToWorldRay(GetMousePosition(), camera);
// Check collision between ray and box
BoundingBox box = new(
@ -68,7 +68,7 @@ public class Picking3d
collision.Hit = false;
}
ray = GetMouseRay(GetMousePosition(), camera);
ray = GetScreenToWorldRay(GetMousePosition(), camera);
}
//----------------------------------------------------------------------------------
@ -119,4 +119,3 @@ public class Picking3d
return 0;
}
}

View File

@ -35,7 +35,6 @@ public class VrSimulator
VResolution = 1200,
HScreenSize = 0.133793f,
VScreenSize = 0.0669f,
VScreenCenter = 0.04678f,
EyeToScreenDistance = 0.041f,
LensSeparationDistance = 0.07f,
InterpupillaryDistance = 0.07f,
@ -188,4 +187,3 @@ public class VrSimulator
return 0;
}
}

View File

@ -99,7 +99,7 @@ public class MeshPicking
Color cursorColor = Color.White;
// Get ray and test against objects
ray = GetMouseRay(GetMousePosition(), camera);
ray = GetScreenToWorldRay(GetMousePosition(), camera);
// Check ray collision aginst ground quad
RayCollision groundHitInfo = GetRayCollisionQuad(ray, g0, g1, g2, g3);

View File

@ -104,7 +104,7 @@ public class ModelLoading
if (IsMouseButtonPressed(MouseButton.Left))
{
// Check collision between ray and box
if (GetRayCollisionBox(GetMouseRay(GetMousePosition(), camera), bounds).Hit)
if (GetRayCollisionBox(GetScreenToWorldRay(GetMousePosition(), camera), bounds).Hit)
{
selected = !selected;
}

View File

@ -216,9 +216,9 @@ public class SkyboxDemo
// STEP 1: Setup framebuffer
//------------------------------------------------------------------------------------------
uint rbo = Rlgl.LoadTextureDepth(size, size, true);
cubemap.Id = Rlgl.LoadTextureCubemap(null, size, format);
cubemap.Id = Rlgl.LoadTextureCubemap(null, size, format, 1);
uint fbo = Rlgl.LoadFramebuffer(size, size);
uint fbo = Rlgl.LoadFramebuffer();
Rlgl.FramebufferAttach(
fbo,
rbo,

View File

@ -160,7 +160,7 @@ public class HybridRender
RenderTexture2D target = new();
// Load an empty framebuffer
target.Id = Rlgl.LoadFramebuffer(width, height);
target.Id = Rlgl.LoadFramebuffer();
if (target.Id > 0)
{

View File

@ -109,7 +109,7 @@ public class WriteDepth
RenderTexture2D target = new();
// Load an empty framebuffer
target.Id = Rlgl.LoadFramebuffer(width, height);
target.Id = Rlgl.LoadFramebuffer();
if (target.Id > 0)
{

View File

@ -70,7 +70,7 @@ public class DrawRectangleRounded
}
if (drawRoundedLines)
{
DrawRectangleRoundedLines(rec, roundness, segments, (float)lineThick, ColorAlpha(Color.Maroon, 0.4f));
DrawRectangleRoundedLinesEx(rec, roundness, segments, (float)lineThick, ColorAlpha(Color.Maroon, 0.4f));
}
// Draw GUI controls