Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
I use the default xorg.conf on my ubuntu 8.04, on a system with Nvidia chip. Note that I _don't_ use the NVIDIA's proprietary drivers, and the default window manager is used. I have the following relevant extensions (as reported by xdpyinfo) DOUBLE-BUFFER RANDR In this configuration the full screen exclusive mode (including display mode changing) is supported and works fine. However, the OpenGL pipeline couldn't be enabled, the proprietary drivers are required for that. The vsync doesn't seem to be working (in 6u10) in this config. Our experiences starting to converge now. With the 6u10 I got both ubuntu and Fedora go into FSEM. Display mode change is possible. Only vsync still fails. But somehow even with the proprietary NVidia module and opengl extensions, I was able to get FSEM. I guess you have a point that there are so many possible configurations options on Linux... If you feel that this change in behavior is something that needs to be addressed, I encourage you to contact IcedTea guys, see if they could come up with a fix which we can incorporate into the openjdk source base. Thanks, Dmitri == === 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. [Message sent by forum member 'boyaci' (boyaci)] http://forums.java.net/jive/thread.jspa?messageID=289669 === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
[EMAIL PROTECTED] wrote: Our experiences differ, then. It works just fine if you have RANDR extension set up and configured. Try running your application with J2D_TRACE_LEVEL=4 env. variable set, see if it prints out any errors. No errors reported. We have only seen a handful of people using full screen mode on linux - in part because it takes a lot to configure the linux system to work. There's a lot of variables (xinerama, randr, xrender extensions, compositing window managers) which affect the ability of applications (not just Java) to enter FSEM. Could you be so kind to share your experience with using those xorg.conf options for FSEM vsync? I'm sure this way more Linux users can enjoy what MS Windows and Mac OS X users do. (Just setting RandR option on had no effect on vsync by the way.) I use the default xorg.conf on my ubuntu 8.04, on a system with Nvidia chip. Note that I _don't_ use the NVIDIA's proprietary drivers, and the default window manager is used. I have the following relevant extensions (as reported by xdpyinfo) DOUBLE-BUFFER RANDR In this configuration the full screen exclusive mode (including display mode changing) is supported and works fine. However, the OpenGL pipeline couldn't be enabled, the proprietary drivers are required for that. The vsync doesn't seem to be working (in 6u10) in this config. Also, in this config I can use shaped windows support introduced in 6u10, but _not_ window opacity and non-opaque windows (the latter is reported as supported but doesn't work.. I would need to start compiz for that. If I do install the proprietary drivers, then the OpenGL pipeline works fine, but for inexplicable reason I lose the ability to enter/exit fs mode (the proprietary drivers probably disable RANDR extension or something to that effect). This is what I mean when I say that it's very hard to configure a linux system properly so that everything works fine, something is always broken. I think in 5 we used DBE (double buffer extension) for creating implementing buffer strategy, may be something changed in 6 - I can't think of what though. This is very discomforting. One wonders what's not gonna work next time. You're the first to complain about this. I'm sorry, I can't understand the response. Do you mean there is actually no such problem, or do you mean something else. Remember, I was referring to the fact that vsync works fine with 1.5 on Linux but not with 1.6 anymore (save for my possibly wrong/missing xorg.conf settings, of course). What I meant to say is that we can't test every possible configuration, especially on linux, we rely on our users to tells us if something is wrong. Then we can prioritize our efforts depending on how many people are affected. In this case, since you're the first one to report this issue it's either not wide spread, or noone cares. In either case we can't devote too much effort to find out what's wrong. Note that this behavior - the vsync-ing BufferStrategy - is not documented, nor supported - it's just something of a side effect. If you feel that this change in behavior is something that needs to be addressed, I encourage you to contact IcedTea guys, see if they could come up with a fix which we can incorporate into the openjdk source base. Thanks, Dmitri === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
Dear Dmitri, thank you for your response. Our experiences differ, then. It works just fine if you have RANDR extension set up and configured. Try running your application with J2D_TRACE_LEVEL=4 env. variable set, see if it prints out any errors. No errors reported. We have only seen a handful of people using full screen mode on linux - in part because it takes a lot to configure the linux system to work. There's a lot of variables (xinerama, randr, xrender extensions, compositing window managers) which affect the ability of applications (not just Java) to enter FSEM. Could you be so kind to share your experience with using those xorg.conf options for FSEM vsync? I'm sure this way more Linux users can enjoy what MS Windows and Mac OS X users do. (Just setting RandR option on had no effect on vsync by the way.) I think in 5 we used DBE (double buffer extension) for creating implementing buffer strategy, may be something changed in 6 - I can't think of what though. This is very discomforting. One wonders what's not gonna work next time. You're the first to complain about this. I'm sorry, I can't understand the response. Do you mean there is actually no such problem, or do you mean something else. Remember, I was referring to the fact that vsync works fine with 1.5 on Linux but not with 1.6 anymore (save for my possibly wrong/missing xorg.conf settings, of course). [Message sent by forum member 'boyaci' (boyaci)] http://forums.java.net/jive/thread.jspa?messageID=288236 === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
[EMAIL PROTECTED] wrote: Not at this point. We'll be adding API to do that in Java 7 hopefully. In 6u10 we added some internal API to request a vsync-ed strategy. This API is in sun.* package so it may change or go away in the future so I'm not sure of how much use it is. Is this all specific to Linux or is it a general, OS independent problem? Not sure what you mean. The internal API is not specific to Linux if that's what you're asking. Hm, I don't believe we supported fullscreen mode on Linux until 6, so I'm not sure how you could get it to work there. True FSEM doesn't even work in 6u10 with Linux anymore. Things seem to get worse. Our experiences differ, then. It works just fine if you have RANDR extension set up and configured. Try running your application with J2D_TRACE_LEVEL=4 env. variable set, see if it prints out any errors. We have only seen a handful of people using full screen mode on linux - in part because it takes a lot to configure the linux system to work. There's a lot of variables (xinerama, randr, xrender extensions, compositing window managers) which affect the ability of applications (not just Java) to enter FSEM. I think in 5 we used DBE (double buffer extension) for creating implementing buffer strategy, may be something changed in 6 - I can't think of what though. This is very discomforting. One wonders what's not gonna work next time. You're the first to complain about this. Thanks, Dmitri === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
thanks Ken, the code is in your mailbox. [Message sent by forum member 'boyaci' (boyaci)] http://forums.java.net/jive/thread.jspa?messageID=285387 === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
[EMAIL PROTECTED] wrote: Note that vsync is not really guaranteed by BufferStrategy, no matter if it's FSEM or windowed mode. That's very sad to know. Is there an alternative to using BufferStrategy to achieve vsync in Java? Not at this point. We'll be adding API to do that in Java 7 hopefully. In 6u10 we added some internal API to request a vsync-ed strategy. This API is in sun.* package so it may change or go away in the future so I'm not sure of how much use it is. Note that on linux it would only work for the opengl pipeline. Hm, I don't believe we supported fullscreen mode on Linux until 6, so I'm not sure how you could get it to work there. I think you are probably right. GraphicsDevice.isFullScreenSupported() returns false. But does so both with 1.5 and 1.6!? So When I get a nice vsync in FSEM with 1.5, it is probably the fake FSEM as described here: http://java.sun.com/docs/books/tutorial/extra/fullscreen/exclusivemode.html Have you tried windowed mode on the same systems with 6.0 or 5.0? Do you get vsync then? Same outcome. I get vsync with 1.5 but not 1.6. I think in 5 we used DBE (double buffer extension) for creating implementing buffer strategy, may be something changed in 6 - I can't think of what though. Thanks, Dmitri [Message sent by forum member 'boyaci' (boyaci)] http://forums.java.net/jive/thread.jspa?messageID=285385 === 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. === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
My latest version of VSyncApplet toggles between the use of Image and BufferedImage for simple drawing. Both are rendered to the screen with BufferStrategy. I see disturbing results. BufferedImages are half as fast as Image for simple drawing. I'm probably doing something wrong. Any improvement in the code will be appreciated. The code: http://pancyl.com/java/vsync/VSyncApplet.java http://pancyl.com/java/vsync/VSyncCanvas.java http://pancyl.com/java/vsync/VSyncFS.java http://pancyl.com/VSync.htm Enter fullscreen mode -- F1 Exit fullscreen mode -- ESC === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
BufferedImages are half as fast as Image for simple drawing. I'm probably doing something wrong. Any improvement in the code will be appreciated. After repeatedly insulting the Java2D team members that were trying to have a constructive dialog, i wouldn't hold my hopes too high. [Message sent by forum member 'kirillcool' (kirillcool)] http://forums.java.net/jive/thread.jspa?messageID=285466 === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
I think you misunderstand my intentions. The applet shows a profound defect in the Java2D API. Either the applet is wrong or the Java2D API needs work. I'm trying to illuminate the problem with my applet. If the applet uses the Java2D API wrong when I use standard programming strategies, then let's figure out why and fix it. If you think you are contributing to a constructive dialog with your comment then maybe you should rethink your perspective. Or not. I really don't care much what you think. [EMAIL PROTECTED] wrote: BufferedImages are half as fast as Image for simple drawing. I'm probably doing something wrong. Any improvement in the code will be appreciated. After repeatedly insulting the Java2D team members that were trying to have a constructive dialog, i wouldn't hold my hopes too high. [Message sent by forum member 'kirillcool' (kirillcool)] http://forums.java.net/jive/thread.jspa?messageID=285466 === 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. === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
I've done (redone the wheel likely) a fake full screen code. I'm not going to spam the forum again with it. The only thing that changed is that the construtor now starts with the correct (hopefully) size: ... setExtendedState(MAXIMIZED_BOTH); Insets i = getToolkit().getScreenInsets(getGraphicsConfiguration()); Rectangle max = new Rectangle(getToolkit().getScreenSize()); max.x += i.left; max.y += i.top; max.width -= i.right; max.height -= i.bottom; setBounds(max); ... and the awteventlistener is now: public void eventDispatched(AWTEvent e) { WindowEvent evt = (WindowEvent) e; if (PROCESS_WINDOW_EVENTS evt.getID() == WindowEvent.WINDOW_DEACTIVATED evt.getWindow() == JFrame.this evt.getOppositeWindow() == null JFrame.this.isFullScreen()) { JFrame.this.setExtendedState(JFrame.ICONIFIED); } I haven't seen problems with on linux java 1.6 with the additional evt.getWindow() == JFrame.this, but i'm not sure about 1.5 anymore (don't have it). There is a small problem with the order on the alt-tab on windows (it doesn't move to the selected aplication, but keeps on the last - i have no idea why). [Message sent by forum member 'i30817' (i30817)] http://forums.java.net/jive/thread.jspa?messageID=285494 === 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.
[JAVA2D] vertical synchronization in full screen exclusive mode problem
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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
Do you feel like posting the whole code? I'd like to turn it into an applet for test purposes. It would be an excellent test program. I'll repost it as an applet. You can email it to me direct at: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 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. === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
Hi, [EMAIL PROTECTED] wrote: 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: Note that vsync is not really guaranteed by BufferStrategy, no matter if it's FSEM or windowed mode. 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) Hm, I don't believe we supported fullscreen mode on Linux until 6, so I'm not sure how you could get it to work there. Have you tried windowed mode on the same systems with 6.0 or 5.0? Do you get vsync then? Thanks, Dmitri 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. === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
Oh, http://pancyl.com/VSync.htm [Message sent by forum member 'demonduck' (demonduck)] http://forums.java.net/jive/thread.jspa?messageID=285247 === 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.
Re: [JAVA2D] vertical synchronization in full screen exclusive mode problem
Well, I made an applet that I don't think really demonstrates much. It just moves a bar across the screen -- 1 pixel per draw. The numbers in the lower left is the approximate number of frames per second. You can enter fullscreen (exclusive?) mode by pressing F1 and exit with ESC. I don't know if this applet really shows anything important but it was a fun afternoon project. If anyone sees anything useful, post a reply... [Message sent by forum member 'demonduck' (demonduck)] http://forums.java.net/jive/thread.jspa?messageID=285246 === 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.