You Are Here:

Community: Developer Discussion Boards

#1 Old jsr-184: transparent color not work ? - 2004-11-15, 23:24

Join Date: Sep 2003
Posts: 67
Location: Ukraine
abovesun
Offline
Regular Contributor
I try to create translucent plane:
...
VertexBuffer vertexBuffer = new VertexBuffer();
vertexBuffer.setPositions(POSITIONS_ARRAY, 1.0f, null);
vertexBuffer.setDefaultColor(0xAA00FF00);
...
But plane not translucent, it is simply green.
Reply With Quote

#2 Old 2004-11-22, 07:43

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
Hello

I don't know too much about JSR-184 but I may have an idea of the cause of your problem (I know quite some stuff about real-time CG on the other hand ;) ).

Setting up an alpha for your polys might not be sufficient to get them actually appear translucent. You also have to tell the renderer how to use that alpha value for rendering, i.e. you have to set up the blending state.

In JSR-184, it seems to be done through the CompositingMode class, but you'll have to look on your own from there.

You should be aware that alpha-based blending can be quite troublesome since polys have to be sorted for proper results. I suggest you use additive blending (ALPHA_ADD in JSR-184) or modulate blending in place (those modes give the same result whatever the rendering order is).

You should also expect some speed loss as blending is quite CPU expensive. This might be a real problem on some terminals.

Have fun !
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