NoJobEngine 2.0.7
Loading...
Searching...
No Matches
Shader.cpp
Go to the documentation of this file.
4#include <stdexcept>
5
6namespace NoJob
7{
8 std::shared_ptr<Shader> Shader::Create(
9 const std::string& vertexSource,
10 const std::string& fragmentSource)
11 {
12 switch (RendererAPI::GetAPI())
13 {
15 return std::make_shared<OpenGLShader>(
16 vertexSource, fragmentSource);
17 default:
18 throw std::runtime_error("NoJobEngine: unsupported graphics API.");
19 }
20 }
21}
OpenGLShader declarations for the OpenGL Backend subsystem.
RendererAPI declarations for the Rendering subsystem.
Shader declarations for the Rendering subsystem.
static GraphicsAPI GetAPI()
Definition RendererAPI.h:49
static std::shared_ptr< Shader > Create(const std::string &vertexSource, const std::string &fragmentSource)
Definition Shader.cpp:8