33#ifndef GL_SHADER_PROGRAM_H
34#define GL_SHADER_PROGRAM_H
45struct PushConstantsStruct;
51 gl46core::UseProgramStageMask
_stageMask{ gl46core::UseProgramStageMask::GL_NONE_BIT };
55 class GLAPIShaderProgram;
99 return program.
bind();
static ShaderResult bind(glShaderProgram &program)
static void uploadPushConstants(glShaderProgram &program, const PushConstantsStruct &pushConstants)
OpenGL implementation of the RenderAPIWrapper.
GFXDevice & context() const noexcept
const ShaderProgramDescriptor & descriptor() const noexcept
OpenGL implementation of the ShaderProgram entity.
~glShaderProgram() override
ShaderResult validatePreBind(bool rebind=true) override
void uploadPushConstants(const PushConstantsStruct &pushConstants)
bool unload() override
Make sure this program is ready for deletion.
bool loadInternal(hashMap< U64, PerFileShaderData > &fileData, bool overwrite) override
Returns true if at least one shader linked successfully.
eastl::fixed_vector< glShaderEntry, to_base(ShaderType::COUNT), false > glShaders
gl46core::GLuint _glHandle
static void Idle(PlatformContext &platformContext)
ShaderResult bind()
Bind this shader program (returns false if the program failed validation)
Handle console commands that start with a forward slash.
constexpr gl46core::GLuint GL_NULL_HANDLE
Invalid object value. Used to compare handles and determine if they were properly created.
hashAlg::unordered_map< K, V, HashFun, Predicate > hashMap
constexpr auto to_base(const Type value) -> Type
gl46core::UseProgramStageMask _stageMask