how to acquire Tristan McDonald's Shader.py

27 views
Skip to first unread message

Nicky Mac

unread,
Apr 20, 2020, 5:25:59 AM4/20/20
to pyglet-users
the splendid glsl  examples in pythonstuff.org  require the use of  Tristan McDonald's  Shader.py  
 but the code there is badly formatted and after unscrambling it I can't get it to run.  
 Is there somewhere else I can acquire this code?

Nicky Mac

unread,
Apr 20, 2020, 11:22:26 AM4/20/20
to pyglet-users
Ok I've now found it, but when used errors:

  File "C:/Python/Python36/Dhruve and me/Pyglet\shader.py", line 40, in createShader
    src = (c_char_p * count)(*strings)
NameError: name 'c_char_p' is not defined

claudio canepa

unread,
Apr 20, 2020, 11:59:45 AM4/20/20
to pyglet...@googlegroups.com
From a comment in the page:

There’s a missing import in the shader module.

File “/shader.py”, line 40, in createShader


src = (c_char_p * count)(*strings)

NameError: global name ‘c_char_p’ is not defined

Resolved by adding

from ctypes import *


--
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 pyglet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyglet-users/3c81c9be-9a13-4d10-8aae-32b34a0275ae%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages