WIP Shader Reflection Refactoring
This commit is contained in:
@@ -111,5 +111,5 @@ const char* SHADER_VALUE_NAMES[];
|
|||||||
class KRReflectedObject
|
class KRReflectedObject
|
||||||
{
|
{
|
||||||
public:
|
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();
|
calculateDerivedValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool KRViewport::GetShaderValue(ShaderValue value, void* buffer, size_t size)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
KRViewport& KRViewport::operator=(const KRViewport& v)
|
KRViewport& KRViewport::operator=(const KRViewport& v)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,12 +40,15 @@
|
|||||||
class KRLight;
|
class KRLight;
|
||||||
|
|
||||||
class KRViewport
|
class KRViewport
|
||||||
|
: public KRReflectedObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KRViewport();
|
KRViewport();
|
||||||
KRViewport(const hydra::Vector2& size, const hydra::Matrix4& matView, const hydra::Matrix4& matProjection);
|
KRViewport(const hydra::Vector2& size, const hydra::Matrix4& matView, const hydra::Matrix4& matProjection);
|
||||||
~KRViewport();
|
~KRViewport();
|
||||||
|
|
||||||
|
bool GetShaderValue(ShaderValue value, void* buffer, size_t size) final;
|
||||||
|
|
||||||
const hydra::Vector2& getSize() const;
|
const hydra::Vector2& getSize() const;
|
||||||
const hydra::Matrix4& getViewMatrix() const;
|
const hydra::Matrix4& getViewMatrix() const;
|
||||||
const hydra::Matrix4& getProjectionMatrix() const;
|
const hydra::Matrix4& getProjectionMatrix() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user