sculpto
vertex_array.cpp
Go to the documentation of this file.
1/*!****************************************************************//*!*
2 * \file vertex_array.h
3 * \brief Vertex array interfaces implementation module.
4 *
5 * \author Sabitov Kirill
6 * \date 27 June 2022
7 *********************************************************************/
8
9#include "sclpch.h"
10#include "../render_context.h"
11#include "vertex_array.h"
13
15 Type(MeshType) {}
16
18{
19 switch (render_context::GetApi())
20 {
21 case scl::render_context_api::OpenGL: return CreateShared<gl_vertex_array>(Mesh_type);
22 case scl::render_context_api::DirectX: SCL_CORE_ASSERT(0, "This API is currently unsupported."); return nullptr;
23 }
24
25 SCL_CORE_ASSERT(0, "Unknown render API was selected.");
26 return nullptr;
27}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69
static render_context_api GetApi()
vertex_array(mesh_type MeshType)
static shared< vertex_array > Create(mesh_type Mesh_type)
std::shared_ptr< T > shared
Definition: smart_ptr.h:15
mesh_type
Definition: vertex_array.h:18
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.
Vertex array interfaces implementation module.