Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to use a virtual screen size for my libgdx desktop-android game. I'd like to always use a 16:9 aspect ratio but with a virtual screen size so everything would adapt automatically depending on the device size.

This post illustrates the process pretty well but my game crashes when camera.apply(Gdx.Gl10) is called. This is because I'm using GLES 2.0 (for not having to use multiple of 2 texture sizes). As stated in the OrthographicCamera doc, the apply method only works with GLES 1 and GLES 1.1.

Is there another way of applying my GL transformation to the camera so I can use a virtual screen resolution? Having to resize everything manually it's a total pain.

Thanks a lot.

share|improve this question
up vote 1 down vote accepted

Answer at here:

share|improve this answer
-1, While this might help the asker, you should at least copy the relevant parts of the link in case that site goes down in the future. – Tetrad Apr 16 '12 at 7:33

Your Answer


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.