Error in log.txt from pspgl

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Error in log.txt from pspgl

Post by jsharrad »

Every time I run my program it runs perfectly and all the textures display yet I keep getting this in ms0:/log.txt

Code: Select all

*** GL error 0x0501 in glTexImage2D ***
*** GL error 0x0501 in glTexImage2D ***
(yeah, twice every time it's run)

What does it mean and any idea what I can do to fix it? my glTexImage2D(); appears to be correct and it all does display correctly...

Code: Select all

glTexImage2D(GL_TEXTURE_2D, 0, 3, textureinfo.Width, textureinfo.Height, 0, GL_RGB, GL_UNSIGNED_BYTE, textureinfo.Data);
Any ideas?
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Post by zilt »

A 0x0501 is a GL_INVALID_VALUE error. Most likely it's due to your third param, '3'. It should be one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA - none of which are '3'. It could also be your width or height if there aren't 2^n
"We are dreamers, shapers, singers, and makers. We study the mysteries of laser and circuit, crystal and scanner, holographic demons and invocations of equations. These are the tools we employ and we know... many things." -- Elric, B5
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

Aha! Thanks, that was it. The 3 in there is fine but somehow my texture got saved as 260x256. /bonkself
Post Reply