[racket] Creating OpenGL textures from bitmaps
At Mon, 26 Mar 2012 17:23:51 +0300, Tomi Neste wrote:
> So, is there a way to get a foreign pointer to the bitmap data
As of the latest in the git repo, `bitmap%' has a `get-handle' method'.
The result is a cpointer for a Cairo surface: a `cairo_surface_t'. In
the case of a bitmap created with `make-bitmap', the handle
specifically refers to an image surface, so you could use
cairo_image_surface_get_data() to get the image's raw bytes; I think
it's BGRA on a little-endian machine and ARGB on a big-endian machine.