Set 0, 0 to top left

I am trying to set up an ortho view with 0, 0 in the top left using this code:


        GameStateManager.create();
        TankGameState currentState = new TankGameState(display);
        currentState.setActive(true);
        GameStateManager.getInstance().attachChild(currentState);
        cam = display.getRenderer().createCamera(display.getWidth(), display.getHeight());
        cam.setParallelProjection( true );
        cam.setFrustum( -10, 10, 0, 800, 0, 600);
//        cam.setViewPort(0, 1, 1, 0);
//        Vector3f loc = new Vector3f( 0.0f, 0.0f, 1.0f );
//        Vector3f left = new Vector3f( -1.0f, 0.0f, 0.0f );
//        Vector3f up = new Vector3f( 0.0f, 1.0f, 0.0f );
//        Vector3f dir = new Vector3f( 0.0f, 0f, -1.0f );
//        /** Move our camera to a correct place and orientation. */
//        cam.setFrame( loc, left, up, dir );
        /** Signal that we've changed our camera's location/frustum. */
        cam.update();
        /** Assign the camera to this renderer. */
        display.getRenderer().setCamera( cam );


I have tried to do it with setFrustrum(), setViewPort() and set the camera attributes.  None of them change anything.  0, 0 remains at the bottom left of the screen.  I tried to search to see if anyone had a similar problem, but couldn't find anything.  Can anyone tell me what I am missing?

Hmm, should be possible. Though you would have to flip the screens y-axis if you don't want to have negative y-ccordinates on your screen. This causes problems with frustum culling iirc as the frustum is turned 'inside-out'. So maybe you should live with the normal coordinate system :expressionless: - but nobody stops you from trying it :slight_smile:

Thanks for the reply.  However, this line cam.setFrustum( -10, 10, 0, 800, 0, 600); is similar to the way OpenGL sets up the frustrum.  I have done this in OpenGL and it sets 0,0 to the top left with positive y going down and positive x going to the right.