PocketMatrix forums

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

BltFx / EDGE Internal Renderer on Motorola Q

We are currently developing two games for WM5 using EDGELIB - one uses purely 2D blits (sometimes with BltFx() ) while the other uses the internal 3D renderer.

We have run into two issues with the Motorola Q.

Using BltFx, it seems as if the E2DBLTFX.flipflags are reversed in relation to other devices (HTC Dash and Samsung Blackjack) - that is, what should be a horizontal flip comes out as a vertical flip on the Q but is correct on the Dash and Blackjack.

We also are noticing that textures are not being mapped onto 3D surfaces the same way on this device - we haven't nailed down the exact way in which it's incorrect yet, but it initially appears as if the texture is translated in the u-direction.

All three devices are running the exact same version of the game with EDGELIB 3.70. Are there any differences in the hardware not handled by EDGE that would account for such weirdness? We'd correct it game-side but unfortunately we don't even know what to test for. I'm under the impression that all WM devices run on Intel processors, so there shouldn't be any endian-ness concerns...
Hi Alanhorne,

The difference with the MotoQ device is that its real orientation is different then how it appears. Unfortunately, this causes the bugs you're experiencing. Please call E2DSurface::Lock on the backbuffer and post the xpitch/ypitch values of the E2DSURFACEINFO structure here:

Code:

E2DSURFACEINFO info;
display->buffer.Lock(&info;);
//show info.xpitch and info.ypitch
display->buffer.Unlock();


To temporary work around your problem you can try to set the config->surfprerotate to false in OnDisplayConfig.
the Q reports:

with surfprerotate = true,
xpitch = -480, ypitch = 2

with surfprerotate = false,
xpitch = 2, ypitch = 640.

We've set surfprerotate to false to fix it, and it seems to do the job - I'm under the impression that this will impact performance somewhat, but we have plenty of overhead on the devices that are affected.

Thanks for your help.
Hi Alanhorne,

We've fixed the bugs with BltFx, only the problem with 3D rendering remains. Unfortunately, we can't reproduce the texture mapping problem. Could you post a small sample (for example, a plane with a texture mapped on it) which reproduces the bug on the Motorola Q?

Regarding performance:
Pre-rotated surfaces are faster, because it doesn't need to rotate the surface before showing it onscreen (flip). Also, pre-rotated surfaces are required when developing for Symbian.