;;; 2.6 Begin/End Paradigm
;;;
-;; emacs: (put! 'gl-begin 'scheme-indent-function 1)
+;; emacs: (put 'gl-begin 'scheme-indent-function 1)
(define-syntax gl-begin
(syntax-rules ()
((_ mode body1 body2 ...)
(export gl-load-matrix
gl-multiply-matrix)
-(re-export (%glMatrixMode . gl-matrix-mode)
+(re-export (%glMatrixMode . set-gl-matrix-mode)
(%glLoadIdentity . gl-load-identity)
(%glRotatef . gl-rotate)
(%glTranslatef . gl-translate)
(%glPushMatrix . gl-push-matrix)
(%glPopMatrix . gl-pop-matrix))
+;; emacs: (put 'with-gl-push-matrix 'scheme-indent-function 0)
(define-syntax with-gl-push-matrix
(syntax-rules ()
((_ body ...)
(re-export (%glEnable . gl-enable)
(%glDisable . gl-disable))
+;;;
+;;; 2.14 Colors and Coloring
+;;;
+
+(re-export (%glShadeModel . set-gl-shade-model))
+
\f
;;;
;;; 4.1 Per-Fragment Operations
(re-export (%glReadBuffer . set-gl-read-buffer)
(%glCopyPixels . gl-copy-pixels))
+
+;;;
+;;; 6.1 Querying GL State
+;;;
+
+;; emacs: (put 'with-gl-push-attrib 'scheme-indent-function 1)
+(define-syntax-rule (with-gl-push-attrib bits body ...)
+ (begin
+ (%glPushAttrib bits)
+ body
+ ...
+ (%glPopAttrib)))
+
+(export with-gl-push-attrib)