forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with pspgl texturing

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
drcd



Joined: 04 Dec 2005
Posts: 22

PostPosted: Sat Jun 24, 2006 3:23 am    Post subject: Problem with pspgl texturing Reply with quote

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
Back to top
View user's profile Send private message
zilt



Joined: 21 Feb 2006
Posts: 45
Location: Ontario, Canada

PostPosted: Sat Jun 24, 2006 4:15 am    Post subject: Re: Problem with pspgl texturing Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
drcd



Joined: 04 Dec 2005
Posts: 22

PostPosted: Sat Jun 24, 2006 4:54 am    Post subject: Reply with quote

I know but:
Code:

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.
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sat Jun 24, 2006 6:26 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
drcd



Joined: 04 Dec 2005
Posts: 22

PostPosted: Sat Jun 24, 2006 9:19 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
drcd



Joined: 04 Dec 2005
Posts: 22

PostPosted: Sat Jun 24, 2006 10:05 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group