Class VertexShader

Inheritance Relationships

Base Type

Class Documentation

class VertexShader : public Shader

Represents a vertex shader in the rendering pipeline.

This class is responsible for loading, compiling, and managing a vertex shader from a specified file path. It inherits from the Shader base class and specifically handles shaders of type GL_VERTEX_SHADER.

Example usage:

VertexShader vertexShader("shaders/vertex.glsl");

See also

Shader

Public Functions

inline VertexShader()

Constructs a VertexShader object by loading and compiling a vertex shader from a file.

Parameters:

path – The file path to the vertex shader source code.

Throws:

std::runtime_error – If the shader file cannot be opened or compilation fails.