racket/collects/sgl/scribblings/bitmap.scrbl
Eli Barzilay debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00

28 lines
969 B
Racket

#lang scribble/doc
@(require "common.rkt" (for-label racket/class))
@title[#:tag "bitmaps"]{Bitmaps}
@defmodule[sgl/bitmap]
@defproc[(bitmap->gl-list [bitmap (is-a?/c bitmap%)]
[#:with-gl with-gl-proc ((-> any) . -> . any)
(lambda (f) (f))]
[#:mask mask (or/c (is-a?/c bitmap%) false/c)
(send bitmap get-loaded-mask)])
exact-integer?]{
Converts the given bitmap into an OpenGL list that can be rendered
with @racket[gl-call-list] or @racket[glCallList]. The rendered object
is a square on the @math{z=0} plane with corners at @math{(0,0)} and
@math{(1,1)}.
The @racket[with-gl-proc] must accept a thunk and call it while the
relevant OpenGL context is selected. Otherwise, the relevant OpenGL
context must be selected already.
If @racket[mask] is not @racket[#f], it is used as the mask bitmap for
extracting alpha values.}