summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRay <[email protected]>2023-02-14 20:12:53 +0100
committerRay <[email protected]>2023-02-14 20:12:53 +0100
commit547819766faca80482371902acd908c0c4c3f7e0 (patch)
tree739ab81b6db1901267254dd2453234876f820d7e /examples
parent50d17393a5a3ece1e4290c86655c65b70ff390a4 (diff)
downloadraylib-547819766faca80482371902acd908c0c4c3f7e0.tar.gz
raylib-547819766faca80482371902acd908c0c4c3f7e0.zip
ADDED: Example project to VS2022 solution
Diffstat (limited to 'examples')
-rw-r--r--examples/shaders/shaders_write_depth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/shaders/shaders_write_depth.c b/examples/shaders/shaders_write_depth.c
index 317f6ac7..b7f69ddb 100644
--- a/examples/shaders/shaders_write_depth.c
+++ b/examples/shaders/shaders_write_depth.c
@@ -14,6 +14,7 @@
********************************************************************************************/
#include "raylib.h"
+
#include "rlgl.h"
#if defined(PLATFORM_DESKTOP)
@@ -27,10 +28,10 @@
//------------------------------------------------------------------------------------
// Load custom render texture, create a writable depth texture buffer
static RenderTexture2D LoadRenderTextureDepthTex(int width, int height);
+
// Unload render texture from GPU memory (VRAM)
static void UnloadRenderTextureDepthTex(RenderTexture2D target);
-
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
@@ -55,20 +56,19 @@ int main(void)
.target = (Vector3){ 0.0f, 0.5f, 0.0f }, // Camera looking at point
.up = (Vector3){ 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target)
.fovy = 45.0f, // Camera field-of-view Y
- .projection = CAMERA_PERSPECTIVE // Camera mode type
+ .projection = CAMERA_PERSPECTIVE // Camera projection type
};
- SetCameraMode(camera, CAMERA_ORBITAL);
-
- SetTargetFPS(60);
+ DisableCursor(); // Limit cursor to relative movement inside the window
+ SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
- while (!WindowShouldClose()) // Detect window close button or ESC key
+ while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
- UpdateCamera(&camera);
+ UpdateCamera(&camera, CAMERA_ORBITAL);
//----------------------------------------------------------------------------------
// Draw