MetaCore/Source/MetaCoreRender/Private/MetaCoreRenderDevice.cpp

51 lines
1.0 KiB
C++

#include "MetaCoreRender/MetaCoreRenderDevice.h"
#include "MetaCorePlatform/MetaCoreWindow.h"
#include <memory>
namespace MetaCore {
class MetaCoreRenderDevice::MetaCoreRenderDeviceImpl {
public:
MetaCoreWindow* Window = nullptr;
bool Initialized = false;
};
MetaCoreRenderDevice::MetaCoreRenderDevice()
: Impl_(std::make_unique<MetaCoreRenderDeviceImpl>()) {
}
MetaCoreRenderDevice::~MetaCoreRenderDevice() {
Shutdown();
}
bool MetaCoreRenderDevice::Initialize(MetaCoreWindow& window) {
if (Impl_->Initialized) {
return true;
}
Impl_->Window = &window;
Impl_->Initialized = true;
return true;
}
void MetaCoreRenderDevice::Shutdown() {
if (!Impl_->Initialized) {
return;
}
Impl_->Window = nullptr;
Impl_->Initialized = false;
}
void MetaCoreRenderDevice::RenderFrame() const {
}
void MetaCoreRenderDevice::PresentFrame() const {
}
void MetaCoreRenderDevice::SetSceneViewportRect(const MetaCoreViewportRect& viewportRect) {
(void)viewportRect;
}
} // namespace MetaCore