Hymn to Beauty
C++ 3D Engine
Video::OpenGLShaderProgram Class Reference

OpenGL implementation of ShaderProgram. More...

#include <OpenGLShaderProgram.hpp>

Inheritance diagram for Video::OpenGLShaderProgram:
Video::ShaderProgram

Classes

struct  PushConstant
 Information about a push constant. More...
 

Public Member Functions

 OpenGLShaderProgram (std::initializer_list< const Shader * > shaders)
 Create new OpenGL shader program. More...
 
 ~OpenGLShaderProgram () final
 Destructor. More...
 
unsigned int GetID () const
 Get shader program ID. More...
 
const std::vector< PushConstant > & GetPushConstants () const
 Get information about the push constants in this shader program. More...
 
bool WritesToStorageBuffer () const
 Get whether the shader program writes to a storage buffer. More...
 
- Public Member Functions inherited from Video::ShaderProgram
 ShaderProgram ()
 Create a new shader program. More...
 
virtual ~ShaderProgram ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Video::ShaderProgram
enum  BindingType {
  MATRICES , MATERIAL , UNIFORMS , STORAGE_BUFFER ,
  BINDING_TYPES
}
 A type of bound resource. More...
 

Detailed Description

OpenGL implementation of ShaderProgram.

Constructor & Destructor Documentation

◆ OpenGLShaderProgram()

Video::OpenGLShaderProgram::OpenGLShaderProgram ( std::initializer_list< const Shader * >  shaders)
explicit

Create new OpenGL shader program.

Parameters
shadersList of shaders to link together.

◆ ~OpenGLShaderProgram()

Video::OpenGLShaderProgram::~OpenGLShaderProgram ( )
final

Destructor.

Member Function Documentation

◆ GetID()

unsigned int Video::OpenGLShaderProgram::GetID ( ) const

Get shader program ID.

Returns
The ID used in OpenGL calls.

◆ GetPushConstants()

const std::vector< OpenGLShaderProgram::PushConstant > & Video::OpenGLShaderProgram::GetPushConstants ( ) const

Get information about the push constants in this shader program.

Push constants are implemented using uniforms.

Returns
A list of the push constants used in the shader program.

◆ WritesToStorageBuffer()

bool Video::OpenGLShaderProgram::WritesToStorageBuffer ( ) const

Get whether the shader program writes to a storage buffer.

Returns
Whether the shader program writes to a storage buffer.

The documentation for this class was generated from the following files: