[cello-cvs] CVS cello/cl-opengl

ktilton ktilton at common-lisp.net
Wed May 17 16:14:36 UTC 2006


Update of /project/cello/cvsroot/cello/cl-opengl
In directory clnet:/tmp/cvs-serv22618/cl-opengl

Added Files:
	build-prep.lisp cl-opengl.asd cl-opengl.lisp cl-opengl.lpr 
	gl-constants.lisp gl-def.lisp gl-functions.lisp 
	glu-functions.lisp ogl-macros.lisp ogl-utils.lisp 
Log Message:
CVS re-organization bringing auxiliary packages under one Cello module


--- /project/cello/cvsroot/cello/cl-opengl/build-prep.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/build-prep.lisp	2006/05/17 16:14:36	1.1
#-asdf (load "/0devtools/asdf.lisp")

;;;(push (make-pathname :directory '(:absolute "0devtools" "parse-number"))
;;;  asdf:*central-registry*)
;;;
;;;(asdf:operate 'asdf:load-op 'parse-number)

(progn
  #+lispworks
  (setf hcl::*handle-existing-defpackage* (list :add))

  (push (make-pathname :directory '(:absolute "0devtools" "cffi"))
    asdf:*central-registry*)
  
  (push (make-pathname :directory '(:absolute "0devtools" "verrazano-support"))
    asdf:*central-registry*)

  (asdf:operate 'asdf:load-op 'verrazano-support :force t))--- /project/cello/cvsroot/cello/cl-opengl/cl-opengl.asd	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/cl-opengl.asd	2006/05/17 16:14:36	1.1
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-

;(declaim (optimize (debug 2) (speed 1) (safety 1) (compilation-speed 1)))
;(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))


(in-package :asdf)

#-(or openmcl sbcl cmu clisp lispworks ecl allegro cormanlisp)
(error "Sorry, this Lisp is not yet supported.  Patches welcome!")

(defsystem cl-opengl
  :name "cl-opengl"
  :author "Kenny Tilton <ktilton at nyc.rr.com>"
  :version "1.0.0"
  :maintainer "Kenny Tilton <ktilton at nyc.rr.com>"
  :licence "MIT"
  :description "Partial OpenGL Bindings"
  :long-description "Bindings to most of OpenGL, more on demand"
  :perform (load-op :after (op cl-opengl)
             (pushnew :cl-opengl cl:*features*))
  :depends-on (:hello-cffi)
  :serial t
  :components ((:file "cl-opengl")
               (:file "gl-def" :depends-on ("cl-opengl"))
               (:file "gl-constants" :depends-on ("gl-def"))
               (:file "gl-functions" :depends-on ("gl-def"))
               (:file "glu-functions" :depends-on ("gl-def"))
               (:file "glut-loader" :depends-on ("cl-opengl"))
               (:file "glut-functions" :depends-on ("glut-loader"))
               (:file "glut-def" :depends-on ("glut-loader"))
               (:file "glut-extras" :depends-on ("glut-loader"))
               (:file "ogl-macros" :depends-on ("gl-def"))
               (:file "ogl-utils" :depends-on ("ogl-macros"))
               (:file "nehe-14" :depends-on ("ogl-macros"))))
--- /project/cello/cvsroot/cello/cl-opengl/cl-opengl.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/cl-opengl.lisp	2006/05/17 16:14:36	1.1
;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cl-opengl; -*-
;;
;;;
;;; Copyright © 2004 by Kenneth William Tilton.
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy 
;;; of this software and associated documentation files (the "Software"), to deal 
;;; in the Software without restriction, including without limitation the rights 
;;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
;;; copies of the Software, and to permit persons to whom the Software is furnished 
;;; to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be included in 
;;; all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
;;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
;;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
;;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
;;; IN THE SOFTWARE.

(pushnew :cl-opengl *features*)

(defpackage #:cl-opengl
  (:nicknames #:ogl)
  (:use #:common-lisp #:cffi #:ffx)
  (:export #:*ogl-listing-p*
    #:with-matrix #:with-matrix-mode
    #:with-attrib #:with-client-attrib
    #:with-gl-begun 
    #:gl-pushm 
    #:gl-popm
    #:cl-opengl-init 
    #:closed-stream-p 
    #:*selecting*
    #:cl-opengl-reset
    #:ogl-texture
    #:ncalc-normalf #:ncalc-normalfv #:ogl-get-int #:ogl-get-boolean 
    #:v3f #:make-v3f #:v3f-x #:v3f-y #:v3f-z
    #:with-gl-param #:xlin #:xlout
    #:ups #:ups-most #:ups-more #:downs #:downs-most #:downs-more #:farther #:nearer
    #:ogl-texture-delete #:ogl-texture-gen #:ogl-tex-gen-setup
    #:ogl-bounds #:ogl-scissor-box #:ogl-raster-pos-get
    #:ogl-pen-move #:with-bitmap-shifted
    #:texture-name
    #:eltgli #:ogl-tex-activate #:gl-name
    #:mgwclose #:freeg))

(in-package :cl-opengl)

(defparameter *selecting* nil)

(push (make-pathname
       :directory '(:absolute "0devtools" "cffi"))
  asdf:*central-registry*)

(push (make-pathname
       :directory '(:absolute "0devtools" "verrazano-support"))
  asdf:*central-registry*)

(defparameter *gl-dynamic-lib*
  #+(or win32 windows mswindows)
  (make-pathname
   ;; #+lispworks :host #-lispworks :device "C"
   :directory '(:absolute "windows" "system32")
   :name "opengl32"
   :type "dll")
  #+(or darwin unix powerpc)
  (make-pathname
    :directory '(:absolute "System" "Library" "Frameworks" 
                           "OpenGL.framework" "Versions" "Current")
    :name "OpenGL"
    :type nil))

(defparameter *glu-dynamic-lib*
  #+(or win32 windows mswindows)
    (make-pathname
    ;;; #+lispworks :host #-lispworks :device "C"
      :directory '(:absolute "windows" "system32")
      :name "glu32"
      :type "dll")
  #+(or darwin unix powerpc) 
  (make-pathname
    :directory '(:absolute "System" "Library" "Frameworks" 
                           "GLU.framework" "Versions" "Current")
    :name "GLU"
    :type nil))

(defvar *opengl-dll* nil)

(defun cl-opengl-load ()
  (declare (ignorable load-oglfont-p))
  (unless *opengl-dll*
    (print "loading open GL/GLU")
    (ffx:load-foreign-library (namestring *gl-dynamic-lib*)) ;  :module "open-gl")
    ;; -lispworks#-lispworks
    (setf *opengl-dll*
      (ffx:load-foreign-library
       (namestring *glu-dynamic-lib*)))))

(eval-when (load eval)
  (cl-opengl-load))

(defun gl-boolean-test (value)
  #+allegro (not (eql value #\null))
  #-allegro (not (zerop value)))

#+yeahyeah
(defun dump-lists (min max)
  (loop with start
        and end
        for lx from min to max
        when (gl-boolean-test (glislist lx))
        do (if start
               (if end
                   (if (eql lx (1+ end))
                       (setf end lx)
                     (print `(gl ,start to ,end)))
                 (if (eql lx (1+ start))
                     (setf end lx)
                   (print `(gl ,start))))
             (setf start lx))))


(dfenum storagetype
  char-pixel
  short-pixel
  integer-pixel
  long-pixel
  float-pixel
  double-pixel)

(dfenum filtertypes
  undefined-filter
  point-filter
  box-filter
  triangle-filter
  hermite-filter
  hanning-filter
  hamming-filter
  blackman-filter
  gaussian-filter
  quadratic-filter
  cubic-filter
  catrom-filter
  mitchell-filter
  lanczos-filter
  bessel-filter
  sinc-filter)--- /project/cello/cvsroot/cello/cl-opengl/cl-opengl.lpr	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/cl-opengl.lpr	2006/05/17 16:14:36	1.1
;; -*- lisp-version: "8.0 [Windows] (May 11, 2006 6:29)"; cg: "1.81"; -*-

(in-package :cg-user)

(defpackage :CL-OPENGL)

(define-project :name :cl-opengl
  :modules (list (make-instance 'module :name "cl-opengl.lisp")
                 (make-instance 'module :name "gl-def.lisp")
                 (make-instance 'module :name "gl-constants.lisp")
                 (make-instance 'module :name "gl-functions.lisp")
                 (make-instance 'module :name "glu-functions.lisp")
                 (make-instance 'module :name "ogl-macros.lisp")
                 (make-instance 'module :name "ogl-utils.lisp"))
  :projects (list (make-instance 'project-module :name
                                 "..\\cells\\utils-kt\\utils-kt")
                  (make-instance 'project-module :name
                                 "..\\hello-cffi\\hello-cffi"))
  :libraries nil
  :distributed-files nil
  :internally-loaded-files nil
  :project-package-name :cl-opengl
  :main-form nil
  :compilation-unit t
  :verbose nil
  :runtime-modules nil
  :splash-file-module (make-instance 'build-module :name "")
  :icon-file-module (make-instance 'build-module :name "")
  :include-flags '(:compiler :top-level :local-name-info)
  :build-flags '(:allow-debug :purify)
  :autoload-warning t
  :full-recompile-for-runtime-conditionalizations nil
  :default-command-line-arguments "+cx +t \"Initializing\""
  :additional-build-lisp-image-arguments '(:read-init-files nil)
  :old-space-size 256000
  :new-space-size 6144
  :runtime-build-option :standard
  :on-initialization 'cl-opengl::lesson-14
  :on-restart 'do-default-restart)

;; End of Project Definition
--- /project/cello/cvsroot/cello/cl-opengl/gl-constants.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/gl-constants.lisp	2006/05/17 16:14:36	1.1
;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cl-opengl; -*-
;;;
;;; Copyright © 1995,2003 by Kenneth William Tilton.
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy 
;;; of this software and associated documentation files (the "Software"), to deal 
;;; in the Software without restriction, including without limitation the rights 
;;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
;;; copies of the Software, and to permit persons to whom the Software is furnished 
;;; to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be included in 
;;; all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
;;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
;;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
;;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
;;; IN THE SOFTWARE.

(in-package #:cl-opengl)


#| blendingfactordest |#
(dfc gl_zero                           0)
(dfc gl_one                            1)
(dfc gl_src_color                      #x0300)
(dfc gl_one_minus_src_color            #x0301)
(dfc gl_src_alpha                      #x0302)
(dfc gl_one_minus_src_alpha            #x0303)
(dfc gl_dst_alpha                      #x0304)
(dfc gl_one_minus_dst_alpha            #x0305)

#| pixelcopytype |#
(dfc gl_color                          #x1800)
(dfc gl_depth                          #x1801)
(dfc gl_stencil                        #x1802)

#| pixelformat |#
(dfc gl_color_index                    #x1900)
(dfc gl_stencil_index                  #x1901)
(dfc gl_depth_component                #x1902)
(dfc gl_red                            #x1903)
(dfc gl_green                          #x1904)
(dfc gl_blue                           #x1905)
(dfc gl_alpha                          #x1906)
(dfc gl_rgb                            #x1907)
(dfc gl_rgba                           #x1908)
(dfc gl_luminance                      #x1909)
(dfc gl_luminance_alpha                #x190a)

#| polygons |#
(dfc gl_point                                #x1b00)
(dfc gl_line                                 #x1b01)
(dfc gl_fill                                 #x1b02)
(dfc gl_cw                                   #x0900)
(dfc gl_ccw                                  #x0901)
(dfc gl_front                                #x0404)
(dfc gl_back                                 #x0405)
(dfc gl_polygon_offset_factor                #x8038)
(dfc gl_polygon_offset_units                 #x2a00)
(dfc gl_polygon_offset_point                 #x2a01)
(dfc gl_polygon_offset_line                  #x2a02)
(dfc gl_polygon_offset_fill                  #x8037)

#| lighting |#

(dfc gl_light0                               #x4000)
(dfc gl_light1                               #x4001)
(dfc gl_light2                               #x4002)
(dfc gl_light3                               #x4003)
(dfc gl_light4                               #x4004)
(dfc gl_light5                               #x4005)
(dfc gl_light6                               #x4006)
(dfc gl_light7                               #x4007)
(dfc gl_spot_exponent                        #x1205)
(dfc gl_spot_cutoff                          #x1206)
(dfc gl_constant_attenuation                 #x1207)
(dfc gl_linear_attenuation                   #x1208)
(dfc gl_quadratic_attenuation                #x1209)
(dfc gl_ambient                              #x1200)
(dfc gl_diffuse                              #x1201)
(dfc gl_specular                             #x1202)
(dfc gl_shininess                            #x1601)
(dfc gl_emission                             #x1600)
(dfc gl_position                             #x1203)
(dfc gl_spot_direction                       #x1204)
(dfc gl_ambient_and_diffuse                  #x1602)
(dfc gl_color_indexes                        #x1603)
(dfc gl_front_and_back                       #x0408)
(dfc gl_flat                                 #x1d00)
(dfc gl_smooth                               #x1d01)

#| user clipping planes |#
(dfc gl_clip_plane0                          #x3000)
(dfc gl_clip_plane1                          #x3001)
(dfc gl_clip_plane2                          #x3002)
(dfc gl_clip_plane3                          #x3003)
(dfc gl_clip_plane4                          #x3004)
(dfc gl_clip_plane5                          #x3005)

#| boolean values |#
(dfc gl_false                                #x0)
(dfc gl_true                                 #x1)

#| data types |#
(dfc gl_byte                                 #x1400)
(dfc gl_unsigned_byte                        #x1401)
(dfc gl_short                                #x1402)
(dfc gl_unsigned_short                       #x1403)
(dfc gl_int                                  #x1404)
(dfc gl_unsigned_int                         #x1405)
(dfc gl_float                                #x1406)
(dfc gl_double                               #x140a)
(dfc gl_2_bytes                              #x1407)
(dfc gl_3_bytes                              #x1408)
(dfc gl_4_bytes                              #x1409)

#| primitives |#
(dfc gl_points                               #x0000)
(dfc gl_lines                                #x0001)
(dfc gl_line_loop                            #x0002)
(dfc gl_line_strip                           #x0003)
(dfc gl_triangles                            #x0004)
(dfc gl_triangle_strip                       #x0005)
(dfc gl_triangle_fan                         #x0006)
(dfc gl_quads                                #x0007)
(dfc gl_quad_strip                           #x0008)
(dfc gl_polygon                              #x0009)

#| vertex arrays |#
(dfc gl_vertex_array                         #x8074)
(dfc gl_normal_array                         #x8075)
(dfc gl_color_array                          #x8076)
(dfc gl_index_array                          #x8077)
(dfc gl_texture_coord_array                  #x8078)
(dfc gl_edge_flag_array                      #x8079)
(dfc gl_vertex_array_size                    #x807a)
(dfc gl_vertex_array_type                    #x807b)
(dfc gl_vertex_array_stride                  #x807c)
(dfc gl_normal_array_type                    #x807e)
(dfc gl_normal_array_stride                  #x807f)
(dfc gl_color_array_size                     #x8081)
(dfc gl_color_array_type                     #x8082)
(dfc gl_color_array_stride                   #x8083)
(dfc gl_index_array_type                     #x8085)
(dfc gl_index_array_stride                   #x8086)
(dfc gl_texture_coord_array_size             #x8088)
(dfc gl_texture_coord_array_type             #x8089)
(dfc gl_texture_coord_array_stride           #x808a)
(dfc gl_edge_flag_array_stride               #x808c)
(dfc gl_vertex_array_pointer                 #x808e)
(dfc gl_normal_array_pointer                 #x808f)

[346 lines skipped]
--- /project/cello/cvsroot/cello/cl-opengl/gl-def.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/gl-def.lisp	2006/05/17 16:14:36	1.1

[408 lines skipped]
--- /project/cello/cvsroot/cello/cl-opengl/gl-functions.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/gl-functions.lisp	2006/05/17 16:14:36	1.1

[818 lines skipped]
--- /project/cello/cvsroot/cello/cl-opengl/glu-functions.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/glu-functions.lisp	2006/05/17 16:14:36	1.1

[1061 lines skipped]
--- /project/cello/cvsroot/cello/cl-opengl/ogl-macros.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/ogl-macros.lisp	2006/05/17 16:14:36	1.1

[1199 lines skipped]
--- /project/cello/cvsroot/cello/cl-opengl/ogl-utils.lisp	2006/05/17 16:14:36	NONE
+++ /project/cello/cvsroot/cello/cl-opengl/ogl-utils.lisp	2006/05/17 16:14:36	1.1

[1420 lines skipped]



More information about the Cello-cvs mailing list