Frage

I have an issue with PyOpenGL 3.0.2 on a Windows 8 64 bits laptop with an Intel HD 3000 graphics chipset. Any call to glGenBuffers(1) (after proper GL initialization) crashes:

  File ".\sample.py", line 7, in init
    buffer = glGenBuffers(1)
  File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__ (src\latebind.c:768)
  File "wrapper.pyx", line 308, in OpenGL_accelerate.wrapper.Wrapper.__call__ (src\wrapper.c:5811)
  File "C:\Python27\lib\site-packages\OpenGL\platform\baseplatform.py", line 379, in __call__
    return self( *args, **named )
WindowsError: exception: access violation writing 0x00000000720CF630

The exact same script works on other machines.

I have the latest version of the GPU driver (15.28.12.64.2932) which supports OpenGL 3.1.

Any ideas?

Here is the sample script:

import sys
from OpenGL.GLUT import *
from OpenGL.GL import *
from OpenGL.GLU import *

def init():
    buffer = glGenBuffers(1)

glutInit(sys.argv)
glutInitWindowSize(600, 600)
glutCreateWindow("Sample")
init()
glutMainLoop()
War es hilfreich?

Lösung 2

I finally resolved the problem by uninstalling my whole Python 64 bits distribution and installing Python 32 bits and all the libraries in 32 bits. In addition I had to use PyOpenGL 3.1.a. I have no idea what caused the problem with the 64 bits installation in the first place.

Andere Tipps

Even though your drivers support OpenGl 3.1, Glut is going to give you an OpenGL 2.0 context by default. You are going to have to ask for a 3.1 cpntext, probably like this:

glutInitContextVersion(3, 1) 
glutInitContextFlags(GLUT_FORWARD_COMPATIBLE) 
glutInitContextProfile(GLUT_CORE_PROFILE)

Without a proper 3.1 context, any 3.1 specific calls will lead you to a crash.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top