Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
Engine.cpp
Go to the documentation of this file.
1#include "pch.h"
2#include "Engine.h"
4#ifdef HBR_WINDOWS
7#endif
8
9using namespace Hubris::Graphics;
10using namespace Hubris;
11
12void Engine::InitGraphics(const EngineConfig & config)
13{
14 switch (config.GraphicsBackend)
15 {
16 case RenderAPI::DX11:
17 [[fallthrough]];
19 break;
20 case RenderAPI::DX12:
21 [[fallthrough]];
23#ifdef HBR_APPLE
24 static_assert(false, "MoltenVK is not available");
25#endif
26 // auto name = config.ProjectName;
27 // Vulkan::vkWindow::Create(config.WindowDimension, name.data());
28 Vulkan::vkWindow::InitGLFW();
30#if defined(_DEBUG) || defined(DEBUG)
31 //TODO: Init is supposed to be headless, i'm doing this here because i want to test everything in the graphics together.
33#endif
34 break;
35 case RenderAPI::None:
36 //Special Headless mode. I haven't yet conceptualized it.
37 break;
38 default:
39 return;
40 }
41}
static void CreateInstance() noexcept
Definition vkBackend.h:176
static vkWindow * Create(int Width, int Height, const std::string &title)
Definition vkWindow.cpp:75
Contains all graphics related classes and structs.
Definition Format.h:9
The Hubris Engine main namespace.
Definition EventBus.h:4
Used to configure the engine on instantiation.
Definition Engine.h:28
Graphics::Viewport WindowDimension
Definition Engine.h:47
std::string ProjectName
The Application/Game Name. Will be set as the Title of the window (used also by vulkan).
Definition Engine.h:43
RenderAPI GraphicsBackend
Definition Engine.h:33