Re: [PyOpenGL-Users] NeHe Lesson 6
Brought to you by:
mcfletch
From: Alexander S. <scr...@lx...> - 2004-10-14 11:21:31
|
Ian Krepps wrote: > I am playing around with lesson6.py in the demo files (ported to PyOpenGL 2.0 by Tarn Weiser Burton, original source C based turtorial at nehe.gamedev.net). > > When I replace the "NeHe.bmp" file with other bmp files (of similar size) I get the following error: > > File "lesson6.py", line 76, in LoadTextures > glTexImage2D(GL_TEXTURE_2D, 0, 3, ix, iy, 0, GL_RGBA, GL_UNSIGNED_BYTE, image) > OpenGL.GL.GLerror: [Errno 1281] invalid value > >>Exit code: 1 > > > I have checked the manpages for glTexImage2D for the error INVALID_VALUE (I believe this is correct), but I am unable to figure out the source of the error. > > Has anyone else seen this problem ? Do I need to perform some error checks on the bmp format prior to calling glTexImage2D ? I am new to Opengl. > An extract from the source code (lesson6.py is below) Double-check if the bitmap width and height are powers of 2 and meet your OpenGL implementation's limits on texture size. -- ./lxnt |