[PyQt] max texture size for QGLWidget.bindTexture?
David Boddie
dboddie at trolltech.com
Tue Sep 9 12:43:16 BST 2008
On Tue Sep 9 00:28:49 BST 2008, Brian Parma wrote:
> Thanks for the response, that's a good find, although I'm trying to
> figure out how to interpret the result. On my laptop it returns 2048,
> but how does that translate into resolution? I thought it was memory
> size at first, but changing formats from RGB8 to RGB4 doesn't let me use
> larger textures. Right now I take a screen cap which is 1024 x 768, and
> I then scale it down with QPixmap.scaledToWidth. I've been playing with
> the width to try and find the limit, and it seems to be between 650 and
> 700 pixels wide.
OK, so it won't even show the full width of 1024 pixels? It sounds like it
isn't just a problem with the texture not having dimensions that aren't a
power of 2 because 1024 would obviously be fine.
I would imagine that this is an OpenGL problem rather than a Qt problem, but
you would have to try using native/Python arrays rather than a QPixmap to
test that theory. It might be worth creating a small test program that
illustrates this problem and posting on the PyOpenGL mailing list:
http://sourceforge.net/mail/?group_id=5988
It could be the case that your hardware/driver has problems with textures
larger than a certain size, even though it claims to support them. Can you
say what platform, hardware and driver you are using?
David
More information about the PyQt
mailing list