Re: draw a 16bpp unindexed image on PC linux



>From: John Cupitt <john cupitt ng-london org uk>
>
>http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/index.html
>
>you keep the image in memory as a 24 bit RGB and it will render
>it to any display device for you (8, 16, 24, 32 bit etc.). Is that
>what you need?

The demo looks great.

I wrote a software with GTK 1.*, but now I changed to GTK 2.0.
I did not change any code and I'm not sure should I change.

I draw to 24-bit RGB rowstrided image which I created with malloc.
I update the drawing area with gdk_draw_rgb_image().
The full update takes 80+ msec -- i.e., max frame rate is as low
as 12 frames per second. Drawing to RGB image takes time as well,
and so the frame rate drops too low. Image size is 900x600.

When little objects moves in the image, the update is not
a problem. How to get the full update faster? Are RGB images
wrong choise for that?

Is it wise to draw lines to RGB image by drawing to drawable
and copying the content to pixbuf? I would not want re-write
drawing routines? Should I use some other drawing library?
gegl? libart? svg something? OpenGL?

Juhana



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]