Hi all,
I can get vertical synchronization in full screen exclusive mode with JDK1.5
but not with JDK1.6. I am using the strategy outlined at
http://java.sun.com/javase/6/docs/api/java/awt/image/BufferStrategy.html. I
tested this on two systems and the outcome is the same. The systems are:
System 1:
OS: Linux-x86_64 (Fedora 8)
Graphics card: NVidia Quadro FX 570M
NVIDIA Driver Version: 173.14.09
X Server: Xorg version 1.3.0.0
System 2:
OS: Linux-x86 (Ubuntu 8.04)
Graphics card: NVidia GeForce Go 6400
NVidia driver version: 169.12
X Server: Xorg 1.4.0.90
I tested the same code on these two systems enabling/disabling opengl pipeline
(-Dsun.java2d.opengl=True/False) and with jdk1.5 and jdk1.6. The only
combination where I get the correct behavior is jdk1.5 and opengl pipeline
enabled (on both systems). (Note on a Windows XP machine it works with both
JDK1.6 and 1.5)
Here is a part from the code:
....
createBufferStrategy(2);
bs = getBufferStrategy();
for (int j = 0; j < nRepeat; j++)
for (int i = 0; i <= getWidth() - bi.getWidth(); i += bi.getWidth())
displayImage(i, y, bi);
...
public void displayImage(int x, int y, BufferedImage bi) {
do {
do{
Graphics g = bs.getDrawGraphics();
g.setColor(getBackground());
g.fillRect(0, 0, getWidth(), getHeight());
g.drawImage(bi, x, y, null);
g.dispose();
}while(bs.contentsRestored());
bs.show();
}while(bs.contentsLost());
}
Expected outcome is a bar smoothly moving from left to right (bi is just that,
a vertical bar) on a black background.
Any ideas? Thank you.
[Message sent by forum member 'boyaci' (boyaci)]
http://forums.java.net/jive/thread.jspa?messageID=285070
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".