sculpto
Main Page
Namespaces
Classes
Files
File List
File Members
core
render
primitives
frame_buffer.cpp
Go to the documentation of this file.
1
/*!****************************************************************/
/*!*
2
* \file frame_buffer.h
3
* \brief Frame buffer interface implementation module.
4
*
5
* \author Sabitov Kirill
6
* \date 30 June 2022
7
*********************************************************************/
8
9
#include "
sclpch.h
"
10
#include "../render_context.h"
11
#include "
frame_buffer.h
"
12
#include "
platform/opengl/gl_frame_buffer.h
"
13
14
scl::shared<scl::frame_buffer>
scl::frame_buffer::Create
(
const
frame_buffer_props
&Props)
15
{
16
switch
(
render_context::GetApi
())
17
{
18
case
scl::render_context_api::OpenGL
:
return
CreateShared<gl_frame_buffer>(Props);
19
case
scl::render_context_api::DirectX
:
SCL_CORE_ASSERT
(0,
"This API is currently unsupported."
);
return
nullptr
;
20
}
21
22
SCL_CORE_ASSERT
(0,
"Unknown render API was selected."
);
23
return
nullptr
;
24
}
SCL_CORE_ASSERT
#define SCL_CORE_ASSERT(expr,...)
Definition:
assert.h:69
scl::frame_buffer::Create
static shared< frame_buffer > Create(const frame_buffer_props &Props)
Definition:
frame_buffer.cpp:14
scl::render_context::GetApi
static render_context_api GetApi()
Definition:
render_context.h:61
frame_buffer.h
Frame buffer interface implementation module.
gl_frame_buffer.h
OpenGL frame buffer class definition class.
scl::shared
std::shared_ptr< T > shared
Definition:
smart_ptr.h:15
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.
scl::frame_buffer_props
Definition:
frame_buffer.h:20
Generated by
1.9.4