I’m trying to zoom a parallax background.
I’m using glOrthof:
pGL.glOrthof(0, pCamera.getWidth(), pCamera.getHeight(), 0, -1f, 1f);
where the camera width and height takes into account the zoom factor.
I then draw my various parallax layers.
This works fine apart from the fact the zoom occurs from the top left of the layers. I’d like the zooming to be centered on a sprite whose position is x,y
I assumed that I should apply a translation using glTranslatef before zooming. This doesnt seem to be working.