Bug 1009 : Present mode and OPENGL not working in 0156 with Windows Vista
Last modified: 2008-11-23 10:22




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
peterkirn
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-11-13 12:33
0156 corrects full-screen present mode placement for me, but only in the
default renderer. If you switch to OPENGL and choose present mode in Vista
SP1, you get no output at all except the "stop" text. (Running from within
NetBeans or running an app, you get a blank, black screen; running from
within the Processing IDE, you get the default IDE background color for
present.) Rendering inside a window works fine.

I haven't yet tried this on other operating systems.

Extremely simple code example:

import processing.opengl.*;

void setup() {
size(800,600,OPENGL);
}

void draw() {
background(255);
}
Additional Comment #1 From fry 2008-11-13 16:26
This is working fine on other platforms (XP is fine, for instance), so I
think this is another Vista graphics problem.
Additional Comment #2 From peterkirn 2008-11-13 17:40
Yes, that seems likely; fullscreen OpenGL doesn't play all that nicely with
Aero because of some odd implementation issues.

It's possible it is even driver-specific. I'm running NVIDIA's 7.15.11.6749
driver, which is actually a bit old (12/07) though it's the latest the OEM
provides. I'll update this report if I'm able to test other drivers / machines.
Additional Comment #3 From peterkirn 2008-11-15 12:01
The issue is with JDK 6 Update 10 only; OPENGL renderer displays a blank
screen in present mode. (Other renderers are fine.)

So far have only tested NVIDIA graphics drivers and Vista SP1.

With JDK 6 Update 7, the problem is not present. Fullscreen present mode
works correctly with OPENGL. However, it appears framerates are adversely
impacted with desktop window manager effects (Aero compositing) turned on.
Switching to the Classic theme improves performance. This appears to mean
that Aero effects are not being disabled when entering fullscreen mode, as
theoretically they should be.

Unfortunately, JDK Update 7 also appears to have been removed from Sun's
download servers.
Additional Comment #4 From peterkirn 2008-11-15 12:27
FYI, update 10 does default to a new Direct3D-accelerated render pipeline,
which can be disabled with -Dsun.java2d.d3d=false
... which in turn can cause issues with 3D in applets:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6670586

That's a separate issue that shouldn't have any bearing on JOGL, though;
I'm trying to find the change that would have impacted JOGL.

(JOGL fullscreen can work with Vista and u10; in JOGL-only apps I have it
working, though I don't know if that's a different version.)
Additional Comment #5 From fry 2008-11-15 13:03
Ouch, that's good to know--I was planning to update to 6u10 for the Windows
and Linux releases before 1.0. @#$(@#($
Additional Comment #6 From peterkirn 2008-11-15 13:49
Ha! Found it. I was right -- it's them mucking around with the Direct3D
pipeline. It seems that now causes repaint/buffer issues -- presumably you
don't actually get the buffer out to the screen. (sounds like they're
tripping over the still buggy and complex Desktop Window Manager introduced
in Vista)

If I add this property:
-Dsun.java2d.d3d=false

-- boom, fixed. Sun says that this could theoretically degrade performance,
but it seems like OpenGL rendering isn't going through the Direct3D
pipeline for J2D anyway, correct? (and, anyhow, performance looks fine to
me ... and is dramatically better than getting a blank screen)

u10 does include a whole bunch of compatibility and performance fixes for
Vista, and it seems to bump up framerates in windowed mode. So, I do get
the sense that adding u10 support would be a good thing, if there's a way
to employ this workaround.
Additional Comment #7 From fry 2008-11-23 10:22
After looking into this, unfortunately -Dsun.java2d.d3d=false has to be set
from the command line (not from code) which makes it really tricky for the
situations in which Processing apps are used (e.g. I'd have to modify how
the application is exported, its runtime options, etc based on whether
Vista is running).

Instead, for 0159 and later, when run inside the PDE, only Mac OS X uses
exclusive mode with Present. Windows and Linux just do full screen windows.
When run outside the PDE, all three simply create an undecorated window the
size of the entire screen, and on the Mac, an option is added to the
Info.plist file to hide the dock and menubar (since that cannot be done
programatically from Java).

The end result is that this is fixed for 0159 and later (1.0).