sculpto
Main Page
Namespaces
Classes
Files
File List
File Members
core
render
primitives
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
"
12
#include "
platform/opengl/gl_vertex_array.h
"
13
14
scl::vertex_array::vertex_array
(
mesh_type
MeshType) :
15
Type(MeshType) {}
16
17
scl::shared<scl::vertex_array>
scl::vertex_array::Create
(
mesh_type
Mesh_type)
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
}
SCL_CORE_ASSERT
#define SCL_CORE_ASSERT(expr,...)
Definition:
assert.h:69
scl::render_context::GetApi
static render_context_api GetApi()
Definition:
render_context.h:61
scl::vertex_array::vertex_array
vertex_array(mesh_type MeshType)
Definition:
vertex_array.cpp:14
scl::vertex_array::Create
static shared< vertex_array > Create(mesh_type Mesh_type)
Definition:
vertex_array.cpp:17
gl_vertex_array.h
scl::shared
std::shared_ptr< T > shared
Definition:
smart_ptr.h:15
scl::mesh_type
mesh_type
Definition:
vertex_array.h:18
scl::render_context_api::DirectX
@ DirectX
scl::render_context_api::OpenGL
@ OpenGL
sclpch.h
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.
vertex_array.h
Vertex array interfaces implementation module.
Generated by
1.9.4