If it works without the glClear call, I’m guessing it also works if you disable pyglet’s gl_debug feature?
Does your program actually create a context with a depth buffer? On Tue, Oct 31, 2017 at 23:30, 9EVRT04KI <[email protected]> wrote: > Yeah, Ben, i figured that out already, and YES pyopengl have same issue. > It returns same error on glClear function, though program actually work > somehow. I tried code like this one: > glFlush() > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) > glMatrixMode(GL_MODELVIEW) > glLoadIdentity() > glBegin(GL_POINTS) > for i in range(1000): > glColor3f(*tuple(random.random() for i in range(3))) > glVertex3f(*tuple(random.random() - 0.5 for i in range(3))) > glEnd() > > Removing glClear removes error in pyopengl ang pyglet code both. > So... yo sad, it is driver issue? What can i do to fix this? > > вторник, 31 октября 2017 г., 10:11:47 UTC+3 пользователь Benjamin Moran > написал: > >> The "invalid enumerant" error is being returned by OpenGL, which is >> strange because it's only calling 'glClear(GL_COLOR_BUFFER_BIT | >> GL_DEPTH_BUFFER_BIT)'. >> This definitely looks like a driver issue. You could try to remove the >> glClear line entirely to see if the program runs, but I suspect it will >> crash somewhere else. >> >> To confirm, you might want to try using another library like PyOpenGL, >> and seeing if you get the same crash on the call to glClear. This will at >> least confirm that it's a driver issue. >> >> -Ben >> >> >> On Friday, October 27, 2017 at 5:12:34 PM UTC+9, 9EVRT04KI wrote: >>> >>> >>> Hello guys, >>> my pyglet stop working! >>> This error pops out each time i run any pyglet code, this is, for >>> example, traceback for pyglet example graphics.py: >>> >>> File "graphics.py", line 179, in <module> >>> pyglet.app.run() >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/app/__init__.py", >>> line 143, in run >>> event_loop.run() >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/app/base.py", line >>> 136, in run >>> self._run_estimated() >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/app/base.py", line >>> 165, in _run_estimated >>> timeout = self.idle() >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/app/base.py", line >>> 280, in idle >>> window.dispatch_event('on_draw') >>> File >>> "/usr/local/lib/python3.4/dist-packages/pyglet/window/__init__.py", line >>> 1154, in dispatch_event >>> if EventDispatcher.dispatch_event(self, *args) != False: >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/event.py", line >>> 355, in dispatch_event >>> if handler(*args): >>> File "graphics.py", line 83, in on_draw >>> glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) >>> File "/usr/local/lib/python3.4/dist-packages/pyglet/gl/lib.py", line >>> 104, in errcheck >>> raise GLException(msg) >>> pyglet.gl.lib.GLException: b'invalid enumerant' >>> >>> At first i get it when i tried to run my own code, so i looked for >>> errors there, but then i realize that it is happening for any script on >>> on_draw() function. >>> At the same time, glxgears working fine. What i did: i tried to google, >>> but find no answers. Then i tried to reinstall all python, with pyglet. >>> That do nothing. >>> Any ideas? Thanks anyway. >>> >> >> -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
