     GL_TEXTURE_2D [
         [
             dup render-to-texture
+            white gl-color
             GL_TEXTURE_2D over texture>> glBindTexture
             GL_QUADS [
                 [ width>> ] [ height>> ] bi 2array four-sides

! See http://factorcode.org/license.txt for BSD license.
USING: cairo cairo.ffi ui.render kernel opengl.gl opengl
math byte-arrays ui.gadgets accessors arrays 
namespaces io.backend memoize ;

IN: cairo.gadgets


    gen-texture >>texture drop ;

M: cached-cairo ungraft* ( gadget -- )
    [ texture>> delete-texture ]
    [ \ render-to-texture invalidate-memoized ] bi ;
    
M: cairo-gadget pref-dim* ( gadget -- rect )
    [ width>> ] [ height>> ] bi 2array ;
