mask = lambda { #draw the "mask" for the stencil buffer}
@window.stencil mask, z=0 do
# Drawing code here
end
#clip_to
to accept a lambda or macro rendered with #record {}
? Agreed, the interface is actually doable!beginStencil
/endStencil
scheme that clipping uses. I want to slowly migrate everything to methods that take std::function<>
callback objects to make it more Ruby-like. But, whatever suits you best. :)
std::function<>
is relatively new - I forgot if it was introduced in C++11 or C++03. In any case, it was well-established as boost::function<>
before.std::function<void()> f
and then just call f()
to run the callback.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill