Hello.  Been working through the opengl superbible samples and have
over fifty of them converted to python.

I'm going mad trying to use tesselation in pyglet, a demonstration in
chapter 10 of the book.  I *think* I've worked out an ugly way to get
the callback functions working, but I get an access violation
exception thrown from gluTessEndPolygon.  I may be incorrect about my
callback functions working correctly, and that might be the source of
the problem, but I thought I'd see if anyone had some insight.

Traceback (most recent call last):
  File "florida.py", line 232, in <module>
    pyglet.app.run()
  File "c:\Python26\lib\site-packages\pyglet\app\__init__.py", line
264, in run
    EventLoop().run()
  File "c:\Python26\lib\site-packages\pyglet\app\win32.py", line 74,
in run
    self._timer_func(0, 0, timer, 0)
  File "c:\Python26\lib\site-packages\pyglet\app\win32.py", line 84,
in _timer_func
    sleep_time = self.idle()
  File "c:\Python26\lib\site-packages\pyglet\app\__init__.py", line
193, in idle
    window.dispatch_event('on_draw')
  File "c:\Python26\lib\site-packages\pyglet\window\__init__.py", line
1217, in dispatch_event
    EventDispatcher.dispatch_event(self, *args)
  File "c:\Python26\lib\site-packages\pyglet\event.py", line 349, in
dispatch_event
    getattr(self, event_type)(*args)
  File "florida.py", line 146, in on_draw
    gluTessEndPolygon(pTess)
WindowsError: exception: access violation writing 0x0027AF8D

The file I've been slavishly hacking on is here:
http://github.com/BenSmith/PythonOpenGLSuperBible4/blob/1440145adf2030dc625adeedb67cb3ceb7805b45/chapt10/florida.py

It won't crash right away, you'll need to press the number 2 or 3 key
on your keyboard to enter the areas of code that use gluTessCallback
and gluTessEndPolygon.

Happy hacking,
-b
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to