-
Notifications
You must be signed in to change notification settings - Fork 86
glCoreTextureData
Chris Petersen edited this page Oct 16, 2014
·
1 revision
glCoreTextureData returns texture data.
Parameter | Description |
---|---|
t | Texture for which data is returned |
Example 1: Function that exports the content of a drawingarea, which can then be shown as a new texture elsewhere on the gui.
(define (glgui-drawingarea-export-image g wgt)
(let* ((t (glgui-widget-get g wgt 'data))
(w0 (table-ref t 'w0))
(h0 (table-ref t 'h0))
(color (glgui-widget-get g wgt 'color))
(len (length color))
(w (table-ref t 'w))
(h (table-ref t 'h))
(wr (table-ref t 'wr))
(hr (table-ref t 'hr)))
(let loop ((i 0) (ret (u8vector-alpha->u8vector-rgb (glCoreTextureData (table-ref t 0)) (car color))))
(if (fx= i (fx- len 1)) (list w h (glCoreTextureCreate w0 h0 ret) 0. 0. wr hr)
(loop (fx+ i 1) (u8vector-rgb-add ret (u8vector-alpha->u8vector-rgb (glCoreTextureData (table-ref t (fx+ i 1))) (list-ref color (fx+ i 1)))))
))))
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip