]> Dogcows Code - chaz/openbox/blobdiff - otk/rendertest.cc
add rendercolor class, with a cache of gcs for the colors
[chaz/openbox] / otk / rendertest.cc
index 2cf63f371f8a619b25a2fe3ca11e9471954d607e..fcdad6fd42e47f7d0356af6184aa0acfbe5a0bc6 100644 (file)
@@ -1,5 +1,6 @@
 #include "otk.hh"
 #include "rendercontrol.hh"
+#include "rendertexture.hh"
 
 #include <stdio.h>
 #include <X11/Xlib.h>
@@ -11,18 +12,14 @@ int main(int argc, char **argv)
   otk::Application app(argc, argv);
   otk::AppWidget foo(&app);
   foo.resize(600, 500);
-  foo.show();
   
-  otk::RenderControl *rc = otk::RenderControl::getRenderControl(0);
+  otk::RenderTexture tex;
+  foo.setTexture(&tex);
 
-  rc->render(&foo);
-  XSetWindowBackgroundPixmap(**otk::display, foo.window(), foo.pixmap());
-  XClearWindow(**otk::display, foo.window());
+  foo.show();
   
   app.run();
 
-  delete rc;
-
   printf("\n");
   return 0;
 }
This page took 0.020586 seconds and 4 git commands to generate.