Add Renderer::getAspectRatio() method
parent
972267d69f
commit
0d5e867219
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue