We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Transparency in opengl ui
Page Index Toggle Pages: 1
Transparency in opengl ui? (Read 956 times)
Transparency in opengl ui?
May 29th, 2008, 11:38pm
 
I'm trying to implement a memory conservative way of having a nice ui, not just vector based graphics but images aswell, but I can't seem to figure this one out at the moment.

So, I was wondering, have any of you fellas got any tips for me? How should I go about implementing images that are supposed to have some transparency in them. I expect I'll have to use a second b&w image as a mask, I've looked into using glshaders (but that's really above me, atleast for now and at this hour) as well as trying the inherent .mask inside processing.

Currently the images are displayed as black on my ui, with and without the mask.

Figured the symbol I'm trying to display would be faily easy to just "draw" by hand, so to speak, but even though I'm usually fairly good at that sort of thing it's getting late even for me to play around with numbers on a piece of paper =).

Anyway, any ideas or friendly pointers (to other topics I probably missed?) are really welcome.

G'night!
Re: Transparency in opengl ui?
Reply #1 - May 30th, 2008, 2:18am
 
If you save the images as PNG files with transparency, and use them as textures on quads, the transparency should just work. (Assuming you draw the UI last, in front of the background)
Re: Transparency in opengl ui?
Reply #2 - May 30th, 2008, 10:15am
 
Hmm, although it should work. It doesn't help me actually displaying the image on the ui.

At the moment, I've narrowed it down to a problem with the rest of the ui.

Can't see why they should interfer with the images I display, ít can't be a layered problem since I'm drawing the images last, made sure of that..

I.e. the images display fine if I disable the rest of the ui.
Re: Transparency in opengl ui?
Reply #3 - May 30th, 2008, 11:06am
 
Nevermind me, I'm retarded! =)

Was a "bad" fill() -> noFill() part of the other ui's that caused me some headaches!
Page Index Toggle Pages: 1