33 lines
682 B
C
Raw Normal View History

2022-05-21 19:58:09 +02:00
#pragma once
#include <cstdint>
#include "StringBase.h"
namespace Assets
{
// Represents an OpenGL shader program.
class RenderShader
{
public:
RenderShader();
~RenderShader();
// Compiles the release shader, internal use only.
void LoadShader(const char* VertSource, const char* FragSource);
// Compiles the debug shader.
void LoadShader(const String& VertPath, const String& FragPath);
2022-05-21 19:58:09 +02:00
// Sets this shader as current.
void Use();
// Detatches the current shader.
void Detatch();
// Returns the uniform location for this shader.
uint32_t GetUniformLocation(const char* Name);
private:
// Internal shader program id
uint32_t _ProgramID;
};
}