win32: gl bitmaps

original commit: b98ba3e60b5173dec8f6ca6970592c8ab2441046
This commit is contained in:
Matthew Flatt 2010-10-13 21:22:20 -06:00
parent 198173e637
commit 75adf058a1
2 changed files with 10 additions and 2 deletions

View File

@ -21,7 +21,7 @@
(define win32-bitmap%
(class bitmap%
(init w h hwnd)
(init w h hwnd [gl-config #f])
(super-make-object (make-alternate-bitmap-kind w h))
(define s
@ -40,6 +40,14 @@
(cairo_paint cr)
(cairo_destroy cr))
s))
(define gl (and gl-config
(let ([hdc (cairo_win32_surface_get_dc s)])
(set-cpointer-tag! hdc 'HDC)
(create-gl-context hdc
gl-config
#t))))
(define/override (get-bitmap-gl-context) gl)
(define/override (ok?) #t)
(define/override (is-color?) #t)

View File

@ -106,6 +106,6 @@
(define/top (make-gl-bitmap [exact-positive-integer? w]
[exact-positive-integer? h]
[gl-config% c])
(make-object win32-bitmap% w h #f))
(make-object win32-bitmap% w h #f c))
(define (check-for-break) #f)