jeapostrophe / pict3d

3-dimensional picts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't seem to work on VMWare

turha654 opened this issue · comments

I tried to following simple example:
#lang racket
(require pict3d)
(sphere origin 1/2)

And I get error message: "get-master-gl-context: could not get at least an OpenGL 30 context (legacy? = #f)"

Googling for the error I found:
https://lists.racket-lang.org/users/archive/2015-March/066309.html

It suggests running OpenGL Extension Viewer, which I ran and it reported OpenGL 3.3 as supported, which VMWare is supposed to support, but pict3d doesn't seem to work. I'm not an expert on OpenGL, but one thing I did notice on the OpenGL Extension Viewer app is that when I run the tests it first asks to choose OpenGL context which has five options:

  1. Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;(No Acceleration)
  2. Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;
  3. Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;(Forward Context 3.0)
  4. Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;(Forward Context 3.2)
  5. Gallium 0.4 on SVGA3D; build: RELEASE; LLVM;(Forward Context 3.3)

Only the last three allowed OpenGL 3.x tests to be run. So maybe pict3d picks one of the first two?

I'm not sure where in the pict3d code to even start looking for the issue..

edit. updated the code tags...

Try looking at the current-pict3d-legacy? setting. Normally, we request a "core" context that ignores old parts of OpenGL. I suspect that the VMWare driver doesn't support that, but may support the parts of OpenGL we use.

The following gives the same error with the last part changed to "(legacy? = #t)":
#lang racket
(require pict3d)
(current-pict3d-legacy? #t)
(sphere origin 1/2)

Also, the docs says wrt current-pict3d-legacy? : "On Windows, this parameter is currently ignored."

I'm just guessing, but it seems to me that the VMWare SVGA3D driver maybe only supports the Forward Compatibility Context modes (with deprecated features removed), and pict3d tries to acquire a "normal" context and there is none for the 3.0+ versions, at least according to OpenGL Extension Viewer. But I'm not familiar with the OpenGL Extension Viewer so I don't know what it should report in a "normal" case.

Is there an easy way to enumerate all the available contexts? Does pict3d simply request a specific type of context or does it get a list a pick one itself, that piece of code might be a useful place to either request a forward context or print out the list? Or something else I could try?

As an aside, any idea why google finds pict3d in the racket-lang.org site, but it's not available there anymore, the google cached version does work however:
https://docs.racket-lang.org/pict3d/rendering.html

This is the code that is running:

https://github.com/jeapostrophe/pict3d/blob/master/pict3d/private/gui/untyped-pict3d-canvas.rkt#L197

I don't have any access to something to test what you're seeing.