WIP Shader Reflection Refactoring
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user