PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

CGapiDisplay on MIPS processors

Hi,

I have some code that attempts to Blt or BltFast a surface directly onto the main display surface, such as:


m_display.BltFast(0,0, &m;_othersurface, CRect(0,0,100,100), 0, NULL);

This works fine on ARM and SH3 processors, but does not seem to work on MIPS processors. Has anyone seen this problem or found a fix for it?

I'd like to be able to draw to the screen without repainting the entire screen with a Flip() call.
I was unaware you could blit directly to the display buffer.

In addition to mpeng's question, I'd like to know if this practice is safe and sanctionned bu Johan, as long as we check for lost backbuffer from time to time.

Thanks!
I would not recommend drawing directly to the display. Most new devices use a double buffered display where direct drawing is impossible (such as the 740 and the 54xx series). This is one of the reasons "dirty rectangles" is not supported in GapiDraw. This is also true for the Cassiopeia (MIPS) devices. On the Cassiopeia, the back buffer in GapiDraw is the memory area returned as a pointer by GAPI. This back buffer is then copied using DMA by the device itself to the frontbuffer on each Flip().

You can check if the display is double buffered by calling display->GetDisplayCaps(). If the flag GDDISPCAPS_DIRECT is set, the device supports drawing directly to the display.