Aplha and Performance

When i create Colors with Aplha value, it gives me jerks / tiny halts. Same Happens when rendering those colors !
Isnt Transperancy in 2D Api supported in hardware ?

I think only bitmask transparency is hardware accellerated.

There are properties that can be set to enable hardware acceleration for true alpha channels. I can’t remember them off-hand… search the forums.

For short, the properties are :

-Dsun.java2d.translaccel=true
-Dsun.java2d.ddforcevram=true 

A complete explanation is giben by trembovetski in this forum (Topic: Info:HW support for translucent images in 1.4.1_02).

It works fine in 1.4.2 beta on Windows (x3 speed) and seems to work also in 1.4.1_02 (I havn’t try it on that JDK).

Just though I’d say thanks for this info, its really changed the look and feel of my stuff…

I’ve tried it on event the most weedy of platforms and I still get accelerated alpha (at least on windows)…

Is there any known case where this doesn’t work… if not, this information needs to be added to the article on accelerated images,

Thanks again,

Kev

It might be worth testing it on ATI gfx cards. I know there were quite a few issues with hardware acceleration+ATI in <1.4.2.

I’m using an ATI in my laptop… everything’s fine :slight_smile:

I’ve been using it for the last month or two and works great on 1.4.2 but doesn’t doesn’t produced accelerated images with 1.4.1 (not sure about exact version) even though it was said to be working on even earlier verisons. Something must of been changed in 1.4.2 and that is why they finally felt comfortable to give us the extentions for enabling it.

Just a quick question before I decide what direction to go with my graphics Objects… Do the new flags allow a full Alpha Channel to be supported (as with PNG) and if so does JAVA handle PNG effectively on it’s own or should I be using an outside package (like sixlegs). Or are we just talking about speeding up calls like:

g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f));

Thanks!

yes, with the new flags all alpha operations are accelerated. (whether it be alpha integral to an image [such as PNG files] or alpha added at a later stage [AlphaComposite])

I seem to remember there was 1 situation where acceleration isn’t applied, even though it could be - but I can’t remember what situation it occured in. (not worth worrying about though)