st/oxr: Fix ifdef guards

This commit is contained in:
Ryan Pavlik 2019-12-03 13:08:10 -06:00
parent 682f41a37c
commit 67a561d0ea
6 changed files with 21 additions and 6 deletions

View file

@ -245,17 +245,23 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger *,
const struct oxr_instance *,
const XrSessionCreateInfo *);
#if defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
XrResult
oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
struct oxr_logger *, const XrGraphicsBindingOpenGLXlibKHR *);
#endif // defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
#if defined(XR_USE_GRAPHICS_API_VULKAN)
XrResult
oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger *,
const XrGraphicsBindingVulkanKHR *);
#endif // defined(XR_USE_GRAPHICS_API_VULKAN)
#if defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
XrResult
oxr_verify_XrGraphicsBindingEGLMND(struct oxr_logger *log,
const XrGraphicsBindingEGLMND *next);
#endif // defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
/*!
* @}

View file

@ -713,7 +713,7 @@ oxr_session_populate_gl_xlib(struct oxr_logger *log,
struct oxr_system *sys,
XrGraphicsBindingOpenGLXlibKHR const *next,
struct oxr_session *sess);
#endif
#endif // XR_USE_PLATFORM_XLIB
XrResult
oxr_swapchain_gl_create(struct oxr_logger *,
@ -721,7 +721,7 @@ oxr_swapchain_gl_create(struct oxr_logger *,
const XrSwapchainCreateInfo *,
struct oxr_swapchain **out_swapchain);
#endif
#endif // XR_USE_GRAPHICS_API_OPENGL
/*

View file

@ -612,7 +612,7 @@ oxr_session_create_impl(struct oxr_logger *log,
const XrSessionCreateInfo *createInfo,
struct oxr_session **out_session)
{
#ifdef XR_USE_PLATFORM_XLIB
#if defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
XrGraphicsBindingOpenGLXlibKHR const *opengl_xlib =
OXR_GET_INPUT_FROM_CHAIN(createInfo,
XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR,

View file

@ -21,6 +21,7 @@
#include "xrt/xrt_gfx_xlib.h"
#endif
#ifdef XR_USE_GRAPHICS_API_OPENGL
#ifdef XR_USE_PLATFORM_XLIB
XrResult
@ -44,4 +45,8 @@ oxr_session_populate_gl_xlib(struct oxr_logger *log,
return XR_SUCCESS;
}
#endif
#endif // XR_USE_PLATFORM_XLIB
//! @todo add the other OpenGL graphics binding structs here
#endif // XR_USE_GRAPHICS_API_OPENGL

View file

@ -18,6 +18,8 @@
#include "oxr_logger.h"
#ifdef XR_USE_GRAPHICS_API_OPENGL
static XrResult
oxr_swapchain_gl_destroy(struct oxr_logger *log, struct oxr_swapchain *sc)
{
@ -95,3 +97,5 @@ oxr_swapchain_gl_create(struct oxr_logger *log,
return XR_SUCCESS;
}
#endif // XR_USE_GRAPHICS_API_OPENGL

View file

@ -527,7 +527,7 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger *log,
}
#ifdef XR_USE_PLATFORM_XLIB
#if defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
XrResult
oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
@ -557,7 +557,7 @@ oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
return XR_SUCCESS;
}
#endif
#endif // defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
#ifdef XR_USE_GRAPHICS_API_VULKAN