Well the problem as I see it is following: - Rendering surface-sized bitmap in Canvas: cost 1fps - Rendering surface-sized texture quad in GL: cost 35fps
If I want to render a 2D application in GL, then I have to draw at least ONE background image, in most cases I want to do parallax rendering using multiple bitmaps. This wouldn't even be much of a problem because the bitmaps in question are usually quite small but the problem here is not the texture resolution, its simply drawing of pixels. The way it goes right now I have 21fps left to all my calculations and other draw calls after just one single quad. The 21fps is already 3fps down from the min. 24fps needed for smooth experience. I know about the hardware limitations of mobile platforms (e.g. NintendoDS development), the only thing I want now is to really understand the bottleneck of this issue. I wouldn't have any questions left if the Canvas element performed as bad as the GLES20 context. On Mar 15, 9:43 pm, laurent mallet <laurent.mal...@gmail.com> wrote: > AlexRempel, The problem is just your experience on mobile device. > GPU on mobile devices have very low fillrate. So you must use > very carefully your draw operations. > > N1 or Droid max overdraw is one for 30 FPS but on Nexus S (or SGS) you > have a > better fillrate, so you can have an overdraw of 3. > > You can use 10000 triangles as the same speed if you don't use more > pixels. > > Thanks > > Ellis, > IOPixel > > On 15 mar, 21:27, ip332 <iprile...@gmail.com> wrote: > > > > > 2D shoudl be much faster because it usually about transferring pixels > > (usually organized into a scan lines) from one bitmap to another when > > 3D requires a lot of calculations with floating point and it should be > > slower than 2D even with HW support. > > On the other side, 35 fps vs. 57 is not too bad if you will get the > > same performance for the real app. > > > Try to model the real app output (with respect to the number of > > triangles, size of textures and blending operations). May be you will > > still get the same 35 fps :) > > > On Mar 15, 12:48 pm, AlexRempel<alexey.rem...@googlemail.com> wrote: > > > > I just adapted my rendering thread to support a canvas instead of EGL > > > context and I do absolutely the same; showing an fps text and blitting > > > a background texture. > > > Guess what: showing the text only I get 58fps, adding the background > > > picture I get... 57fps! > > > > Now I am officially and very seriously pissed off. I hope that I am > > > just not smart enough to use GLES20 well, otherwise it seems that if > > > you want to blit 2D graphics - you take Canvas; and if and ONLY IF you > > > want many triangles in 3D, then you take OpenGL. > > > > Shouldn't OpenGL be always at least as fast as the 2D API provided by > > > the Canvas? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en