mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-04-05 11:19:39 -04:00
Release 6.1.0 (#253)
This commit is contained in:
parent
6169614c11
commit
d652823abb
@ -267,18 +267,19 @@ public class BasicPbr
|
|||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
// Unbind (disconnect) shader from car.material[0]
|
// Unbind (disconnect) shader from car.material[0]
|
||||||
// to avoid UnloadMaterial() trying to unload it automatically
|
// to avoid UnloadMaterial() trying to unload it automatically
|
||||||
|
car.Materials[0].Shader = new();
|
||||||
UnloadMaterial(car.Materials[0]);
|
UnloadMaterial(car.Materials[0]);
|
||||||
car.Materials[0].Maps = null;
|
car.Materials[0].Maps = null;
|
||||||
UnloadModel(car);
|
UnloadModel(car);
|
||||||
|
|
||||||
|
floor.Materials[0].Shader = new();
|
||||||
UnloadMaterial(floor.Materials[0]);
|
UnloadMaterial(floor.Materials[0]);
|
||||||
floor.Materials[0].Maps = null;
|
floor.Materials[0].Maps = null;
|
||||||
UnloadModel(floor);
|
UnloadModel(floor);
|
||||||
|
|
||||||
UnloadShader(shader); // Unload Shader
|
UnloadShader(shader);
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow();
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -48,42 +48,49 @@ public class WriteDepth
|
|||||||
SetTargetFPS(60);
|
SetTargetFPS(60);
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
UpdateCamera(ref camera, CameraMode.Orbital);
|
// Main game loop
|
||||||
//----------------------------------------------------------------------------------
|
while (!WindowShouldClose())
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
UpdateCamera(ref camera, CameraMode.Orbital);
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Draw into our custom render texture (framebuffer)
|
|
||||||
BeginTextureMode(target);
|
|
||||||
ClearBackground(Color.White);
|
|
||||||
|
|
||||||
BeginMode3D(camera);
|
// Draw into our custom render texture (framebuffer)
|
||||||
BeginShaderMode(shader);
|
BeginTextureMode(target);
|
||||||
|
ClearBackground(Color.White);
|
||||||
|
|
||||||
DrawCubeWiresV(new Vector3(0.0f, 0.5f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Red);
|
BeginMode3D(camera);
|
||||||
DrawCubeV(new Vector3(0.0f, 0.5f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Purple);
|
BeginShaderMode(shader);
|
||||||
DrawCubeWiresV(new Vector3(0.0f, 0.5f, -1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.DarkGreen);
|
|
||||||
DrawCubeV(new Vector3(0.0f, 0.5f, -1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Yellow);
|
|
||||||
DrawGrid(10, 1.0f);
|
|
||||||
|
|
||||||
EndShaderMode();
|
DrawCubeWiresV(new Vector3(0.0f, 0.5f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Red);
|
||||||
EndMode3D();
|
DrawCubeV(new Vector3(0.0f, 0.5f, 1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Purple);
|
||||||
EndTextureMode();
|
DrawCubeWiresV(new Vector3(0.0f, 0.5f, -1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.DarkGreen);
|
||||||
|
DrawCubeV(new Vector3(0.0f, 0.5f, -1.0f), new Vector3(1.0f, 1.0f, 1.0f), Color.Yellow);
|
||||||
|
DrawGrid(10, 1.0f);
|
||||||
|
|
||||||
// Draw custom render texture
|
EndShaderMode();
|
||||||
BeginDrawing();
|
EndMode3D();
|
||||||
ClearBackground(Color.RayWhite);
|
EndTextureMode();
|
||||||
|
|
||||||
DrawTextureRec(
|
// Draw custom render texture
|
||||||
target.Texture,
|
BeginDrawing();
|
||||||
new Rectangle(0, 0, screenWidth, -screenHeight),
|
ClearBackground(Color.RayWhite);
|
||||||
Vector2.Zero,
|
|
||||||
Color.White
|
|
||||||
);
|
|
||||||
DrawFPS(10, 10);
|
|
||||||
|
|
||||||
EndDrawing();
|
DrawTextureRec(
|
||||||
//----------------------------------------------------------------------------------
|
target.Texture,
|
||||||
|
new Rectangle(0, 0, screenWidth, -screenHeight),
|
||||||
|
Vector2.Zero,
|
||||||
|
Color.White
|
||||||
|
);
|
||||||
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
@ -12,7 +12,7 @@ C# bindings for raylib, a simple and easy-to-use library to learn videogames pro
|
|||||||
|
|
||||||
[](https://github.com/ChrisDill/Raylib-cs/actions?query=workflow%3ABuild)
|
[](https://github.com/ChrisDill/Raylib-cs/actions?query=workflow%3ABuild)
|
||||||
|
|
||||||
Raylib-cs targets net5.0 and net6.0 and uses the [official 5.0 release](https://github.com/raysan5/raylib/releases/tag/5.0) to build the native libraries.
|
Raylib-cs targets net6.0 and uses the [official 5.0 release](https://github.com/raysan5/raylib/releases/tag/5.0) to build the native libraries.
|
||||||
|
|
||||||
## Installation - NuGet
|
## Installation - NuGet
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ the command won't work.
|
|||||||
|
|
||||||
2. Add [Raylib-cs/Raylib-cs.csproj](Raylib-cs/Raylib-cs.csproj) to your project as an existing project.
|
2. Add [Raylib-cs/Raylib-cs.csproj](Raylib-cs/Raylib-cs.csproj) to your project as an existing project.
|
||||||
|
|
||||||
3. Download the native libraries for the platforms you want to build for using the [official 5.0 release](https://github.com/raysan5/raylib/releases/tag/5.0).
|
3. Download/build the native libraries for the platforms you want using the [official 5.0 release](https://github.com/raysan5/raylib/releases/tag/5.0).
|
||||||
**NOTE: the MSVC version is required for Windows platforms**
|
**NOTE: the MSVC version is required for Windows platforms**
|
||||||
|
|
||||||
4. Setup the native libraries so they are in the same directory as the executable/can be found in the [search path](https://www.mono-project.com/docs/advanced/pinvoke/).
|
4. Setup the native libraries so they are in the same directory as the executable/can be found in the [search path](https://www.mono-project.com/docs/advanced/pinvoke/).
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetRaylibTag>5.0</TargetRaylibTag>
|
<TargetRaylibTag>5.0</TargetRaylibTag>
|
||||||
<Version>6.0.0</Version>
|
<Version>6.1.0</Version>
|
||||||
<PackageVersion>6.0.0</PackageVersion>
|
<PackageVersion>6.1.0</PackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
Loading…
x
Reference in New Issue
Block a user