From 31db8863bd1281f94f426aac5936fb897351362f Mon Sep 17 00:00:00 2001 From: jsancho Date: Fri, 18 Sep 2009 14:54:44 +0000 Subject: [PATCH] --- gacela.lisp | 8 ++++++++ gacela_GL.lisp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/gacela.lisp b/gacela.lisp index 5cb515a..dcbddde 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -126,6 +126,14 @@ (glLoadIdentity) t)) +(let ((current-color '(1 1 1 1))) + (defun get-color () + current-color) + + (defun set-color (red green blue (&optional (alpha 1))) + (setq current-color color) + (glColor4f red green blue alpha))) + (defun copy-surface (source) (cond ((surface-p source) (let ((new-surface diff --git a/gacela_GL.lisp b/gacela_GL.lisp index 84e38d6..9bd4034 100644 --- a/gacela_GL.lisp +++ b/gacela_GL.lisp @@ -98,6 +98,9 @@ (defcfun "void gacela_glColor3f (float red, float green, float blue)" 0 "glColor3f (red, green, blue);") +(defcfun "void gacela_glColor4f (float red, float green, float blue, float alpha)" 0 + "glColor4f (red, green, blue, alpha);") + (defcfun "void gacela_glDepthFunc (int func)" 0 "glDepthFunc (func);") @@ -189,6 +192,7 @@ (defentry glClearColor (float float float float) (void "gacela_glClearColor")) (defentry glClearDepth (double) (void "gacela_glClearDepth")) (defentry glColor3f (float float float) (void "gacela_glColor3f")) +(defentry glColor4f (float float float) (void "gacela_glColor4f")) (defentry glDepthFunc (int) (void "gacela_glDepthFunc")) (defentry glEnable (int) (void "gacela_glEnable")) (defentry glDisable (int) (void "gacela_glDisable")) -- 2.39.2