Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RenderingAttributes.setEnableColorComponentWrite  (Read 917 times)
0 Members and 1 Guest are viewing this topic.
Offline kevglass

« JGO Spiffy Duke »


Medals: 211
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Posted 2004-01-06 19:14:58 »

Does setEnableColorComponentWrite() work yet? I'm not sure if I'm getting this right but I just want to write alpha values so I called:

setEnableColorComponentWrite(false,false,false,true);

But when I write geometry with these rendering attributes basically nothing seems to come out...

Any ideas? Am I an idiot or what? Smiley

Kev

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2004-01-06 19:52:34 »

Quote
Am I an idiot or what? Smiley

I havn't got a clue about your question, but am I still allowed to answer that? Grin

Offline Yuri Vl. Gushchin

Senior Devvie




Speak Java!


« Reply #2 - Posted 2004-01-07 08:59:26 »

setEnableColorComponentWrite() works and 100% tested.

I used it in conjunction with custom build of JOGL (one that supports disabling swap buffers) to implement stereo glyph rendering (for red-blue and red-green glasses).

In your case, you just disabled writing to all color planes (R, G and B), so you will not see any visible changes anyway - only alpha writes are enabled, but they go to Alpha buffer, not to color buffer.

To see the effect, you have to enable Alpha buffer when creating CanvasPeerImpl by passing appropriate GLCapabilities with non-zero alpha buffer bitsize, then render with alpha write enabled, and use destination alpha value for something (blending, testing, etc.). But, AFAIK, there is still missing blending modes that support DST Alpha, I planned to add them but it was low-prio.

Quote
But when I write geometry with these rendering attributes basically nothing seems to come out...


Can you pls explain of what you are expecting to see?

Yuri

P.S. Check also Xith3DColorComponentWriteTest - hit space and you'll see it works.

Yuri Vl. Gushchin
JProof Group
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (35 views)
2014-12-09 22:41:13

BurntPizza (70 views)
2014-12-08 04:46:31

JscottyBieshaar (32 views)
2014-12-05 12:39:02

SHC (44 views)
2014-12-03 16:27:13

CopyableCougar4 (40 views)
2014-11-29 21:32:03

toopeicgaming1999 (108 views)
2014-11-26 15:22:04

toopeicgaming1999 (94 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!