Hi,
I need to turn the java2D coordinate system into the proper cartesian system with the origin in the bottom left corner. I used the suggested transform and it works.
Problem: scale(1, -1) causes FPS to go from 40 -> 1 (loses acceleration for some reason).
My game uses Java2D to draw & a BufferStrategy for buffering, and texture images are stored as VolatileImages and painted on to the BufferStrategy’s buffer. Normal scaling by say scale(0.75, 0.75) works fine but scale(1, -1) must cause Volatilemage -> BufferStrategy acceleration to fail.
As a work-around I pre-loaded my VolatileImage textures up-side down and then without doing any scaling I translated them such that they appeared where they should in the new coordinate system. This means that I have to use the scaling transform for graphics.drawLines(…) but the work-around transform for graphics.drawImage(). But this doesn’t work either because when I go to paint the textures onto the BufferStrategy I use a clipping shape that is one of my game objects and to get the right clip without the scaling transform I need to manually flip & translate the actual shape… Grrrrrrr.
I was trying to make things easier by using a more familiar coordinate system but with all of these work-arounds its defeating the purpose. So two questions:
[b]1. What is the simple answer?
- Why aren’t negative scaling transforms accelerated for VolatileImages on my windows XP pc whether I use Java2D or its openGL pipeline?[/b]Thanks heaps,
Keith