Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Stretch Textures to screen width and height with StretchViewport

$
0
0

I have an orthographic camera that have viewportWidth = 540 and viewporHeight = 960.

My backgrund texture is 1080×1920 pixels.

How can i resize the texture to fit the camera using a StrechViewport.

I want to use a StretchViewport so i dont have to resize every texture/sprite in the screen manually.

Is it possible?

A code example would be much appreciated!


Viewing all articles
Browse latest Browse all 434

Trending Articles