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 sceGuDrawArray

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



Joined: 16 May 2006
Posts: 22

PostPosted: Tue May 16, 2006 4:53 am    Post subject: Problem with sceGuDrawArray Reply with quote

hello everybody
I can use sceGuDrawArray to draw in 2D with GU_TRANSFORM_2D but in 3D with GU_TRANSFORM_3D only sceGumDrawArray work, but sceGuDrawArray draw nothing, why ?
my program use the same GU initialisation as the sample "cube", and in the sample "cube" too, when I replace sceGumDrawArray by sceGuDrawArray, nothing is draw, why ? and what can I do to draw things in 3D with sceGuDrawArray
thank you for the answer
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue May 16, 2006 5:30 am    Post subject: Reply with quote

Because sceGumDraw*()-functions flush the matrix-cache before it calls sceGuDraw*(). Use sceGumUpdateMatrix() prior to sceGuDrawArray() if you use the gum-library to transform your geometry.
_________________
GE Dominator
Back to top
View user's profile Send private message
skwi



Joined: 16 May 2006
Posts: 22

PostPosted: Tue May 16, 2006 6:34 am    Post subject: Reply with quote

thank you, I'll try to change things
Back to top
View user's profile Send private message
skwi



Joined: 16 May 2006
Posts: 22

PostPosted: Fri May 19, 2006 6:50 am    Post subject: Reply with quote

but is guDrawArray faster as gumDrawarray? is there any advantages to use guDrawArray instead of gumDrawArray ?
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Fri May 19, 2006 3:53 pm    Post subject: Reply with quote

sceGuDrawArray() is the function that actually renders anything. sceGumDrawArray() is a convenience-function in PSPGUM that makes sure that matrices modified by sceGum*()-functions are flushed to the hardware. It's basically this:
Code:
void sceGumDrawArray(...)
{
 sceGumUpdateMatrix();
 sceGuDrawArray(...);
}

_________________
GE Dominator
Back to top
View user's profile Send private message
skwi



Joined: 16 May 2006
Posts: 22

PostPosted: Tue May 23, 2006 4:57 am    Post subject: Reply with quote

thank you a lot
i think i understand now

but i'll continue programming later cause my psp screen is broken
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