Add Renderer::getAspectRatio() method

pull/3/head
Hleb Valoshka 2019-11-08 00:55:23 +03:00
parent 972267d69f
commit 0d5e867219
2 changed files with 6 additions and 0 deletions

View File

@ -8076,3 +8076,8 @@ void Renderer::setRenderRegion(int x, int y, int width, int height, bool withSci
setViewport(x, y, width, height);
resize(width, height);
}
float Renderer::getAspectRatio() const
{
return static_cast<float>(windowWidth) / static_cast<float>(windowHeight);
}

View File

@ -114,6 +114,7 @@ class Renderer
#endif
void shutdown() {};
void resize(int, int);
float getAspectRatio() const;
float calcPixelSize(float fovY, float windowHeight);
void setFaintestAM45deg(float);