Fix compile errors
This commit is contained in:
parent
9b69dee238
commit
5b85210ddf
3 changed files with 10 additions and 10 deletions
|
|
@ -11,8 +11,8 @@
|
||||||
:*minor-version*
|
:*minor-version*
|
||||||
:*glsl-version*
|
:*glsl-version*
|
||||||
:gl-initialized-p
|
:gl-initialized-p
|
||||||
:initialize
|
:gl-initialize
|
||||||
:finalize
|
:gl-finalize
|
||||||
:version-supported-p
|
:version-supported-p
|
||||||
:gl-assert
|
:gl-assert
|
||||||
:gl-restart
|
:gl-restart
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
(defun gl-initialized-p ()
|
(defun gl-initialized-p ()
|
||||||
initializedp)
|
initializedp)
|
||||||
|
|
||||||
(defun initialize (version)
|
(defun gl-initialize (version)
|
||||||
"Initialize the local opengl configuration.
|
"Initialize the local opengl configuration.
|
||||||
Store values like the drivers version."
|
Store values like the drivers version."
|
||||||
(if (/= version 0)
|
(if (/= version 0)
|
||||||
|
|
@ -40,7 +40,7 @@ Store values like the drivers version."
|
||||||
(read in)))
|
(read in)))
|
||||||
(setf initializedp t))
|
(setf initializedp t))
|
||||||
|
|
||||||
(defun finalize ()
|
(defun gl-finalize ()
|
||||||
(setf initializedp nil)))
|
(setf initializedp nil)))
|
||||||
|
|
||||||
(defun version-supported-p (version)
|
(defun version-supported-p (version)
|
||||||
|
|
|
||||||
|
|
@ -41,24 +41,24 @@ Create an opengl context attached to a window and initialize the shader system."
|
||||||
(version (get-command-line-option-number argv "--opengl")))
|
(version (get-command-line-option-number argv "--opengl")))
|
||||||
(if version
|
(if version
|
||||||
(progn
|
(progn
|
||||||
(gl-utils:initialize version)
|
(gl-initialize version)
|
||||||
(setf *window* (glop:create-window title width height
|
(setf *window* (glop:create-window title width height
|
||||||
:major gl-utils:*major-version*
|
:major gl-utils:*major-version*
|
||||||
:minor gl-utils:*minor-version*)))
|
:minor gl-utils:*minor-version*)))
|
||||||
(progn
|
(progn
|
||||||
(setf *window* (glop:create-window title width height))
|
(setf *window* (glop:create-window title width height))
|
||||||
(gl-utils:initialize 0)))
|
(gl-initialize 0)))
|
||||||
(compile-all-shaders))
|
(compiler:compile-all-shaders))
|
||||||
(initialize-renderer))
|
(initialize-renderer))
|
||||||
|
|
||||||
(defun finalize ()
|
(defun finalize ()
|
||||||
"Finalize the render module.
|
"Finalize the render module.
|
||||||
Destroy the opengl context and the related resources."
|
Destroy the opengl context and the related resources."
|
||||||
(format t "Finalize Render module~%")
|
(format t "Finalize Render module~%")
|
||||||
(destroy-all-shaders)
|
(compiler:destroy-all-shaders)
|
||||||
(glop:destroy-window *window*)
|
(glop:destroy-window *window*)
|
||||||
(setf *window* nil)
|
(setf *window* nil)
|
||||||
(gl-utils:finalize))
|
(gl-finalize))
|
||||||
|
|
||||||
(defun update (delta-time)
|
(defun update (delta-time)
|
||||||
"Update the render module.
|
"Update the render module.
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ continue unless `unprotected' is t."
|
||||||
(global-set-motion #'freelook-move :x :y))
|
(global-set-motion #'freelook-move :x :y))
|
||||||
|
|
||||||
(defun game-start ()
|
(defun game-start ()
|
||||||
(let ((f (file:load-file #P"../data/cube.lisp" :sync t :type 'character)))
|
(let ((f (file:load-file #P"data/cube.lisp" :sync t :type 'character)))
|
||||||
(attach (make-object :mesh (with-input-from-string (s f)
|
(attach (make-object :mesh (with-input-from-string (s f)
|
||||||
(mesh:make-mesh (read s)))) (get-world-origin))))
|
(mesh:make-mesh (read s)))) (get-world-origin))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue