?

Log in

No account? Create an account

Previous Entry | Next Entry

Update on Gnometris and Clutter

I finally found some time this weekend to work on the Clutter port of Gnometris.

My approach--at least for now--is to use a compile-time ./configure flag "--enable-clutter" which sets all the cflags and linker options and defines HAVE_CLUTTER. Using this define, I take the existing rendering code to surgically alter and redirect all cairo drawing operations to off-screen pixmaps. And then, I move the off-screen cairo surface to a texture. I short-circuit a lot of calls to draw() and redraw() since they have no value in this approach. Instead, any moveBlockFoo() method just manipulates the actors at the same time it touches the block data.

Unfortunately, I can't get anything but plain old rectangles to show up on the stage. I'm not sure what I'm doing wrong and have resorted to reading /usr/include/clutter/clutter-cairo/clutter-cairo.h as the only API documentation that I've been able to find.

For now, I'm staying away from the C++ Clutter bindings until they stabilize a bit more. There's not going to end up being that much code to convert to C++ at that time, anyway.

Comments

( 1 comment — Leave a comment )
(Anonymous)
Aug. 11th, 2008 04:09 pm (UTC)
as I said on the #clutter channel - just destroy the cairo context: it will automagically upload the contents to the texture.

as I side note, I just moved the annotations for the API from the source code to the header; this should make the API more useful.

ideally, we'd like to move the cairo support straight into ClutterTexture, so you could do:

cr = clutter_texture_create_cairo_context();

we need to have a look at how to do it properly, but it's on the 1.0 plan.
( 1 comment — Leave a comment )

Profile

color, uphair, smile
jasondclinton
Jason D. Clinton

Latest Month

September 2011
S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 

Tags

Page Summary

Powered by LiveJournal.com
Designed by Tiffany Chow