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 

More Weirdness with pspgl and rendering (solved)

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



Joined: 05 May 2005
Posts: 66

PostPosted: Wed Sep 07, 2005 4:45 am    Post subject: More Weirdness with pspgl and rendering (solved) Reply with quote

Here's whats happening:

I render the first frame fine (I see everything on the screen nicely), then it hangs. I am rendering ~24 images, Tracing it down, I see two potential things are causing this hang or helping it.

If I comment out:
//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 128,128, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, data);

we run fine, with everything else, it just shows up white boxes, ok, cool. If I put that line in, we hang again.

NOW, if I take this line out:
//glDrawArrays(GL_TRIANGLES, 0, 2*3);

and leave the other line in, we run fine, just nothing gets drawn...

YES, my verts and image data are aligned 16 byte boundries and I am calling "sceKernelDcacheWritebackAll();" after I pass my glInterleavedArrays. I checked both verts and image data for valid pointers and correct data.

Does anyone have any idea what might be causing this, I have the latest toolchain, and pspgl, I updated all my code, I have no idea why this is doing this.


Thanks a lot
Jeff.


Last edited by webjeff on Wed Sep 07, 2005 5:13 am; edited 1 time in total
Back to top
View user's profile Send private message
webjeff



Joined: 05 May 2005
Posts: 66

PostPosted: Wed Sep 07, 2005 4:58 am    Post subject: Reply with quote

isnt it always right after you post you figure out what you did wrong?

well, it happened, so incase you get this or see this:

After the glTexImage2D call, I added "glFlush();" and that did the trick, looked like some data was stuck. I should probably add that to all the graphics calls, what do you guys think?

Jeff.
Back to top
View user's profile Send private message
holger



Joined: 18 Aug 2005
Posts: 204

PostPosted: Thu Sep 15, 2005 3:43 am    Post subject: Reply with quote

Right now textures are not copied but directly passed to the GE DMA engine at render time. In order to synchronize, call glFlush() after issuing your render command. Jeremy's texure object patch changes this, hope to get to this within the next days.
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