Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_ContextEGL.h
| Show All 30 Lines | |||||
| # define GHOST_OPENGL_EGL_CONTEXT_FLAGS 0 | # define GHOST_OPENGL_EGL_CONTEXT_FLAGS 0 | ||||
| #endif | #endif | ||||
| #ifndef GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY | #ifndef GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY | ||||
| # define GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY 0 | # define GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY 0 | ||||
| #endif | #endif | ||||
| class GHOST_ContextEGL : public GHOST_Context { | class GHOST_ContextEGL : public GHOST_Context { | ||||
| /* XR code needs low level graphics data to send to OpenXR. */ | |||||
| friend class GHOST_XrGraphicsBindingOpenGL; | |||||
| public: | public: | ||||
| /** | /** | ||||
| * Constructor. | * Constructor. | ||||
| */ | */ | ||||
| GHOST_ContextEGL(bool stereoVisual, | GHOST_ContextEGL(bool stereoVisual, | ||||
| EGLNativeWindowType nativeWindow, | EGLNativeWindowType nativeWindow, | ||||
| EGLNativeDisplayType nativeDisplay, | EGLNativeDisplayType nativeDisplay, | ||||
| EGLint contextProfileMask, | EGLint contextProfileMask, | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public: | ||||
| /** | /** | ||||
| * Gets the current swap interval for #swapBuffers. | * Gets the current swap interval for #swapBuffers. | ||||
| * \param intervalOut: Variable to store the swap interval if it can be read. | * \param intervalOut: Variable to store the swap interval if it can be read. | ||||
| * \return Whether the swap interval can be read. | * \return Whether the swap interval can be read. | ||||
| */ | */ | ||||
| GHOST_TSuccess getSwapInterval(int &intervalOut); | GHOST_TSuccess getSwapInterval(int &intervalOut); | ||||
| EGLDisplay getDisplay() const; | |||||
| EGLConfig getConfig() const; | |||||
| EGLContext getContext() const; | |||||
| private: | private: | ||||
| bool initContextEGLEW(); | bool initContextEGLEW(); | ||||
| EGLNativeDisplayType m_nativeDisplay; | EGLNativeDisplayType m_nativeDisplay; | ||||
| EGLNativeWindowType m_nativeWindow; | EGLNativeWindowType m_nativeWindow; | ||||
| const EGLint m_contextProfileMask; | const EGLint m_contextProfileMask; | ||||
| const EGLint m_contextMajorVersion; | const EGLint m_contextMajorVersion; | ||||
| const EGLint m_contextMinorVersion; | const EGLint m_contextMinorVersion; | ||||
| const EGLint m_contextFlags; | const EGLint m_contextFlags; | ||||
| const EGLint m_contextResetNotificationStrategy; | const EGLint m_contextResetNotificationStrategy; | ||||
| const EGLenum m_api; | const EGLenum m_api; | ||||
| EGLContext m_context; | EGLContext m_context; | ||||
| EGLSurface m_surface; | EGLSurface m_surface; | ||||
| EGLDisplay m_display; | EGLDisplay m_display; | ||||
| EGLConfig m_config; | |||||
| EGLint m_swap_interval; | EGLint m_swap_interval; | ||||
| EGLContext &m_sharedContext; | EGLContext &m_sharedContext; | ||||
| EGLint &m_sharedCount; | EGLint &m_sharedCount; | ||||
| static EGLContext s_gl_sharedContext; | static EGLContext s_gl_sharedContext; | ||||
| static EGLint s_gl_sharedCount; | static EGLint s_gl_sharedCount; | ||||
| Show All 11 Lines | |||||