×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    3D hardware acceleration

    Question: do any of the S60 5th edition phones feature hardware acceleration of 3D graphics?

    I've got a quite simple 3D game, which runs quite well on S30 3rd ( 320x240 ) - I get 20-25 FPS - but I just tried in on ( granted, the cheapest 5530 Xpr ) a S60 5th with 640x360 and man is it slow... 8 FPS, not playable at all.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: 3D hardware acceleration

    If your S60 3rd is an N82, N93 or N95, then I'm not surprised. You might want to take a look at JBenchmark 3D results. JBenchmark is not a 100% precise guide to performance - results can vary even on the same device, and they are averaged from a set of tests, so real results for you might be different. However, you can see a HUGE difference between the top few devices and the others - it's a fair guess that these few have hardware-assisted 3D.

    There's no figure for the 5530, but you can download the benchmark app for yourself if you want a figure.

    Graham.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Re: 3D hardware acceleration

    Thanks for the link!

    Well, it's a very simple 3D ( pretty much only one object - 108 triangles - moves rapidly ). There's something strange: on, let's say, the Nokia 3120 Classic ( which is reported to have JBenchmark of 136 ) the game runs at 22 FPS. I've just tried it on N97 ( JBenchmark 148 according to the site ) and I get 8.2 FPS. I think this is because of the much larger screen. That would suggest that either ( hopefully! ) my code sucks, or the JBenchmark people don't know what they are talking about.

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: 3D hardware acceleration

    3120 and N97 are also different platforms. Different 3D implementations seem to have quite different performance characteristics. The Series 40 implementation is quite tolerant, and tends to perform fairly well (within the limits of the device) no matter what you do. Other implementations can be more fussy.

    Things that might be slow on some implementations:

    * Using mutable Image2D objects.
    * Using Image2D objects with dimensions that are not powers of 2.
    * Alpha blending.
    * Having a viewport that is not full-screen.
    * Repeatedly calling bindTarget().
    * Having triangles in strips with a length of one - the same number of triangles may render faster in fewer strips.
    * Having objects outside the viewport - try to remove objects from the scene if you know they're behind the camera.

    Getting everything right may double or even triple performance, compared to getting everything wrong. Or, it might make no difference at all, depending on how fussy the 3D implementation is. Ironically, hardware-accelerated devices can be the most fussy, since the hardware only accelerates certain things and you get big differences in performance between things the hardware likes and things it doesn't.

    Graham.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Re: 3D hardware acceleration

    * Repeatedly calling bindTarget().

    I am bindingTarget() each time in my paint() method - I thought I have to?

    * Having triangles in strips with a length of one - the same number of triangles may render faster in fewer strips.

    Well, yes, the 108-triangles object is rendered using 27 triangle strips with 4 triangles in each strip. ( Graphics.render( VertexBuffer, IndexBuffer, Appearance, Transform ) is called 27 times in each paint() )

    Grouping them together in longer strips for rendering is possible only by dynamically detecting which ones happen to be next to each other at the moment and re-creating VertexBuffers, which is also said to incur performance penalty... Worth a try, though.

  6. #6
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    Re: 3D hardware acceleration

    yes, you are right repainting the screen of 640x320, is a burden for the paint update loop, you need to design your application to paint only a region to the Graphics object, I have experienced the same with my application.

    Adam.

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: 3D hardware acceleration

    Quote Originally Posted by Utumno View Post
    I am bindingTarget() each time in my paint() method - I thought I have to?
    Yes. By "repeatedly", I mean more than once per paint(). However... you could paint to an off-screen buffer, and only bind once. Not sure the time saved would offset the cost of painting the buffer to the screen (unless you do as Adam suggests, and use the buffer to implement incremental updates).

    Quote Originally Posted by Utumno View Post
    Well, yes, the 108-triangles object is rendered using 27 triangle strips with 4 triangles in each strip. ( Graphics.render( VertexBuffer, IndexBuffer, Appearance, Transform ) is called 27 times in each paint() )
    In most cases, this is a function of the exporter used to create the m3g files. Some, I think, are better than others. Don't ask me which, it's a long time since I looked at this!

    Graham.

  8. #8
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Re: 3D hardware acceleration

    First, a little rant: it really sucks that Nokia did not include any 3D hardware acceleration in the (supposedly!) high-end S60 5th Ed. devices. They would make a decent platform for simple 3D gaming, but as it stands now, if even my simple stuff barely runs, it's clear that any kind of more advanced, 640x360 3D with M3G is out of question.

    Maybe using JSR 239 ( OpenGL ES ) directly would make a significant difference?

    I managed to get the FPS up to about 9 using some micro-optimizations; but that's about all I can do walking in the dark here ( don't really know what is fast and what is a bottleneck and the emulator is completely useless for such experiments )

    I am afraid that rendering to an offscreen image wouldn't help here because bulk of action involves camera flying around, which changes everything so most of the time I would have to redraw the whole image anyway and suffer additional cost of copying that to the screen.

Similar Threads

  1. I have some question about 3d graphics hardware acceleration
    By micro.engine in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2009-07-31, 04:38
  2. n95 j2me 3d graphics hardware acceleration
    By mincua in forum Mobile Java Games
    Replies: 2
    Last Post: 2008-10-06, 10:31
  3. pbuffer on phones without hardware acceleration
    By ed_welch in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-03-14, 09:28
  4. Does OpenGL ES texture have dedicated mem on Phones with 3D Hardware?
    By limingchina in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2008-01-16, 23:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •