pspgl flickering triangles

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

pspgl flickering triangles

Post by webjeff »

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

Post by webjeff »

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

Post by webjeff »

Can someone test this for the PSPGL:

Code: Select all

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

Post by webjeff »

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

Post by holger »

can you please prepare a simple testcase? The demos are running smoothly...
webjeff
Posts: 66
Joined: Thu May 05, 2005 2:51 am

Post by webjeff »

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

Post by holger »

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