mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-19 08:52:33 +02:00
Fixed aspect ratio and window sizeablility
This commit is contained in:
parent
b7da2815ad
commit
cf4f451d15
@ -115,6 +115,9 @@ void render()
|
|||||||
{
|
{
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
// Update aspect ratio..
|
||||||
|
gta->renderer.camera.frustum.aspectRatio = window.getSize().x / (float) window.getSize().y;
|
||||||
|
|
||||||
gta->renderer.renderWorld(gta);
|
gta->renderer.renderWorld(gta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +131,7 @@ int main(int argc, char *argv[])
|
|||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
glewInit();
|
glewInit();
|
||||||
|
|
||||||
window.create(sf::VideoMode(WIDTH, HEIGHT), "GTA3 Viewer", sf::Style::Close);
|
window.create(sf::VideoMode(WIDTH, HEIGHT), "GTA3 Viewer", sf::Style::Close | sf::Style::Resize);
|
||||||
window.setVerticalSyncEnabled(true);
|
window.setVerticalSyncEnabled(true);
|
||||||
|
|
||||||
init(argv[1]);
|
init(argv[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user