Here's one way you could do it: Grab a texture from the buffer that is the bounding box of your lasso selection. Make a lasso mask that is white only inside the selection draw the mask into the stencil buffer draw the rectangular texture you grabbed (with the stencil test on) into your destination buffer
Also, developing c extensions is not hard on OSX (I do it frequently), all the tools should already be there like on any unix-like machine. You might also consider finding someone else's C-implementation and creating a ctypes wrapper. hth, -Casey On Thu, Nov 20, 2008 at 12:40 PM, Steve <[EMAIL PROTECTED]> wrote: > > I would like to grab an arbitrarily shaped area of the color buffer, > or draw an image to the screen with a separately rendered mask. > Accomplishing either task would help solve my problem. Can anyone > point me in the right direction? I wish I could make my question more > specific, but I don't think I will be able to until I have a general > idea of what I need to implement. > > I'm still working on that painting program after about a month of > leaving it alone. It's going very well, but once in a while I run into > something like this. I am asking this particular question because I'm > working on the lasso tool. > > I may come back later asking about ways to speed up a flood fill > algorithm. I have some ideas already, but I think I will probably end > up having to either live with a slow algorithm or write a C extension, > which I hear is a pain on OS X. At any rate, that isn't really a > problem right now - it works, and it updates the screen as it works so > the user doesn't feel like everything has stopped. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
