Skip to main content

Loosing hardware accelleration

19 replies [Last post]
hansr
Offline
Joined: 2008-07-01
Points: 0

I'm currently writing a little test application using swing + scenegraph effects. I'm using the Decora-D3D.jar and Decora-HW.jars from the JFX preview release, and get HW accellerated effects when Decora-D3D.dll is also present. However, when I make the app's JFrame transparent using AWTUtilities.setWindowOpacity(), the HW accelleration no longer works.

Is that intended behaviour, a bug or do I need to set something else too?

Cheers, Hans

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joshua Marinacci

Yes. Because of the way windows does transparency and translucency
you will lose hardware acceleration. They completely rewrote the
window manager in Vista to fix these problems.

- Josh

On Sep 11, 2008, at 12:03 PM, scenario@javadesktop.org wrote:

> So you mean that it is impossible to do on Windows XP, because of
> how Windows XP works? Maybe it is and then it is understandable
> (albeit the bug evaluator could have been a bit more clear in his
> answer). However, I am sure I have seen translucent windows is XP
> before... But maybe that was shaped windows? (with jagged edges then).
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298839
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

OK, fine, then I understand. At least that mean that .Net will not have HW acceleration in XP either in a translucent Window. :)

Actually this hurts me like hell, I am just designing an uber cool (IMO of course) mp3 player. And it probably must have hw accel or it would be too slow. Not sure though.

Draft: http://www.migcalendar.com/external/mp3_player.png

Guess there are some decisions to make... :(

Cheers,
Mikael

Joshua Marinacci

For a lot of things HW acceleration doesn't help as much as you might
think. Looking at your interface (which is very cool, btw), I think
you'll be able to make it perform quite well under XP. It appears to
mostly be gradients and affine transformed images.

- Josh
On Sep 11, 2008, at 12:20 PM, scenario@javadesktop.org wrote:

> OK, fine, then I understand. At least that mean that .Net will not
> have HW acceleration in XP either in a translucent Window. :)
>
> Actually this hurts me like hell, I am just designing an uber cool
> (IMO of course) mp3 player. And it probably must have hw accel or it
> would be too slow. Not sure though.
>
> Draft: http://www.migcalendar.com/external/mp3_player.png
>
> Guess there are some decisions to make... :(
>
> Cheers,
> Mikael
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298848
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

Yeah, maybe it will be performant enough. The problem is the maybe. This take about $200.000 to make and you don't put that on a maybe.

What you don't see in the sceenshot is the animations. I won't settle for less than 30 fps for instance (on a normal computer).

I guess I am mostly generically disappointed. I thought that the JavaFX push would mean that graphical things would just be fast everywhere. Now it turns up in the fine print that it doesn't work if you combine x and z or platform y. Those kinds of things is what makes $$$ fly out the window. Especially so since the documentation about these kind of things are dispersed in blogs, forum posts and changelists...

Well, anyways.. Thanks for clearing things up Josh. :)

Joshua Marinacci

You are making a two hundred thousand dollar mp3 player?

Most things are fast and we do a lot of tricks in software to improve
things where the hardware and OS don't help us out, but we are still
limited in what we can do. Fortunately, both Vista and OSX have modern
buffered window managers that let us take advantage of hardware
acceleration.

Also, keep in mind that these are early days. There is still a lot
more optimization to be done (and documentation to be written).

- Josh

On Sep 11, 2008, at 12:39 PM, scenario@javadesktop.org wrote:

> Yeah, maybe it will be performant enough. The problem is the maybe.
> This take about $200.000 to make and you don't put that on a maybe.
>
> What you don't see in the sceenshot is that animations. I won't
> settle for less than 30 fps for instance (on a normal computer).
>
> I guess I am mostly generically disappointed. I thought that the
> JavaFX push would mean that graphical things would just be fast
> everywhere. Now it turns up in the fine print that it doesn't work
> if you combine x and z or platform y. Those kinds of things is what
> makes $$$ fly out the window. Especially so since the documentation
> about these kind of things are dispersed in blogs, forum posts and
> changelists...
>
> Well, anyways.. Thanks for clearing things up Josh. :)
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298855
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

> You are making a two hundred thousand dollar mp3 player?

Depends on how you calculate of course, but I would expect it to take me six months full time and a few other people some more work in the business area. So yeah, that's what it costs today.

And, it's not just an "mp3 player", it's the ULTIMATE mp3 player. ;)

How much do you think iTunes cost to make? 2.000.000?

And, it's just in the design stage. Then we need to make sure it will ROI...

migcalendar.com was even more expensive to make... Because of all the problems with JavaBeans support in different IDEs it took at least three month full time more than expected... It has ROI though.. :)

Cheers,
Mikael

Joshua Marinacci

Oh, so this is a commercial product. Then yes, 200k is very cheap.
iTunes has probably cost Apple over 100 million dollars over the
years, if not more.

In this case I would create a few technology experiments to determine
how slow particular graphical effects will be. For example, your
coverflow like component, or how much memory will be required to store
the entire mp3 library in memory.

- Josh

On Sep 11, 2008, at 12:58 PM, scenario@javadesktop.org wrote:

>> You are making a two hundred thousand dollar mp3 player?
>
> Depends on how you calculate of course, but I would expect it to
> take me six months full time and a few other people some more work
> in the business area. So yeah, that's what it costs today.
>
> And, it's not just an "mp3 player", it's the ULTIMATE mp3 player. ;)
>
> How much do you think iTunes cost to make? 2.000.000?
>
> And, it's just in the design stage. Then we need to make sure it
> will ROI...
>
> migcalendar.com was even more expensive to make... Because of all
> the problems with JaveBeans support in different IDEs it took at
> least three month full time more than expected... It has ROI
> though.. :)
>
> Cheers,
> Mikael
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298862
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

