Added UI Scaling support
This commit is contained in:
@ -12,6 +12,10 @@ BackBufferRenderTarget::BackBufferRenderTarget(RenderManager &renderManager) :
|
||||
{
|
||||
}
|
||||
|
||||
float_t BackBufferRenderTarget::getScale() {
|
||||
return this->scale;
|
||||
}
|
||||
|
||||
float_t BackBufferRenderTarget::getWidth() {
|
||||
return this->width;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ namespace Dawn {
|
||||
struct Color clearColor = COLOR_CORNFLOWER_BLUE;
|
||||
|
||||
public:
|
||||
float_t scale = 1.0f;
|
||||
|
||||
/**
|
||||
* Construct the back buffer render target.
|
||||
*
|
||||
@ -38,6 +40,7 @@ namespace Dawn {
|
||||
*/
|
||||
void setSize(float_t width, float_t height);
|
||||
|
||||
float_t getScale() override;
|
||||
float_t getWidth() override;
|
||||
float_t getHeight() override;
|
||||
void setClearColor(struct Color color) override;
|
||||
|
@ -64,6 +64,10 @@ void TextureRenderTarget::setSize(float_t width, float_t height) {
|
||||
}
|
||||
}
|
||||
|
||||
float_t TextureRenderTarget::getScale() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float_t TextureRenderTarget::getWidth() {
|
||||
return (float_t)this->texture.getWidth();
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ namespace Dawn {
|
||||
|
||||
void setSize(float_t width, float_t height);
|
||||
|
||||
float_t getScale() override;
|
||||
float_t getWidth() override;
|
||||
float_t getHeight() override;
|
||||
void setClearColor(struct Color color) override;
|
||||
|
Reference in New Issue
Block a user