I am trying to run simple example and I want to use OpenGL version 4.
However, when I set :context-version-major 4 in with-window, GL crashes.
I have GLFW 3.3 installed.
Code which I'm running:
(defun main ()
(glfw:with-init
(glfw:with-window (:width 640 :height 480 :title "CL-GLFW3"
:context-version-major 4)
(setf %gl:*gl-get-proc-address* #'glfw:get-proc-address)
(gl:clear-color 0 0.5 1 1)
(loop until (glfw:window-should-close-p)
do ((lambda ()
(gl:clear :color-buffer)
(gl:color 1 1 1 1)
(gl:rect 0 0 1 1)))
do (glfw:swap-buffers)
do (glfw:poll-events)))))
Error report:
debugger invoked on a CL-OPENGL-BINDINGS:OPENGL-ERROR in thread
#<THREAD "main thread" RUNNING {10004F04C3}>:
OpenGL signalled (1282 . INVALID-OPERATION) from COLOR-4F.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Continue
1: [ABORT ] Exit debugger, returning to top level.
(CL-OPENGL-BINDINGS:CHECK-ERROR #<unavailable argument>)
source: (RESTART-CASE (ERROR 'OPENGL-ERROR :ERROR-CODE
(CONS ERROR-CODE
(CFFI:FOREIGN-ENUM-KEYWORD
'CL-OPENGL-BINDINGS:ENUM ERROR-CODE))
:ERROR-CONTEXT CONTEXT)
(CONTINUE NIL :REPORT "Continue"))
I am trying to run simple example and I want to use OpenGL version 4. However, when I set
:context-version-major 4
inwith-window
, GL crashes. I have GLFW 3.3 installed.Code which I'm running:
Error report: