18#ifndef INCLUDED_RENDERER_BACKEND_GL_SHADERPROGRAM
19#define INCLUDED_RENDERER_BACKEND_GL_SHADERPROGRAM
58 ENSURE(attribute.stride > 0);
95 static std::unique_ptr<CShaderProgram>
Create(
120 const int32_t bindingSlot,
121 const float value) = 0;
123 const int32_t bindingSlot,
124 const float valueX,
const float valueY) = 0;
126 const int32_t bindingSlot,
127 const float valueX,
const float valueY,
128 const float valueZ) = 0;
130 const int32_t bindingSlot,
131 const float valueX,
const float valueY,
132 const float valueZ,
const float valueW) = 0;
Definition: Matrix3D.h:34
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
Definition: ShaderDefines.h:147
Interned 8-bit strings.
Definition: CStrIntern.h:38
Definition: Vector3D.h:31
Simplifed version of std::span (C++20) as we don't support the original one yet.
Definition: Span.h:37
A compiled vertex+fragment shader program.
Definition: ShaderProgram.h:89
bool IsStreamActive(const VertexAttributeStream stream) const
Definition: ShaderProgram.cpp:1506
CStrIntern attrib_id_t
Definition: ShaderProgram.h:93
NONCOPYABLE(CShaderProgram)
void BindClientStates()
Definition: ShaderProgram.cpp:1444
virtual void SetUniform(const int32_t bindingSlot, const float value)=0
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ, const float valueW)=0
virtual void SetUniform(const int32_t bindingSlot, PS::span< const float > values)=0
virtual void Unbind()=0
Unbinds the shader from the GL context.
void AssertPointersBound()
Checks that all the required vertex attributes have been set.
Definition: ShaderProgram.cpp:1546
virtual void VertexAttribPointer(const VertexAttributeStream stream, const Format format, const uint32_t offset, const uint32_t stride, const VertexAttributeRate rate, const void *data)
Definition: ShaderProgram.cpp:1511
static std::unique_ptr< CShaderProgram > Create(CDevice *device, const CStr &name, const CShaderDefines &baseDefines)
Definition: ShaderProgram.cpp:1193
~CShaderProgram() override
int m_ValidStreams
Definition: ShaderProgram.h:163
void ColorPointer(const Renderer::Backend::Format format, GLsizei stride, const void *pointer)
Definition: ShaderProgram.cpp:1424
int m_StreamFlags
Definition: ShaderProgram.h:158
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY)=0
void VertexPointer(const Renderer::Backend::Format format, GLsizei stride, const void *pointer)
Definition: ShaderProgram.cpp:1408
virtual TextureUnit GetTextureUnit(const int32_t bindingSlot)=0
void TexCoordPointer(GLenum texture, const Renderer::Backend::Format format, GLsizei stride, const void *pointer)
Definition: ShaderProgram.cpp:1433
void UnbindClientStates()
Definition: ShaderProgram.cpp:1481
virtual void Bind(CShaderProgram *previousShaderProgram)=0
Binds the shader into the GL context.
CShaderProgram(int streamflags)
Definition: ShaderProgram.cpp:1185
virtual void SetUniform(const int32_t bindingSlot, const float valueX, const float valueY, const float valueZ)=0
void NormalPointer(const Renderer::Backend::Format format, GLsizei stride, const void *pointer)
Definition: ShaderProgram.cpp:1417
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:81
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
Definition: debug.h:277
Format
Definition: Format.h:28
VertexAttributeStream
Definition: IShaderProgram.h:33
Backend
Definition: Backend.h:28
VertexAttributeRate
Definition: IShaderProgram.h:48
Definition: VideoMode.h:29
Definition: ShaderProgram.h:112
GLenum target
Definition: ShaderProgram.h:114
GLenum type
Definition: ShaderProgram.h:113
GLint unit
Definition: ShaderProgram.h:115
unsigned int uint32_t
Definition: wposix_types.h:53