sculpto
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"
13
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}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69
static shared< frame_buffer > Create(const frame_buffer_props &Props)
static render_context_api GetApi()
Frame buffer interface implementation module.
OpenGL frame buffer class definition class.
std::shared_ptr< T > shared
Definition: smart_ptr.h:15
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.