15 int Shader::_nextId = 0;
23 void Shader::processDefinition()
28 void Shader::processVertexFragmentShaders()
30 assert(!_definition.
vshader.empty() &&
"No vertex shader has been specified when creating a shader.");
31 assert(!_definition.
fshader.empty() &&
"No fragment shader has been specified when creating a shader.");
34 void Shader::validatePlatformSupport()
const
40 const std::string& sourceCode)
42 return graphicsDevice->
createShader(definition, sourceCode);
Abstract GPU interface for resource creation, state management, and draw submission.
virtual std::shared_ptr< Shader > createShader(const ShaderDefinition &definition, const std::string &sourceCode="")
GraphicsDevice * graphicsDevice() const
Shader(GraphicsDevice *graphicsDevice, const ShaderDefinition &definition)
std::shared_ptr< Shader > createShader(GraphicsDevice *graphicsDevice, const ShaderDefinition &definition, const std::string &sourceCode)