WIP Shader Reflection Refactoring

This commit is contained in:
2025-08-23 15:46:36 -07:00
parent 6739e9c1a5
commit a917f70f62
3 changed files with 10 additions and 1 deletions

View File

@@ -111,5 +111,5 @@ const char* SHADER_VALUE_NAMES[];
class KRReflectedObject
{
public:
static std::map<ShaderValue, std::pair<size_t, size_t>> ValueMap;
virtual bool GetShaderValue(ShaderValue value, void* buffer, size_t size) = 0;
};

View File

@@ -55,6 +55,12 @@ KRViewport::KRViewport(const Vector2& size, const Matrix4& matView, const Matrix
calculateDerivedValues();
}
bool KRViewport::GetShaderValue(ShaderValue value, void* buffer, size_t size)
{
return false;
}
KRViewport& KRViewport::operator=(const KRViewport& v)
{

View File

@@ -40,12 +40,15 @@
class KRLight;
class KRViewport
: public KRReflectedObject
{
public:
KRViewport();
KRViewport(const hydra::Vector2& size, const hydra::Matrix4& matView, const hydra::Matrix4& matProjection);
~KRViewport();
bool GetShaderValue(ShaderValue value, void* buffer, size_t size) final;
const hydra::Vector2& getSize() const;
const hydra::Matrix4& getViewMatrix() const;
const hydra::Matrix4& getProjectionMatrix() const;