2020-01-23 23:14:23 +00:00
|
|
|
#include "openxrswapchain.hpp"
|
2020-06-24 20:22:09 +00:00
|
|
|
#include "openxrswapchainimpl.hpp"
|
2020-01-23 23:14:23 +00:00
|
|
|
#include "openxrmanager.hpp"
|
|
|
|
#include "openxrmanagerimpl.hpp"
|
2020-05-24 16:00:42 +00:00
|
|
|
#include "vrenvironment.hpp"
|
2020-01-23 23:14:23 +00:00
|
|
|
|
|
|
|
#include <components/debug/debuglog.hpp>
|
|
|
|
|
|
|
|
namespace MWVR {
|
2020-06-24 19:26:11 +00:00
|
|
|
OpenXRSwapchain::OpenXRSwapchain(osg::ref_ptr<osg::State> state, SwapchainConfig config)
|
2020-05-24 16:00:42 +00:00
|
|
|
: mPrivate(new OpenXRSwapchainImpl(state, config))
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
OpenXRSwapchain::~OpenXRSwapchain()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void OpenXRSwapchain::beginFrame(osg::GraphicsContext* gc)
|
|
|
|
{
|
2020-06-02 20:16:42 +00:00
|
|
|
return impl().beginFrame(gc);
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
|
2020-06-02 20:16:42 +00:00
|
|
|
void OpenXRSwapchain::endFrame(osg::GraphicsContext* gc)
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
2020-02-02 12:12:53 +00:00
|
|
|
return impl().endFrame(gc);
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 09:33:01 +00:00
|
|
|
uint32_t OpenXRSwapchain::acquiredColorTexture() const
|
2020-06-02 20:16:42 +00:00
|
|
|
{
|
2020-06-28 09:33:01 +00:00
|
|
|
return impl().acquiredColorTexture();
|
2020-06-02 20:16:42 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 09:33:01 +00:00
|
|
|
uint32_t OpenXRSwapchain::acquiredDepthTexture() const
|
2020-06-02 20:16:42 +00:00
|
|
|
{
|
2020-06-28 09:33:01 +00:00
|
|
|
return impl().acquiredDepthTexture();
|
2020-06-02 20:16:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int OpenXRSwapchain::width() const
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
2020-06-24 20:22:09 +00:00
|
|
|
return impl().width();
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
|
2020-06-02 20:16:42 +00:00
|
|
|
int OpenXRSwapchain::height() const
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
2020-06-24 20:22:09 +00:00
|
|
|
return impl().height();
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
|
2020-06-02 20:16:42 +00:00
|
|
|
int OpenXRSwapchain::samples() const
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
2020-06-24 20:22:09 +00:00
|
|
|
return impl().samples();
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
|
2020-06-02 20:16:42 +00:00
|
|
|
bool OpenXRSwapchain::isAcquired() const
|
|
|
|
{
|
|
|
|
return impl().isAcquired();
|
|
|
|
}
|
|
|
|
|
2020-06-28 09:33:01 +00:00
|
|
|
VRFramebuffer* OpenXRSwapchain::renderBuffer() const
|
2020-01-23 23:14:23 +00:00
|
|
|
{
|
2020-06-02 20:16:42 +00:00
|
|
|
return impl().renderBuffer();
|
2020-01-23 23:14:23 +00:00
|
|
|
}
|
|
|
|
}
|