Add opengl's one time settings in the initialize process
This commit is contained in:
parent
891643c414
commit
3de90e7618
1 changed files with 11 additions and 1 deletions
|
|
@ -13,6 +13,15 @@
|
||||||
|
|
||||||
(defvar *window* nil)
|
(defvar *window* nil)
|
||||||
|
|
||||||
|
(defun initialize-renderer ()
|
||||||
|
(gl:enable :cull-face)
|
||||||
|
(gl:cull-face :back)
|
||||||
|
(gl:front-face :cw)
|
||||||
|
(gl:enable :depth-test)
|
||||||
|
(gl:depth-mask :true)
|
||||||
|
(gl:depth-func :lequal)
|
||||||
|
(gl:depth-range 0.0 1.0))
|
||||||
|
|
||||||
(defun initialize (&optional argv)
|
(defun initialize (&optional argv)
|
||||||
"Initialize the render module.
|
"Initialize the render module.
|
||||||
Create an opengl context attached to a window and initialize the shader system."
|
Create an opengl context attached to a window and initialize the shader system."
|
||||||
|
|
@ -30,7 +39,8 @@ Create an opengl context attached to a window and initialize the shader system."
|
||||||
(progn
|
(progn
|
||||||
(setf *window* (glop:create-window title width height))
|
(setf *window* (glop:create-window title width height))
|
||||||
(gl-utils:initialize 0)))
|
(gl-utils:initialize 0)))
|
||||||
(shader:compile-all-shaders)))
|
(shader:compile-all-shaders))
|
||||||
|
(initialize-renderer))
|
||||||
|
|
||||||
(defun finalize ()
|
(defun finalize ()
|
||||||
"Finalize the render module.
|
"Finalize the render module.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue