More Weirdness with pspgl and rendering (solved)

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

Moderators: cheriff, TyRaNiD

Post Reply
webjeff
Posts: 66
Joined: Thu May 05, 2005 2:51 am

More Weirdness with pspgl and rendering (solved)

Post by webjeff »

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.
webjeff
Posts: 66
Joined: Thu May 05, 2005 2:51 am

Post by webjeff »

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.
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

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.
Post Reply