Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:M3G performance hints for 3D hardware-accelerated devices (Nokia N93 and Nokia N95)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): Nokia N93, Nokia N95
Created: User:Technical writer 2 (20 Aug 2007)
Last edited: hamishwillee (30 Jul 2013)


M3G performance hints for 3D hardware-accelerated devices (Nokia N93 and Nokia N95)


When using M3G on the Nokia N93 or Nokia N95, you need to be aware of certain performance-related pitfalls.

To begin with, there are some features that are radically more expensive on the Nokia N93 than on phones which have "software acceleration" only:

  • CompositingMode.setColorWriteEnable(false)
  • CompositingMode.setAlphaWriteEnable(false)
  • PolygonMode.setTwoSidedLightingEnable(true)
  • Graphics3D.bindTarget(Graphics)
  • Graphics3D.bindTarget(Image2D)
  • Graphics3D.setViewport(...) (in mid-frame)
  • new Image2D(...)
  • Image2D.set(...)

Some of these are going to be lesser problems on the Nokia N95, but you still won't get the same performance as on other phones. How to get around the issues:

  • Keep color and alpha writes enabled in CompositingMode.
  • Keep two-sided lighting disabled in PolygonMode.
  • Use the OVERWRITE flag at bindTarget (note: not available on the Nokia N93).
  • Clear the color buffer and depth buffer before rendering (especially on the Nokia N93).
  • Do not use MIDP to draw 2D backgrounds. Draw them as texture-mapped quads instead.
  • Unlike 2D backgrounds, 2D overlays carry no significant performance penalty.
  • Keep the viewport full screen. In particular, do not change it while rendering.
  • Use immutable (rather than mutable) Image2Ds wherever possible.
This page was last modified on 30 July 2013, at 10:57.
21 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.