Atlas - SDL_openvrvideo.h
Home / ext / SDL / src / video / openvr Lines: 1 | Size: 2132 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1#ifndef _SDL_OPENVRVIDEO_H 2#define _SDL_OPENVRVIDEO_H 3 4#ifdef SDL_VIDEO_DRIVER_WINDOWS 5#ifdef EXTERN_C 6#undef EXTERN_C 7#endif 8#endif 9 10// OpenVR has a LOT of unused variables that GCC will freak out on. 11#ifdef __GNUC__ 12#pragma GCC diagnostic push 13#pragma GCC diagnostic ignored "-Wunused-variable" 14#endif 15 16#define USE_SDL 17#include "openvr_capi.h" 18 19#ifdef __GNUC__ 20#pragma GCC diagnostic pop 21#endif 22 23#include <stdint.h> 24 25#ifndef SDL_VIDEO_DRIVER_WINDOWS 26 27#include <GLES3/gl3.h> 28#include <GLES3/gl32.h> 29#include <EGL/egl.h> 30#include <GLES2/gl2.h> 31#include <GLES2/gl2ext.h> 32#include <GLES2/gl2ext.h> 33 34#endif 35 36 37struct SDL_WindowData 38{ 39#ifdef SDL_VIDEO_DRIVER_WINDOWS 40 SDL_Window *window; 41 HWND hwnd; 42 HWND parent; 43 HDC hdc; 44 HDC mdc; 45#else 46 int dummy; 47#endif 48}; 49 50struct SDL_VideoData { 51 void * openVRLIB; 52 intptr_t vrtoken; 53 intptr_t (*FN_VR_InitInternal)( EVRInitError *peError, EVRApplicationType eType ); 54 const char *(*FN_VR_GetVRInitErrorAsEnglishDescription)( EVRInitError error ); 55 intptr_t (*FN_VR_GetGenericInterface)( const char *pchInterfaceVersion, EVRInitError *peError ); 56 57 int is_buffer_rendering; 58 59 unsigned int overlaytexture; 60 61 unsigned int fbo, rbo; 62 63 int saved_texture_state; 64 65 struct VR_IVRSystem_FnTable *oSystem; 66 struct VR_IVROverlay_FnTable *oOverlay; 67 struct VR_IVRInput_FnTable * oInput; 68 VROverlayHandle_t overlayID, thumbID, cursorID; 69 70 char * sOverlayName; 71 72 VRActionSetHandle_t input_action_set; 73 VRActionHandle_t * input_action_handles_buttons; 74 int input_action_handles_buttons_count; 75 VRActionHandle_t * input_action_handles_axes; 76 int input_action_handles_axes_count; 77 VRActionHandle_t input_action_handles_haptics[2]; 78 79 bool bHasShownOverlay; 80 int targw, targh; 81 int last_targw, last_targh; 82 int swap_interval; 83 84 bool bDidCreateOverlay; 85 bool renderdoc_debugmarker_frame_end; 86 bool bIconOverridden; 87 88 SDL_Window * window; 89 90 SDL_Joystick *virtual_joystick; 91#ifdef SDL_VIDEO_DRIVER_WINDOWS 92 HDC hdc; 93 HGLRC hglrc; 94#else 95 EGLDisplay eglDpy; 96 EGLContext eglCtx; 97#endif 98}; 99 100struct SDL_DisplayData 101{ 102 int dummy; 103}; 104 105#endif 106[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.