summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-06 22:49:41 +0200
committerRay <[email protected]>2021-04-06 22:49:41 +0200
commit71b86bf4d06d3d0c74ebb1b898da36414815d2b1 (patch)
tree94fbb8e612f52d8f7440464dac78d4e1c0bf0706 /src/raylib.h
parentfd663024eadae3c0ab0e86e0f0d6ad64a95f4cac (diff)
downloadraylib-71b86bf4d06d3d0c74ebb1b898da36414815d2b1.tar.gz
raylib-71b86bf4d06d3d0c74ebb1b898da36414815d2b1.zip
REDESIGNED: Vr stereo rendering
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 35981366..41a5fbf1 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -463,6 +463,8 @@ typedef struct VrDeviceInfo {
// VR Stereo rendering configuration for simulator
typedef struct VrStereoConfig {
+ Matrix projection[2]; // VR projection matrices (per eye)
+ Matrix viewOffset[2]; // VR view offset matrices (per eye)
float leftLensCenter[2]; // VR left lens center
float rightLensCenter[2]; // VR right lens center
float leftScreenCenter[2]; // VR left screen center
@@ -957,12 +959,18 @@ RLAPI void BeginMode3D(Camera3D camera); // Initializes
RLAPI void EndMode3D(void); // Ends 3D mode and returns to default 2D orthographic mode
RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing
RLAPI void EndTextureMode(void); // Ends drawing to render texture
-RLAPI void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
-RLAPI void EndScissorMode(void); // End scissor mode
RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing
RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader)
RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied)
RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
+RLAPI void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
+RLAPI void EndScissorMode(void); // End scissor mode
+RLAPI void BeginVrStereoMode(RenderTexture2D target, VrStereoConfig config); // Begin stereo rendering (requires VR simulator)
+RLAPI void EndVrStereoMode(void); // End stereo rendering (requires VR simulator)
+
+// VR stereo config functions for VR simulator
+RLAPI VrStereoConfig LoadVrStereoMode(VrDeviceInfo device); // Load VR stereo config for VR simulator device parameters
+RLAPI void UnloadVrStereoConfig(VrStereoConfig config); // Unload VR stereo config
// Shader management functions
// NOTE: Shader functionality is not available on OpenGL 1.1
@@ -1113,17 +1121,6 @@ RLAPI void SetCameraSmoothZoomControl(int keySmoothZoom); // Set camera smooth z
RLAPI void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
//------------------------------------------------------------------------------------
-// VR Simulator Functions (Module: core)
-//------------------------------------------------------------------------------------
-RLAPI void InitVrSimulator(VrDeviceInfo device); // Init VR simulator for selected device parameters
-RLAPI void CloseVrSimulator(void); // Close VR simulator for current device
-RLAPI bool IsVrSimulatorReady(void); // Detect if VR simulator is ready
-RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
-RLAPI void BeginVrDrawing(RenderTexture2D target); // Begin VR simulator stereo rendering (using provided fbo)
-RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering
-RLAPI VrStereoConfig GetVrConfig(VrDeviceInfo device); // Get stereo rendering configuration parameters
-
-//------------------------------------------------------------------------------------
// Basic Shapes Drawing Functions (Module: shapes)
//------------------------------------------------------------------------------------
// Set texture and rectangle to be used on shapes drawing