http://www.losersjuegos.com.ar/incoming/descargas/20080612/sky.png
("file" command show: sky.png: PNG image data, 2144 x 480,
8-bit/color RGB, non-interlaced)
with this code:
--- %< ---
import pyglet
window = pyglet.window.Window()
img = pyglet.image.load('sky.png')
texture = img.get_texture()
# fail as well as:
# img = pyglet.resource.image('sky.png')
--- %< ---
i get:
--- %< ---
Traceback (most recent call last):
File "bug.py", line 6, in <module>
texture = img.get_texture()
File "/usr/lib/python2.5/site-packages/pyglet/image/__init__.py",
line 780, in get_texture
self._current_texture = self.create_texture(Texture, rectangle)
File "/usr/lib/python2.5/site-packages/pyglet/image/__init__.py",
line 768, in create_texture
texture = cls.create(self.width, self.height, internalformat, rectangle)
File "/usr/lib/python2.5/site-packages/pyglet/image/__init__.py",
line 1451, in create
blank)
File "/usr/lib/python2.5/site-packages/pyglet/gl/lib.py", line 105,
in errcheck
raise GLException(msg)
pyglet.gl.lib.GLException: invalid value
--- %< ---
Is a pyglet or hardware restriction?
thanks!.
--
Hugo Ruscitti
www.losersjuegos.com.ar
Hardware. e.g., this works anywhere:
>>> import pyglet
>>> pyglet.image.load('sky.png')
<ImageData 2144x480>
On the laptop I'm working on at the moment, I get the same error as
you calling get_texture(). You can check the maximum texture size for
your device/driver with:
>>> from pyglet.gl import *
>>> v = GLint()
>>> glGetIntegerv(GL_MAX_TEXTURE_SIZE, v)
>>> v
c_long(2048)
Newer cards (GeForce 6 and later) support texture sizes of at least 4096, IIRC.
Alex.