 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Wed Aug 31, 2005 6:25 am Post subject: pspgl flickering triangles |
|
|
I got a real simple demo going with 3 boxes, any more than 1 causes half the box to flicker of 2 of the 3 boxes.
I have tried adding "sceKernelDcacheWritebackAll();" all over but still no success, I also tried OR'ing the address with 0x40000000 but no luck, actually doing that only renders 1 triangle, so I dont see that helping much.... any ideas?
Thanks
Jeff. |
|
| Back to top |
|
 |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Wed Aug 31, 2005 7:02 am Post subject: |
|
|
also on a related note, has anyone tested "GL_UNSIGNED_INT_8_8_8_8" in glTexImage2D to work? I'm getting weird results, that work fine with the data I send in on the PC. Also, GL_UNSIGNED_SHORT_4_4_4_4 works fine it seems, so if someone can confirm it works, thatd be most appreciated.
Thanks again.
Jeff. |
|
| Back to top |
|
 |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Wed Aug 31, 2005 8:48 am Post subject: |
|
|
Can someone test this for the PSPGL:
| Code: |
UINT __attribute__((aligned(16))) colors[256] =
{
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,0xff00ff00,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,0xff0000ff,
};
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,256,1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, colors);
|
Should be 2 colors evenly spaced across a 256 image. But it shows red like 3/4's of the image, not sure why. The UV's are set correctly as well.
Has anyone used glTexImage2D Successfully with GL_UNSIGNED_INT_8_8_8_8?
Thanks
Jeff |
|
| Back to top |
|
 |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Wed Aug 31, 2005 12:09 pm Post subject: |
|
|
OK,
I have finally got it to work, it was a stupid error like always :) So I can confirm that the glTexImage2D is good with GL_UNSIGNED_INT_8_8_8_8.
I am however, still getting flickering triangles, any ideas?
Thanks again, sorry for the multiple posts.
Jeff. |
|
| Back to top |
|
 |
holger
Joined: 18 Aug 2005 Posts: 204
|
Posted: Wed Aug 31, 2005 7:55 pm Post subject: |
|
|
| can you please prepare a simple testcase? The demos are running smoothly... |
|
| Back to top |
|
 |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Thu Sep 01, 2005 7:53 am Post subject: |
|
|
Incase any others have this problem, I fixed by doing the following two things:
1) added sceDisplayWaitVblankStart(); at the end of my update loop.
2) aligned my verts to 16 byte boundries.
Then it comes up fine.
Thanks again guys
Jeff. |
|
| Back to top |
|
 |
holger
Joined: 18 Aug 2005 Posts: 204
|
Posted: Thu Sep 01, 2005 11:02 pm Post subject: |
|
|
2) is mandatory right now, vertices are not (yet) repacked for teh DMA transfer
1) should be not required if you set the swap interval to a number greater zero (the initialized default should be one, see pspgl_ge_init.c). |
|
| Back to top |
|
 |
|
|
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
|