Yes, it did work. I tried resizing the image to 512 and it worked.
Thanks again for all your help
Astan Chee wrote:
I'll try that now. So height and width of 256 or 512 should be
alright,right?
Also upon further reflection, it seems that in wxglcanvas, it doesnt
actually error, but the textures arent loaded and a blank black texture
is used anyway. I had a hard time seeing this because the texture image
itself is almost black.
Thanks again for your help.
Cheers
Astan
Brian Fisher wrote:
the error you originally sent shows 750 as the width and
height arguments to glTexImage2D on the exception- 750 is not a power
of 2. Hence you were trying to use non-power of 2 textures. To make it
use of power-of-2 you'd have to either put that 750 wide & high
image in some bigger texture (i.e. scale it up or black box it) or
split it across multiple textures.
As far as what is different between pygame display and wxglcanvas, I
don't know - is it still the same size for the window for both? Are
there possibly some calculations that are different with your different
code related to texture size? Also the problem could be something else
other than texture size (maybe something with the texture format not
being supported, or maybe the driver didn't like some of the texture
contents?) that would be related to how the GL context was created...
On Mon, May 5, 2008 at 9:52 PM, Astan Chee
< stanc@xxxxxxxxx>
wrote:
Thanks for the reply.
Here is where it gets wierd.
I have modified the script to not use a pygame display. Instead it uses
a wxglcanvas on a wx frame/notebook. Compiled using the same parameters
but still use pygame to load the image.
That one worked fine compiled or not in any machine.
So im willing to discount anything from py2exe. Since it is a pygame
display, i was wondering what is different about it? or how do i check
if im using a non power-of-2 texture or convert my textures so that it
can work?
Thanks again for your help.
Astan
Brian Fisher wrote:
I'm 99.9% sure that error has nothing to
do
with Py2Exe at
all.
It seems the system that has the problem must not like something about
the way glTexImage2D was called in that case - GL errors like you see
there come from the drivers. I would guess that it is that you are
using a non power-of-2 texture size (a bad thing to do if you didn't
explicitly check for support and you care at all about compatibility)
On Mon, May 5, 2008 at 8:31 PM, Astan
Chee
< stanc@xxxxxxxxx>
wrote:
Hi,
I have a python script that uses wx, pygame and pyopengl. I've combined
wx and pygame similar to http://wiki.wxpython.org/IntegratingPyGame
(in windows) and the pygame has a separate thread. The pygame part of
it uses pyopengl for a display window and to load images. When I create
a .exe from this script, the executable works fine on the pc that i
compiled it on (my one), but it wont run anywhere else; even ones that
are almost identical build to mine (it doesnt have python, pygame or
pyopengl installed). It gives me a wierd error that I dont know what it
means. Does anyone know what might cause it? or how do I debug these
problems? Why would it work on my pc and not anywhere else?
Thanks for any help
It gives me the following error:
Unhandled exception in thread started by
Traceback (most recent call last):
File "wxSolOutWindow.py", line 637, in Run
File "wxSolOutWindow.py", line 152, in Inited
File "wxSolOutWindow.py", line 241, in ObjMain
File "c:\Documents and
Settings\$USER\Desktop\2\dist\PyOpenGL-3.0.0b1-py2.5.egg\OpenGL\wrapper.py",
line 1624 in __call__
File "c:\Documents and
Settings\$USER\Desktop\2\dist\PyOpenGL-3.0.0b1-py2.5.egg\OpenGL\wrapper.py",
line 924 in wrapperCall
OpenGL.error.GLError: GLError(
err = 1281,
description = 'invalid value',
baseOperation = glTexImage2D,
pyArgs = [
GL_TEXTURE_2D,
0,
GL_RGBA,
750,
750,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
'\x00\x00\x00\xff\x00\x00\x00\xff\x00...
],
cArgs = [
GL_TEXTURE_2D,
0,
GL_RGBA,
750,
750,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
'\x00\x00\x00\xff\x00\x00\x00\xff\x00...
],
cArguments = (
GL_TEXTURE_2D,
0,
GL_RGBA,
750,
750,
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
c_void_p(146210868),
)
)
--
"Formulations of number theory: Complete, Consistent, Non-trivial.
Choose two."
Animal Logic
http://www.animallogic.com
Please think of the environment before printing this email.
This email and any attachments may be confidential and/or privileged.
If you are not the intended recipient of this email, you must not
disclose or use the information contained in it. Please notify the
sender immediately and delete this document if you have received it in
error. We do not guarantee this email is error or virus free.
--
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."
Please think of the environment before printing this email.
This email and any attachments may be confidential and/or
privileged.
If you are not the intended recipient of this email, you must not
disclose or use the information
contained in it.
Please notify the sender immediately and delete this document if you
have received it in error.
We do not guarantee this email is error or virus free.
--
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."
Please think of the environment before printing this email.
This email and any attachments may be confidential and/or
privileged.
If you are not the intended recipient of this email, you must not
disclose or use the information
contained in it.
Please notify the sender immediately and delete this document if you
have received it in error.
We do not guarantee this email is error or virus free.
--
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."
Please think of the environment before printing this email.
This email and any attachments may be confidential and/or privileged.
If you are not the intended recipient of this email, you must not disclose or use the information contained in it.
Please notify the sender immediately and delete this document if you have received it in error.
We do not guarantee this email is error or virus free.
|