Hey guys,

I've been struggling with a few things with Pyglet and figured I'd
fire off an email to the list.

1. Is TGA file support broken?  I tried loading a TGA file with
image.load on OSX 10.4 and ended up with the error:

Traceback (most recent call last):
  File "LoadTGA.py", line 84, in <module>
    main()
  File "LoadTGA.py", line 77, in main
    Render()
  File "LoadTGA.py", line 51, in Render
    m_tga.blit(250, 400, 0)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyglet/image/__init__.py",
line 708, in blit
    self.texture.blit(x, y, z, width, height)
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyglet/image/__init__.py",
line 1316, in blit
    x + w, y,     z,     1.,
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

This is with pyglet 1.0.  I haven't tried it with 1.1 as of yet.  If I
convert the file to a png it works fine.

2.  If I access the pixel data should I be able to pass it to a call
to glDrawPixels() instead of using the blit method?  I realize this
doesn't make a ton of sense, but I'm trying to see what is and is not
possible w/ pyglet and OpenGL.  I've been playing around with
glBitmap() which seems to work fine as long as you use ctypes to
construct a GLubyte array.

3.  Is it possible to make calls to glGetIntegerv()?  I ran into this
last night:

>>> x = GLint
>>> glGetIntegerv(GL_MAX_LIGHTS, x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>:
expected LP_c_long instance instead of _ctypes.SimpleType

I fiddled around with some other different variable types but never
managed to get it to return a useful value.

4.  Is there a canonical way to parse the return value of
glGetString()?  The ctypes manual mentions using libc strchr(), but
this isn't very cross platform.  I cooked up something quickly using
chr() and exiting a while loop when I find a null character, but it
seems like there has to be a better (ie. more pythonic) way of doing
this.  If I try to do this in a list comprehension it just segfaults
since it doesn't know when to stop on the null value.

Thanks,
--Patrick.

--~--~---------~--~----~------------~-------~--~----~
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