Emmanuel Pietriga wrote:
Hi Emmanuel,
I believe this is a known issue; see:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026186
There are a few bugs in Nvidia's and ATI's drivers that affect our OGL
pipeline on Windows that should be resolved over time, as we submit
testcases to those driver teams.
Ok, thank you.
Now, I've found another problem related to the OpenGL pipeline.
Switching to XOR mode (using Graphics.setXORMode(Color c)) when I want
to paint things in a JPanel does not work, i.e. the painting
instructions executed after a call to setXORMode() do not have any
effect on screen.
I've attached a simple test case. If you launch it without opengl
enabled, you will see what could be a crosshair cursor at the red
rectangle's top left corner (just two lines painted in XOR mode). Now,
if you launch it with -Dsun.java2d.opengl=true, the red rectangle does
appear, but the two lines don't.
Again, please tell me if that's already a known issue (I could not find
anything in the bug DB about this). If not, I'll file a report.
Thanks,
Emmanuel
--
Emmanuel Pietriga
INRIA Futurs - Projet In Situ tel : +33 1 69 15 34 66
Bat 490, Universit� Paris-Sud fax : +33 1 69 15 65 86
91405 ORSAY Cedex http://www.lri.fr/~pietriga
===========================================================================
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".
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.geom.*;
public class GLxor extends JFrame {
public GLxor(){
Container cpane=this.getContentPane();
final JPanel tp=new TestPanel();
cpane.add(tp);
WindowListener w0=new WindowAdapter(){
public void windowClosing(WindowEvent e){System.exit(0);}
};
this.addWindowListener(w0);
this.setSize(300,300);
this.setVisible(true);
}
public static void main(String[] args){
GLxor t=new GLxor();
}
}
class TestPanel extends JPanel {
public void paint(Graphics g){
super.paint(g);
g.setColor(Color.red);
g.fillRect(100,100,100,100);
g.setXORMode(Color.white);
g.setColor(Color.black);
g.drawLine(90,100,110,100);
g.drawLine(100,90,100,110);
}
}
===========================================================================
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".