summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2019-02-06 14:21:44 +0100
committerRay <[email protected]>2019-02-06 14:21:44 +0100
commitd356b1d1cca3a89016b5562bee7a876177427191 (patch)
tree094d135a7579974cbe29f3bc155901d405a016e2 /src/raylib.h
parent7615512af15e67c11c300094adf08198162686d5 (diff)
downloadraylib-d356b1d1cca3a89016b5562bee7a876177427191.tar.gz
raylib-d356b1d1cca3a89016b5562bee7a876177427191.zip
Reviewed fbo creation and VR system
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 94c91484..7709b10f 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -230,6 +230,7 @@ typedef struct RenderTexture2D {
unsigned int id; // OpenGL Framebuffer Object (FBO) id
Texture2D texture; // Color buffer attachment texture
Texture2D depth; // Depth buffer attachment texture
+ bool depthTexture; // Track if depth attachment is a texture or renderbuffer
} RenderTexture2D;
// RenderTexture type, same as RenderTexture2D
@@ -407,6 +408,16 @@ typedef struct VrDeviceInfo {
float chromaAbCorrection[4]; // HMD chromatic aberration correction parameters
} VrDeviceInfo;
+// VR Stereo rendering configuration for simulator
+typedef struct VrStereoConfig {
+ RenderTexture2D stereoFbo; // VR stereo rendering framebuffer
+ Shader distortionShader; // VR stereo rendering distortion shader
+ Matrix eyesProjection[2]; // VR stereo rendering eyes projection matrices
+ Matrix eyesViewOffset[2]; // VR stereo rendering eyes view offset matrices
+ int eyeViewportRight[4]; // VR stereo rendering right eye viewport [x, y, w, h]
+ int eyeViewportLeft[4]; // VR stereo rendering left eye viewport [x, y, w, h]
+} VrStereoConfig;
+
//----------------------------------------------------------------------------------
// Enumerators Definition
//----------------------------------------------------------------------------------
@@ -1172,6 +1183,7 @@ RLAPI int TextFindIndex(const char *text, const char *find);
RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string
RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string
RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
+RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
//------------------------------------------------------------------------------------
// Basic 3d Shapes Drawing Functions (Module: models)
@@ -1292,10 +1304,9 @@ RLAPI void EndScissorMode(void); // End
// VR control functions
RLAPI VrDeviceInfo GetVrDeviceInfo(int vrDeviceType); // Get VR device information for some standard devices
RLAPI void InitVrSimulator(VrDeviceInfo info); // Init VR simulator for selected device parameters
+RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
RLAPI void CloseVrSimulator(void); // Close VR simulator for current device
RLAPI bool IsVrSimulatorReady(void); // Detect if VR simulator is ready
-RLAPI void SetVrDistortionShader(Shader shader); // Set VR distortion shader for stereoscopic rendering
-RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
RLAPI void ToggleVrMode(void); // Enable/Disable VR experience
RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering
RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering