The integrated cross-platform development tool for ANSI Common Lisp LispWorks logo

Lisp Knowledgebase

Title: "Unable to find pixel-format for this opengl configuration" error from OpenGL example

ID: 16020

Product: LispWorks for Windows
Version: 4.1
OS: All Windows platforms

Description: Attempting to start the OpenGL example results in the error

Unable to find pixel-format for this opengl configuration: (:RGBA T :DEPTH NIL :DOUBLE-BUFFERED T)

the first time. (Alternatively, on Windows NT, the viewer is blank the first time.)

The problem is that some of the wgl functions need the opengl functions to be accessible, but opengl32.dll has not been loaded when the wgl functions are called for the first time. To fix this, change the %make-context method in msw-lib.lisp as follows:

(defmethod %make-context ((rep ww::r-output-pane) opengl-configuration)
 (fli:make-pointer :symbol-name "glBegin")
 (if (set-win32-pixel-format rep opengl-configuration)
     (win32::wgl-create-context (ww::r-output-pane-hdc rep))
   (error "Can't make wgl context for ~s.~%Pixel-format not set"


and recompile.

See Also:

Patch Enhancement#:

Top | Back