Problem with pspgl texturing

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

Moderators: cheriff, TyRaNiD

Post Reply
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Problem with pspgl texturing

Post by drcd »

Hi
I would like to know if there are problems with pspgl texturing because i can draw for example a quad but when i want map it, the mapping does nothing or the quad disappear. My texture is in a tga format and works on PC. So if someone here knows problems and how to solve them,can you tell me ho to fix it?
Thx
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Re: Problem with pspgl texturing

Post by zilt »

drcd wrote:Hi
I would like to know if there are problems with pspgl texturing because i can draw for example a quad
Quads aren't supported. From the pspgl homepage http://www.goop.org/psp/gl/:

GL_QUADS
not supported


Zilt
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

I know but:

Code: Select all

glBegin(GL_QUADS);
glVertex3f(Position.x,Position.y,Position.z);
glVertex3f(Position.x+Size.x,Position.y,Position.z);
glVertex3f(Position.x+Size.x,Position.y-Size.y,Position.z);
glVertex3f(Position.x,Position.y-Size.y,Position.z);
glEnd();
This part of code draw a quad. So i thought that the website wasn't updated.
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

I seem to recall someone saying that GL_QUADS are implemented with GL_TRIANGLE_STRIP.
Check if your code works with them on pc, maybe its back to front?
(Haven't played with em myself, just using triangles atm)
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

I've tried GL_TRIANGLE_STRIP and i have the same result. I've also tried to just draw a quand using GL_QUAD and change its color using glColor3ub but the quad kept its black color. I've tried to do the same thing with GL_TRIANGLE_STRIP and apply a color but i saw the same result (black color). It's very strange. Does someone can texture a quad or change its color?
drcd
Posts: 22
Joined: Sun Dec 04, 2005 6:58 am

Post by drcd »

Well, in fact there is no problem with pspgl to bind texture. I've tried with a bmp loader and it works fine but i would like to use tga or bmp with an alpha component and i don't know if it's possible.
Post Reply