Question

The code I am working on (Python+PyOpenGL) runs w/o problems on:

  1. GL Version: 4.2.12217 Compatibility Profile Context 12.104.0.0, GL Renderer: AMD Radeon HD 6300M Series, GL Vendor: ATI Technologies Inc.
  2. GL Version: 4.4.0, GL Renderer: NVS 5400M/PCIe/SSE2, GL Vendor: NVIDIA Corporation

but it returns an error when I try to run the code on integrated GPU:

  1. GL Version: 4.0.0 - Build 9.17.10.2843, GL Renderer: Intel(R) HD Graphics 4000, GL Vendor: Intel

The OpenGL versions are different... Can anyone know what in particular is causing error and can (and how) it be fixed?

Error:

File "C:\...\visualization_engine_V6.py", line 120, in initializeGL
self.geometry()
File "C:\...\visualization_engine_V6.py", line 167, in geometry
glEnable(GL_VERTEX_ARRAY)
File "errorchecker.pyx", line 50, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src\errorchecker.c:854)
OpenGL.error.GLError: GLError(
err = 1280,
description = 'invalid enumerant',
baseOperation = glEnable,
cArguments = (GL_VERTEX_ARRAY,)
)
Traceback (most recent call last):
File "C:\...\visualization_engine_V6.py", line 156, in paintGL
glBindBuffer(GL_ARRAY_BUFFER, self.vbo_id)
AttributeError: 'OpenGLWidget' object has no attribute 'vbo_id'

Code:

glEnableClientState(GL_VERTEX_ARRAY)
glEnable(GL_VERTEX_ARRAY)
#    generate a new VBO and get the associated vbo_id
_id = 1
self.vbo_id = glGenBuffers (_id)
#    bind VBO in order to use
glBindBuffer(GL_ARRAY_BUFFER, self.vbo_id)
#    upload data to VBO
vertices = model_loader.Model_loader(filename = "udarni_vzvod.stl").vertices
self.N_vertices = len(vertices)
#    data size in bytes
self.dataSize = arrays.ArrayDatatype.arrayByteCount(vertices)
glBufferData(GL_ARRAY_BUFFER, self.dataSize, vertices, GL_STATIC_DRAW)
glBindBuffer(GL_ARRAY_BUFFER, self.vbo_id)
glDisableClientState(GL_VERTEX_ARRAY)
Was it helpful?

Solution

glEnable(GL_VERTEX_ARRAY)

GL_INVALID_ENUM

Does that answers your question?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top