couldn't one just write a custom shader and set it for an actor? or is the clutter shader api not supported by gnome-shell?
flo On Mon, 2010-03-08 at 17:40 -0500, Owen Taylor wrote: > On Tue, 2010-03-02 at 10:35 -0500, Joseph Scheuhammer wrote: > > Hi, > > > > Gnome-mag has a "cross-hair" feature for helping users find the mouse > > cursor. An example graphic can be viewed here: > > http://clown.atrc.utoronto.ca/aegis/GS-Mag/CrossHairs.png > > > > The issue is that the cross hairs cannot obscure what lies beneath > > them. As you can see in the png, the colours of the cross hair are > > blended with the background. > > > > Is colour blending possible within GnomeShell? My approach would be to > > use clutter texture objects to form the cross hairs -- are there colour > > blending functions for texture objects? I've looked at the online > > documentation (http://www.clutter-project.org/docs/clutter/stable/), and > > found transparency manipulations, but that's probably not enough. > > Should I be diving into COGL? Looking somewhere else? > > > > Any advice would be appreciated. > > To get this 'XOR' affect you'll need to go straight to OpenGL and use > glLogicOp(). You can find examples of this with a web search. This will > need to be done from C. > > Two approaches to code organization: > > - You could write a custom clutter actor that draws this way > (Using cogl_begin_gl() and cogl_end_gl() around the OpenGL code) > > - You could paint the cross-hairs on top of the stage after the > stage is completely painted, similar to how shell-recorder.c > draws the recording icon and progress bar. (You still need > the cogl_begin_gl() and cogl_end_gl() calls.) > > - Owen > > > > _______________________________________________ > gnome-shell-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gnome-shell-list _______________________________________________ gnome-shell-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-shell-list
