Combine multiple GL draw modes or contexts?

Jul 9, 2010 at 4:44am

Combine multiple GL draw modes or contexts?

Hi all,

I make anaglyph graphics in Jitter GL. I use drawmode 3 5, to add colors on top of one another (so that a shape’s red view plus its blue view = white shape). The drawback, however, is that the shape’s brightness determines its opacity: dark shapes are transparent, moderately bright shapes are translucent, and only bright shapes/textures are opaque.

I’m looking for a way around that. I hope that something like the following is possible: take a shape, sum the red and blue versions (drawmode 3 5) offscreen, and then layer that result onto the scene (with regular drawmode). Is such a thing doable, i.e. are separate rendering contexts available that can render separately and then be combined on screen via a separate drawmode?

Thanks for any leads!

Dan

#51291
Jul 9, 2010 at 7:18pm

oops, and by drawmode I mean blend_mode.

P.S. A similar (and likely simpler) method would be to draw _all_ the blue content to one context (default blendmode), all the red to another(default blendmode), and then combine the two (blendmode 3 5).

possible?

#183931

You must be logged in to reply to this topic.