2#ifdef StevEngine_RENDERER_GL
4#include "utilities/Vector3.hpp"
5#include "utilities/Vector2.hpp"
6#include "utilities/Color.hpp"
7#include "utilities/Matrix4.hpp"
8#include "utilities/Stream.hpp"
9#include "visuals/Texture.hpp"
210 void Run(uint32_t groupsX, uint32_t groupsY, uint32_t groupsZ = 1)
const;
ComputeShader(const std::vector< Shader > &shaders)
Create compute shader program.
Definition ShaderProgram.hpp:180
ComputeShader(Utilities::Stream &stream)
Create from serialized data.
Definition ShaderProgram.hpp:186
void Run(const Visuals::ComputeTexture &output) const
Run the compute shader.
Definition ShaderProgram.hpp:195
ComputeShader(const char *source)
Create compute shader program , with a single shader from source.
Definition ShaderProgram.cpp:124
ShaderProgram()
Create empty program.
Definition ShaderProgram.hpp:48
uint32_t AddShader(Shader shader)
Add shader stage to program.
Definition ShaderProgram.cpp:45
uint32_t location
OpenGL program ID.
Definition ShaderProgram.hpp:159
uint32_t GetLocation() const
Get OpenGL program ID.
Definition ShaderProgram.hpp:137
Utilities::Stream Export(Utilities::StreamType type) const
Serialize shader program to a stream.
Definition ShaderProgram.cpp:79
bool modified
Whether program needs relinking.
Definition ShaderProgram.hpp:161
ShaderType GetType() const
Get program shader type.
Definition ShaderProgram.hpp:149
ShaderProgram(ShaderType shaderType, bool useDefaultShaders=true)
Create shader program.
Definition ShaderProgram.cpp:19
ShaderType shaderType
Type of shaders in program.
Definition ShaderProgram.hpp:160
void RelinkProgram()
Relink program after shader changes.
Definition ShaderProgram.cpp:59
void SetShaderUniform(const char *name, Utilities::Matrix4 value) const
Set matrix uniform.
Definition ShaderProgram.cpp:95
void RemoveShader(uint32_t location)
Remove shader from program.
Definition ShaderProgram.cpp:52
bool IsModified() const
Check if program needs relinking.
Definition ShaderProgram.hpp:143
std::map< uint32_t, Shader > shaders
Shaders by OpenGL ID.
Definition ShaderProgram.hpp:162
void DeleteProgram()
Deletes program and all shaders from OpenGL.
Definition ShaderProgram.cpp:72
Single shader stage (vertex or fragment)
Definition Shader.hpp:23
4x4 matrix for 3D transformations
Definition Matrix4.hpp:12
Stream for serialization of data.
Definition Stream.hpp:20
2D vector class
Definition Vector2.hpp:13
3D vector class
Definition Vector3.hpp:19
Definition Texture.hpp:82
const uint32_t height
Height of the texture.
Definition Texture.hpp:118
const uint32_t width
Width of the texture.
Definition Texture.hpp:117
Core rendering system.
Definition Object.cpp:19
RGBA color representation.
Definition Color.hpp:12