[quote]Ok, something is severely wrong…
Test2 prints: (I’ve put it all on one line)
12, 26, 22, 25, 26, 22, 26, 26, 21, 26, 26, 22, 26, 26, 22, 26, 19, 16, 16, 19, 15, 25, 25, 21, 26, 25, 21, 26, 23, 21, 26, 26, 20, 26, 25, 21, 24, 25, 22, 24, 21
The screen shows the striped Aqua background.
What resolution is the screen? I wonder if other resolutions would have different speeds?
[/quote]
hmm, from that I can conclude only 1 thing,
I have no idea what is going on
Heres the code
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class Test2 extends Frame
{
volatile boolean running = true;
public Test2()
{
enableEvents(AWTEvent.KEY_EVENT_MASK);
setUndecorated(true);
GraphicsDevice gd = getGraphicsConfiguration().getDevice();
gd.setFullScreenWindow(this);
gd.setDisplayMode(new DisplayMode(800,600,16,60));
createBufferStrategy(2);
int frameCount =0;
long lastTime = System.currentTimeMillis();
String frameRate = "N/A";
while(running)
{
if(System.currentTimeMillis()-lastTime>1000)
{
lastTime = System.currentTimeMillis();
System.out.println(String.valueOf(frameCount));
frameCount=0;
}
BufferStrategy bs = getBufferStrategy();
frameCount++;
getBufferStrategy().show();
}
dispose();
}
public void processKeyEvent(KeyEvent ke)
{
if(ke.getKeyCode()==KeyEvent.VK_ESCAPE) running = false;
}
public static void main(String [] args)
{
new Test2();
}
}
From those results, I would guess that :-
a) it isn’t using page flipping in fullscreen.
b) therefor, fullscreen won’t be vsynced.
c) it is backbuffering in main memory not vram.
d) it can’t even blit a single 800x600 rectangle from main memory to vram at 60fps :-/