glCoreColor - part-cw/lambdanative GitHub Wiki
(glCoreColor c)
glCoreColor sets a texture color
Parameter | Description |
---|---|
c | Color to render texture in |
Example
Example 1: From modules/ln_glgui/sprite.scm, where it sets the color for the sprite rendering
(define (glgui:sprite-draw g wgt)
(let ((x (glgui-widget-get-dyn g wgt 'x))
(y (glgui-widget-get-dyn g wgt 'y))
(i (glgui-widget-get g wgt 'image))
(w (glgui-widget-get g wgt 'w))
(h (glgui-widget-get g wgt 'h))
(a (glgui-widget-get g wgt 'angle))
(c (glgui-widget-get g wgt 'color))
(rendercallback (glgui-widget-get g wgt 'rendercallback)))
(if i (begin
(glCoreColor c)
(apply glCoreTextureDraw (append (list x y
(if w w (car i)) (if h h (cadr i)))
(cddr i) (list a)))
(if rendercallback (rendercallback g wgt))
))
))