 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
kazlivsjy
Joined: 25 Dec 2005 Posts: 6 Location: PSPain
|
Posted: Mon Dec 26, 2005 11:17 pm Post subject: copyImage help! |
|
|
I have this weird problem: when I copyImage a background bitmap into the screen, I get some 'garbage' in the bottom-most lines, in the form of spureous-looking black or colour-inverting horizontal lines, with varying length. They appear and disappear during the first frames of animation and then stand still. I suspect it has anything to do with an incorrect configuration of the different buffers and/or data structures that fill the VRAM (draw buffer, depth buffer, etc...), as though they overlapped at some point, but I don't think it's the case. I don't know what goes on when swapBuffers is called, though. I don't even know the size of the VRAM!
The really weird thing is that sometimes it doesn't happen, or a texture is garbaged instead of the background!
My RGBA8888 480x272 image is held on a int buffer with size [512*272] 16-byte aligned
I call
sceGuCopyImage(GU_PSM_8888,0,0,480,272,512,pixeldata,0,0,512,(void*)(0x04000000+(u32)framebuffer));
on every frame, framebuffer = sceGuSwapBuffers()
Can anybody tell or suggest what is the problem? _________________ void printSignature(void) {
printf("Brought to you by Kazlivsjy\n");
} |
|
| Back to top |
|
 |
Brunni
Joined: 08 Oct 2005 Posts: 186
|
Posted: Tue Dec 27, 2005 5:04 am Post subject: |
|
|
You just need to flush the cache before drawing an image that was modified with the CPU. Call sceKernelDcacheWritebackInvalidateAll(); _________________ Sorry for my bad english
Oldschool library for PSP - PC version released |
|
| Back to top |
|
 |
kazlivsjy
Joined: 25 Dec 2005 Posts: 6 Location: PSPain
|
Posted: Tue Dec 27, 2005 10:03 pm Post subject: |
|
|
Yeah, thanks, man! _________________ void printSignature(void) {
printf("Brought to you by Kazlivsjy\n");
} |
|
| 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
|