CoriEngine
Loading...
Searching...
No Matches
VertexArray.cpp
Go to the documentation of this file.
1#include "VertexArray.hpp"
4
5namespace Cori {
6 namespace Graphics {
7 std::shared_ptr<VertexArray> VertexArray::Create() {
10 {
11 auto vao = std::make_shared<Internal::OpenGLVertexArray>();
12 CORI_CORE_ASSERT(vao, "Failed to create Texture2D for API: {}. Check registrations and API validity.", APIEnumToName(Core::Window::GetCurrentAPI()));
13 return vao;
14 break;
15 }
17 {
18 CORI_CORE_ASSERT(false, "Unsupported Graphics API.");
19 }
21 {
22 break;
23 }
24 }
25
26 return nullptr;
27 }
28 }
29}
#define CORI_CORE_ASSERT(x,...)
Definition Logger.hpp:1029
static Graphics::GraphicsAPIs GetCurrentAPI()
Returns the graphical API used by this window.
Definition Window.hpp:63
static std::shared_ptr< VertexArray > Create()
Almost everything connected to graphics is in this namespace.
Definition Window.hpp:7
@ Vulkan
I want to support vulkan, BUT later-later.
@ None
Invalid enumerator.
@ OpenGL
The only one available for now.
static const char * APIEnumToName(const GraphicsAPIs api)
Global engine namespace.