-
Notifications
You must be signed in to change notification settings - Fork 86
glCoreTextureDraw
Chris Petersen edited this page Oct 16, 2014
·
1 revision
glCoreTextureDraw draws a rectangular texture with support for basic clipping. Current clipping limitations are rotation & color gradient interpolation, and that polygons are not clipped at all.
Parameter | Description |
---|---|
x | Lower left x-coordinate of texture |
y | Lower left y-coordinate of texture |
w0 | Width of texture drawn |
h0 | Height of texture drawn |
x1 | Relative starting x position within the texture map |
y1 | Relative starting y position within the texture map |
x2 | Relative ending x position within the texture map |
y2 | Relative ending y position within the texture map |
r | Texture rotation angle |
colors | Optional: List of 4 colors that are then applied to each corner of the texture. |
Example 1: Draw a box, as specified in modules/ln_glgui/primitives.scm
(define glgui:box (glCoreTextureCreate 4 4 (make-u8vector 16 #xff)))
(define (glgui:draw-box x y w h c)
(if (list? c)
(glCoreTextureDraw x y w h glgui:box 0.1 0.1 .9 .9 0. c)
(begin
(glCoreColor c)
(glCoreTextureDraw x y w h glgui:box 0.1 0.1 .9 .9 0.)
))
)
-
- 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