Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

Thanks.

Regards, Matthias

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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