summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_CAPI_GL.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/OVR_CAPI_GL.h')
-rw-r--r--LibOVR/Src/OVR_CAPI_GL.h44
1 files changed, 29 insertions, 15 deletions
diff --git a/LibOVR/Src/OVR_CAPI_GL.h b/LibOVR/Src/OVR_CAPI_GL.h
index ceabb74..8cdd3b9 100644
--- a/LibOVR/Src/OVR_CAPI_GL.h
+++ b/LibOVR/Src/OVR_CAPI_GL.h
@@ -15,59 +15,73 @@ otherwise accompanies this software in either electronic or hard copy form.
#ifndef OVR_CAPI_GL_h
#define OVR_CAPI_GL_h
+/// @file OVR_CAPI_GL.h
+/// OpenGL rendering support.
+
#include "OVR_CAPI.h"
//-----------------------------------------------------------------------------------
// ***** GL Specific
#if defined(OVR_OS_WIN32)
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
#include <Windows.h>
#include <GL/gl.h>
- #include <GL/glext.h>
- #include <GL/wglext.h>
#elif defined(OVR_OS_MAC)
#include <OpenGL/gl3.h>
- #include <OpenGL/gl3ext.h>
#include <OpenGL/OpenGL.h>
#else
#include <GL/gl.h>
- #include <GL/glext.h>
#include <GL/glx.h>
#endif
-// Used to configure slave GL rendering (i.e. for devices created externally).
+/// Used to configure slave GL rendering (i.e. for devices created externally).
typedef struct ovrGLConfigData_s
{
- // General device settings.
+ /// General device settings.
ovrRenderAPIConfigHeader Header;
#if defined(OVR_OS_WIN32)
- HWND Window;
+ /// The optional window handle. If unset, rendering will use the current window.
+ HWND Window;
+ /// The optional device context. If unset, rendering will use a new context.
+ HDC DC;
#elif defined(OVR_OS_LINUX)
- Display* Disp;
- Window Win;
+ /// The optional display. If unset, rendering will use the current display.
+ _XDisplay* Disp;
+ /// The optional window. If unset, rendering will use the current window.
+ Window Win;
#endif
} ovrGLConfigData;
+/// Contains OpenGL-specific rendering information.
union ovrGLConfig
{
+ /// General device settings.
ovrRenderAPIConfig Config;
- ovrGLConfigData OGL;
+ /// OpenGL-specific settings.
+ ovrGLConfigData OGL;
};
-// Used to pass GL eye texture data to ovrHmd_EndFrame.
+/// Used to pass GL eye texture data to ovrHmd_EndFrame.
typedef struct ovrGLTextureData_s
{
- // General device settings.
- ovrTextureHeader Header;
+ /// General device settings.
+ ovrTextureHeader Header;
+ /// The OpenGL name for this texture.
GLuint TexId;
} ovrGLTextureData;
+/// Contains OpenGL-specific texture information.
typedef union ovrGLTexture_s
{
- ovrTexture Texture;
- ovrGLTextureData OGL;
+ /// General device settings.
+ ovrTexture Texture;
+ /// OpenGL-specific settings.
+ ovrGLTextureData OGL;
} ovrGLTexture;
#endif // OVR_CAPI_GL_h