Re: Cavas Performance
- From: Sean Middleditch <sean middleditch iname com>
- To: Elliot Lee <sopwith redhat com>
- CC: gnome-devel-list gnome org
- Subject: Re: Cavas Performance
- Date: Sat, 06 Nov 1999 20:23:20 -0500
Elliot Lee wrote:
> On Sat, 6 Nov 1999, Sean Middleditch wrote:
>
> > As I started before, I'm writing a GTK/GNOME based Role-Playing Games
> > based on an old text-based roguelike I made. I want to use some
> > REALLY nice graphics (I have a great DOS based pseudo-3D engine I was
> > going to port: it's perfect for my needs). The only method of
> > embedding graphics into an app that I can find is the canvas (I've
> > heard of an OpenGL widget, but I don't know OpenGL, and I've never
> > been able to get Mesa to build right for my nVidia card).
> >
> > So, if I use the canvas, is it easily possible for me to build a
> > graphic and post it onto the canvas (the engine will render to a
> > memory buffer, then send to the canvas). How would I do this? Is
> > there an easy to use Imlib and other standard GTK/GNOME graphics
> > libraries for loading the pixmaps?
>
> If all you want to do is to easily get a picture to the screen as fast as
> possible, feed an RGB buffer to GdkRGB. The canvas is used for handling
> structured 2D graphics (i.e. when you have a bunch of
> lines/rectangles/other canvas items, and want the canvas to take care of
> rendering things).
Hmm... I can't seem to find any documentation on doing this. Could you
perhaps give me a small code snippet so I could see how, or point me to some
documentation on GdkRGB. And if you tell me it's in Havoc's book, I'm going
to feel very stupid, because it's currently my favorite programming book...
;-)
I read that pixmaps are "server side resources." I also read that all data
between the X server and a client is through a socket of some kind, even if
the server and the client are on the same machine. Does that mean that I'd
get a big performance hit if I loaded a graphic with Gdk as a pixmap (and it
got stored on the server), and I read the pixel data from the pixmap over and
over while building a graphics (in client memory), and then sent it to the
server with GdkRGB? If so, is there a way to use Gdk or Imlib or some other
GTK/GNOME graphic library to load a graphics into client memory?
Sean Middleditch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]