RenderingAttributes.setEnableColorComponentWrite

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? :slight_smile:

Kev

[quote]Am I an idiot or what? :slight_smile:
[/quote]
I havn’t got a clue about your question, but am I still allowed to answer that? ;D

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…
[/quote]
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.