Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-04-02 18:40:29 +0300
committerJulian Eisel <julian@blender.org>2020-04-02 18:43:45 +0300
commit34465a7fb091664b07611353d99dcaa0862d4a4c (patch)
tree973457851e3836286daf07345b4ea4fd517347e1 /intern/ghost/GHOST_C-api.h
parent868d4526a8818fbffc5ea993fbbbd3890046a6e9 (diff)
VR: Refactor DirectX context management
All DirectX management happens on Ghost level now, higher level code can just assume everything is OpenGL (except of the upside-down drawing that still needs to be done for DirectX). This is similar to how the metal-layer is hidden outside of Ghost. The Ghost-XR graphics binding for DirectX is responsible for managing the DirectX compatibility now.
Diffstat (limited to 'intern/ghost/GHOST_C-api.h')
-rw-r--r--intern/ghost/GHOST_C-api.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index aba5b5f733b..4f994f76539 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -214,25 +214,6 @@ extern GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemha
extern GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle,
GHOST_ContextHandle contexthandle);
-#ifdef WIN32
-/**
- * Create a new offscreen context.
- * Never explicitly delete the context, use disposeContext() instead.
- * \param systemhandle The handle to the system
- * \return A handle to the new context ( == NULL if creation failed).
- */
-GHOST_ContextHandle GHOST_CreateDirectXContext(GHOST_SystemHandle systemhandle);
-
-/**
- * Dispose of a context.
- * \param systemhandle The handle to the system
- * \param contexthandle Handle to the context to be disposed.
- * \return Indication of success.
- */
-GHOST_TSuccess GHOST_DisposeDirectXContext(GHOST_SystemHandle systemhandle,
- GHOST_ContextHandle contexthandle);
-#endif
-
/**
* Returns the window user data.
* \param windowhandle The handle to the window
@@ -1078,6 +1059,13 @@ void GHOST_XrSessionDrawViews(GHOST_XrContextHandle xr_context, void *customdata
*/
int GHOST_XrSessionIsRunning(const GHOST_XrContextHandle xr_context);
+/**
+ * Check if \a xr_context has a session that requrires an upside-down framebuffer (compared to
+ * OpenGL). If true, the render result should be flipped vertically for correct output.
+ * \note: Only to be called after session start, may otherwise result in a false negative.
+ */
+int GHOST_XrSessionNeedsUpsideDownDrawing(const GHOST_XrContextHandle xr_context);
+
/* events */
/**
* Invoke handling of all OpenXR events for \a xr_context. Should be called on every main-loop