Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_C-api.cpp
| Show First 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | |||||
| GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle, | GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle, | ||||
| GHOST_TDrawingContextType type) | GHOST_TDrawingContextType type) | ||||
| { | { | ||||
| GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | ||||
| return window->setDrawingContextType(type); | return window->setDrawingContextType(type); | ||||
| } | } | ||||
| GHOST_ContextHandle GHOST_GetDrawingContext(GHOST_WindowHandle windowhandle) | |||||
| { | |||||
| GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | |||||
| return (GHOST_ContextHandle)window->getDrawingContext(); | |||||
| } | |||||
| void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title) | void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title) | ||||
| { | { | ||||
| GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | ||||
| window->setTitle(title); | window->setTitle(title); | ||||
| } | } | ||||
| char *GHOST_GetTitle(GHOST_WindowHandle windowhandle) | char *GHOST_GetTitle(GHOST_WindowHandle windowhandle) | ||||
| ▲ Show 20 Lines • Show All 609 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle; | GHOST_IXrContext *xr_context = (GHOST_IXrContext *)xr_contexthandle; | ||||
| GHOST_XrSession *xr_session = xr_context->getSession(); | GHOST_XrSession *xr_session = xr_context->getSession(); | ||||
| GHOST_XR_CAPI_CALL_RET(xr_session->getControllerModelData(subaction_path, *r_data), xr_context); | GHOST_XR_CAPI_CALL_RET(xr_session->getControllerModelData(subaction_path, *r_data), xr_context); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| #endif /* WITH_XR_OPENXR */ | #endif /* WITH_XR_OPENXR */ | ||||
| #ifdef WITH_VULKAN_BACKEND | |||||
| /** | |||||
| * Return vulkan handles for the given context. | |||||
| */ | |||||
| void GHOST_GetVulkanHandles(GHOST_ContextHandle contexthandle, | |||||
| void *r_instance, | |||||
| void *r_physical_device, | |||||
| void *r_device, | |||||
| uint32_t *r_graphic_queue_familly) | |||||
| { | |||||
| GHOST_IContext *context = (GHOST_IContext *)contexthandle; | |||||
| context->getVulkanHandles(r_instance, r_physical_device, r_device, r_graphic_queue_familly); | |||||
| } | |||||
| /** | |||||
| * Return vulkan backbuffer resources handles for the given window. | |||||
| */ | |||||
| void GHOST_GetVulkanBackbuffer(GHOST_WindowHandle windowhandle, | |||||
| void *image, | |||||
| void *framebuffer, | |||||
| void *command_buffer, | |||||
| void *render_pass, | |||||
| void *extent, | |||||
| uint32_t *fb_id) | |||||
| { | |||||
| GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; | |||||
| window->getVulkanBackbuffer(image, framebuffer, command_buffer, render_pass, extent, fb_id); | |||||
| } | |||||
| #endif /* WITH_VULKAN */ | |||||
| No newline at end of file | |||||