Re: Tristan McDonald's Shader.py

2020-04-22 Thread Nicky Mac
Wow! That fixed it! (I had already changed 'basestring' missing from Python 3 to 'str'). Huge thanks Greg. Virus-free. www.avg.com

Re: Tristan McDonald's Shader.py

2020-04-21 Thread Greg Ewing
On 22/04/20 12:31 am, Nicky Mac wrote: src = (c_char_p * count)(*strings) TypeError: bytes or integer address expected instead of str instance It looks like this was designed for Python 2. You may need to encode the strings to bytes, e.g. src_bytes = [s.encode() for s in strings]

Re: Tristan McDonald's Shader.py

2020-04-21 Thread Nicky Mac
thanks Claudio, I had already imported the ctypes but I still get: src = (c_char_p * count)(*strings) TypeError: bytes or integer address expected instead of str instance and the next line of code looks awkward: glShaderSource(shader, count, cast(pointer(src), POINTER(POINTER(c_char))), None)