You calling me cheap?? ;)

It's commercial, but will be free for the users.

trembovetski
Offline
Joined: 2003-12-31
Points: 0

If you're running on Windows XP then yes, that's what supposed to happen.
It should work on Vista though.

Thanks,
Dmitri

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

I just saw this today as well. Why, oh why?

This effectively means that you cannot deploy apps with windows translucency at all. Almost everyone uses XP and if you create an app with translucent windows it isn't because you want to create boring interfaces, it is because you want to create stunning graphics, which needs hardware acceleration.

The fact that the bug was closed with "We'll need to disable HW acceleration (both OpenGL and
D3D pipelines) for non-opaque windows on systems other
than Vista" is beyond me.

Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6655001

Joshua Marinacci

This is a problem with Windows XP, not Scenario. As the bug says:

This is a known limitation of Windows' window translucency
support. It was only fixed it properly on Windows Vista.

On Sep 11, 2008, at 11:53 AM, scenario@javadesktop.org wrote:

> I just saw this today as well. Why, oh why?
>
> This effectively means that you cannot deploy apps with windows
> translucency at all. Almost everyone uses XP and if you create an
> app with translucent windows it isn't because you want to create
> boring interfaces, it is because you want to create stunning
> graphics, which needs hardware acceleration.
>
> The fact that the bug was closed with "We'll need to disable HW
> acceleration (both OpenGL and
> D3D pipelines) for non-opaque windows on systems other
> than Vista" is beyond me.
>
> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6655001
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298833
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

[att1.html]

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

So you mean that it is impossible to do on Windows XP, because of how Windows XP works? Maybe it is and then it is understandable (albeit the bug evaluator could have been a bit more clear in his answer). However, I am sure I have seen translucent windows is XP before... But maybe that was shaped windows? (with jagged edges then).

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

And, if it is broken on XP, shouldn't that mean that it would only be disabled on XP, not on all other platforms than Vista?

Joshua Marinacci

I believe that is correct. Is acceleration turned off on Vista?
On Sep 11, 2008, at 12:05 PM, scenario@javadesktop.org wrote:

> And, if it is broken on XP, shouldn't that mean that it would only
> be disabled on XP, not on all other platforms than Vista?
> [Message sent by forum member 'mikaelgrev' (mikaelgrev)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298841
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mikaelgrev
Offline
Joined: 2006-09-27
Points: 0

> Is acceleration turned off on Vista?

?? No, that will work.. Not sure what you mean here..

What I mean is that if XP is the problem here, then it should work on for instance Linux. Not it only works on Vista, which is still strange. The evaluator blames XP, but disables for every platform except Vista. Doesn't make sense to me..

mbien
Offline
Joined: 2007-04-29
Points: 0

> > Is acceleration turned off on Vista?
>
> ?? No, that will work.. Not sure what you mean
> here..
>
> What I mean is that if XP is the problem here, then
> it should work on for instance Linux. Not it only
> works on Vista, which is still strange. The evaluator
> blames XP, but disables for every platform except
> Vista. Doesn't make sense to me..

Well OpenGL hardware accel. is disabled on linux by default anyway. I guess (I am btw no sun employee) this is what the bug evaluator had probably in mind.

You could enable it with -Dsun.java2d.opengl=True but be warned its not very stable, you can even tear down the 3d window manager in some situations.

What is the roadmap of decora on linux? Native implementations which use cpu specific capabilities or something like that? Or will HW acceleration be only available for windows?

>You are making a two hundred thousand dollar mp3 player?
aren't this around 25€? :P

Chris Campbell

On Sep 11, 2008, at 1:39 PM, scenario@javadesktop.org wrote:
> What is the roadmap of decora on linux? Native implementations which
> use cpu specific capabilities or something like that? Or will HW
> acceleration be only available for windows?

Currently the Java/CPU backend is the default on Linux/Solaris. If
you enable the OGL-based Java2D pipeline explicitly with -
Dsun.java2d.opengl=True (and you have all the appropriate Decora jars
on the classpath, etc) then it will use the OGL-accelerated Decora
backend. (And yes, after all these years, OpenGL drivers on Linux
still aren't rock solid, but we continue to work with the driver teams
to improve this situation.)

There's a native/C/SSE/CPU backend for Decora in the works, and at
some point it can become the default for x86-based Unix-y systems.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

mbien
Offline
Joined: 2007-04-29
Points: 0

Thank you very much for the explanation Chris,

to leverage Decora we will have to use on Scenario or JavaFX based technologies or is it also planed to accelerate plain old Swing/J2D operations (like the OpenGL/D3d pipeline do)?

If I understand it correctly Decora is a backend to accelerate various JavaFX effects but no real rendering pipeline like the new Direct3d implementation.

Chris Campbell

On Sep 12, 2008, at 7:16 AM, scenario@javadesktop.org wrote:
> If I understand it correctly Decora is a backend to accelerate
> various JavaFX effects but no real rendering pipeline like the new
> Direct3d implementation.

Decora is just the internal name for the entire Effects Framework,
which forms the basis for the javafx.scene.effect package. The Decora
runtime delegates all the heavy lifting to one of the pluggable
backends (Java, native/SIMD, OGL, D3D, etc) which is most appropriate
for the current machine configuration. Some Decora backends work in
conjunction with the GPU-accelerated Java2D backends, others are
independent, but all of this is just an implementation detail.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net