mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-18 16:32:32 +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);
|
||||
|
||||
// Update aspect ratio..
|
||||
gta->renderer.camera.frustum.aspectRatio = window.getSize().x / (float) window.getSize().y;
|
||||
|
||||
gta->renderer.renderWorld(gta);
|
||||
}
|
||||
|
||||
@ -128,7 +131,7 @@ int main(int argc, char *argv[])
|
||||
glewExperimental = GL_TRUE;
|
||||
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);
|
||||
|
||||
init(argv[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user