-
Notifications
You must be signed in to change notification settings - Fork 86
glCore registerhook
Chris Petersen edited this page Oct 16, 2014
·
1 revision
glCore-registerhook registers a custom OpenGL hook to be rendered. This is used to plot 3D objects.
Parameter | Description |
---|---|
h | Hook function |
From DemoCube the custom rendering function:
(define (render-custom)
(glClearColor 0. 0. 0. 0.)
(glClear (bitwise-ior GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT))
(glMatrixMode GL_PROJECTION)
(glLoadIdentity)
(glFrustum -1.0 1.0 -1.0 1.0 1.5 20.0)
(glMatrixMode GL_MODELVIEW)
(glLoadIdentity)
(glEnable GL_CULL_FACE)
(glCullFace GL_BACK)
(glEnable GL_DEPTH_TEST)
(glDepthMask GL_TRUE)
(glTranslatef 0 0 -5)
(glRotatef 30 1 0 0)
(glRotatef alpha 0 1 0)
(let loop ((vs cube_vertices)(cs cube_colors))
(if (> (length vs) 0) (begin
(glCoreColor (car cs))
(glCoreBegin GL_TRIANGLE_STRIP)
(map (lambda (l) (apply glCoreVertex3f l)) (car vs))
(glCoreEnd)
(loop (cdr vs) (cdr cs)))))
(set! alpha (+ alpha alphaincrement)))
-
- 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