Page 1 of 1
The major bottleneck for Graphics Rendering on PocketPC?

Posted:
Feb 21, 2003 @ 12:05pm
by hugepants

Posted:
Feb 21, 2003 @ 2:23pm
by JoJo

Posted:
Feb 21, 2003 @ 3:21pm
by refractor
Writing to the "screen" is certainly a nasty bottle-neck on most PocketPC devices. The "problem" is that the screen buffer that GAPI passes you is generally unbuffered and uncached (so when the DMA reads it to plot to the screen there aren't "written" pixels waiting in the cache to be plotted/missed).
We've been over all this before - try searching the (entire) forum for "unbuffered" or "uncached".

Posted:
Feb 21, 2003 @ 4:10pm
by James S

Posted:
Feb 21, 2003 @ 4:26pm
by refractor
Oh yeah, now I remember (reminded by Moose's post).
IIRC the 3800 series iPaq's actual LCD is "rotated" from the "old" iPaqs. So, to maintain compatability, the 3800's GAPI layer exposes an intermediary buffer and then *rotates* it into screen memory. Again, I'm sure you'll find lots about it by searching the forum.

Posted:
Feb 21, 2003 @ 5:15pm
by Dan East

Posted:
Feb 24, 2003 @ 9:43am
by hugepants
People, Thanks for all the really useful feedback.
Ive tried the following to write my image to the screen but it doesn't work (nothing happens!). Im using the 0xac0755a0 address as suggested and removed the begindraw() and enddraw()
my code is as follows (please dont laugh)
g_gxdp.cxWidth = 240;
g_gxdp.cyHeight = 320;
g_gxdp.cBPP = 16;
g_gxdp.ffFormat = 168;
g_gxdp.cbyPitch = 2;
g_gxdp.cbxPitch = -640;
unsigned short * pusLine = (unsigned short *) 0xac0755a0;
if (pusLine == NULL) return false; // NOT OK
for (unsigned int y = 0; y < g_gxdp.cyHeight; y++) {
unsigned short * pusDest = pusLine;
for (unsigned int x = 0; x < g_gxdp.cxWidth; x++) {
PixelCol = WarpedImage[y*imagewidth+x];
*pusDest = PixelCol;
pusDest += g_gxdp.cbxPitch >> 1;
}
pusLine += g_gxdp.cbyPitch >> 1;
}

Posted:
Feb 25, 2003 @ 4:40am
by Digby

Posted:
Feb 25, 2003 @ 7:44am
by hugepants
yes tried that. Stumped frankly. Is there any urls with source code examples on this topic anywhere?

Posted:
Feb 25, 2003 @ 8:35am
by Digby
What happens if you try to do a memset to video memory?
The starting address of display memory on the iPaq 3800 is 0xAC050020 (pixel location 239, 0). Try setting 153600 bytes, starting at that address, to 0xFF.
Is the resulting screen filled with white?