[racket] Creating OpenGL textures from bitmaps

From: Tomi Neste (tomi.neste at gmail.com)
Date: Mon Mar 26 10:23:51 EDT 2012

Hi!

I'd need to use bitmaps rendered with the graphics toolkit as OpenGL
textures in a GL context created by a foreign library (like GLFW, for
example). I was looking through the documentation but couldn't any
information on how to bind Racket bitmaps as GL textures. The SGL
examples seem to do a byte-by-byte copy of a Racket byte-vector
acquired with get-argb-pixels which seems redundant and slow since I
assume the bitmap is already stored in some format that could be
directly used by OpenGL texture creation functions.

So, is there a way to get a foreign pointer to the bitmap data (and
format information) or is there some other way to accomplish what I'd
need?

-- 
tomppa

Posted on the users mailing list.