If I resize the window (e.g. fullscreen) the texture size also changes!

I want that behaviour: If I change to fullscreen you will see more of the game world. The size (Pixel) of the texture stay the same. Not a scaling.


Regards, Matthias


In your main ApplicationListener where you create a camera object there will also be a resize method. If not override/implement it. It takes two arguments and when the window is resized these will be the dimensions of the newly resized window. Just set the cameras size to the new window size and call camera.update(); Should sort it! (I assume you are using the built in OrthographicCamera class of Libgdx)

Hope this helps


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.