nanogui: Arrangement of memory in a PixMap
Subject:
Re: [nanogui] Arrangement of memory in a PixMap
From:
Jordan Crouse ####@####.####
Date:
24 Apr 2002 14:44:30 -0000
Message-Id: <1019658817.28018.100.camel@cosmic>
> 1). what's the memory arrangement of a PixMap (i.e. 8 bits R,G,B,A)?
The arrangement of the pixmap is identical to the arrangement of the
current display.
> 2). am I approaching this is totally the wrong way?
It depends. If you are using this exclusively on a framebuffer machine,
I would just write directly to the framebuffer with
GrOpenClientFramebuffer() and GrGetWindowFBInfo();
If you are also planning on using the X11 driver, then your best bet is
to write your data out, and then copy it using GrArea(). Thats the same
approach that is used to port games like Doom and the SDL library.
Which is better? I prefer the client side framebuffer for speed and
ease, but the GrArea() is a bit more portable.
Jordan