I did everything so far on OpenGL ES 1.0. Each of those effects is just a couple of graphics programming tricks. Individually they aren't special but together they make for a nice scene.
On Apr 13, 9:38 pm, Charles Li <[email protected]> wrote: > The test(not my code) just hold a Texture array ( one background and > the others are spirits). > Every frame render the background with fullscreen and move the spirit. > The following codes in GLSpirit.java do the actually draw. > > public void draw(GL10 gl) { > gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureName); > > if (mGrid == null) { > // Draw using the DrawTexture extension. > ((GL11Ext) gl).glDrawTexfOES(x, y, z, width, height); > } else { > // Draw using verts or VBO verts. > gl.glPushMatrix(); > gl.glLoadIdentity(); > gl.glTranslatef( > x, > y, > z); > > mGrid.draw(gl, true, false); > > gl.glPopMatrix(); > } > } > > To be honest I don't familiar opengl. Could you tell me the trick to > get pixel-perfect drawing? I want my game support different screen > resolution. > And what's your device? > You make me an impressive about " multitexturing, particle effects, > shadows, parallax scrolling backgrounds, lots of dynamic text and on- > screen controls.", and I just want to embedded them into my small > engine. > What's the version of opengl for them? > > On Apr 14, 3:45 am, Robert Green <[email protected]> wrote: > > > > > It's going to depend on more factors than number of sprites. GPUs are > > usually fill-bound and so the functions you use to filter and blend > > have a large impact on performance. What does your test do? Does it > > distribute small quads all over the screen like particle effects do? > > Are the quads blended? I was assuming they are. What filtering modes > > are you using? Are you drawing pixel-perfect or transforming? I > > think there are tricks in OpenGL to draw at 1.5,1.5 instead of 1.0,1.0 > > to get pixel-perfect drawing, which may be more efficient because the > > texture unit will only have one pixel to read off the texture instead > > of multiple, or so I think, but am not sure. > > > I use OpenGL for 2D and get adequate performance on all hardware- > > accelerated devices. I'm using multitexturing, particle effects, > > shadows, parallax scrolling backgrounds, lots of dynamic text and on- > > screen controls. > > > On Apr 6, 12:12 am, lixin China <[email protected]> wrote: > > > > I'm preparing code a game. > > > So I need benchmark the OpenGL find a good way render my 2d stuffs. > > > > And I found a project have done > > > that.http://code.google.com/p/apps-for-android/ > > > SpriteMethodTest > > > > I only have nexus one. The following it's the test result from my > > > phone. > > > ======================================== > > > test 1: 10 Sprites without animate > > > Canvas: 142.85 fps > > > OpenGL 1: 34.48 fps > > > OpenGL 2: 33.33 fps > > > OpenGL 3: 33.33 fps > > > > test 2: 10 Sprites with animate > > > Canvas: 90 fps > > > OpenGL 1: 32 fps > > > OpenGL 2: 33 fps > > > OpenGL 3: 32 fps > > > > ======================================== > > > test 3: 100 Sprites without animate > > > Canvas: 111 fps > > > OpenGL 1: 43.47 fps > > > OpenGL 2: 43.47 fps > > > OpenGL 3: 41.66 fps > > > test 4: 100 Sprites with animate > > > Canvas: 62.5 fps > > > OpenGL 1: 45 fps > > > OpenGL 2: 43 fps > > > OpenGL 3: 45 fps > > > ======================================= > > > test 5: 500 Sprites without animate > > > Canvas: 27 fps > > > OpenGL 1:20 fps > > > OpenGL 2:23.8 fps > > > OpenGL 3:23.8 fps > > > test 6: 500 Sprites with animate > > > Canvas: 25 fps > > > OpenGL 1: 20 fps > > > OpenGL 2: 23 fps > > > OpenGL 3: 22 fps > > > ======================================= > > > test 7: 1000 Sprites without animate > > > Canvas: 15.38 fps > > > OpenGL 1: 10.5 fps > > > OpenGL 2: 12.82 fps > > > OpenGL 3: 14.7 fps > > > test 8: 1000 Sprites with animate > > > Canvas: 15.15 fps > > > OpenGL 1: 10.3 fps > > > OpenGL 2: 12.65 fps > > > OpenGL 3: 14.28 fps > > > > ================================== > > > > The result observably show that the rendering performance on nexus > > > one, Canvas faster than OpenGL way. > > > Why? Did anybody test it on the other device? > > > > And another question. > > > I write a test application just render a background and a moving > > > sprite with draw_texture extension. > > > And use Rokon (which is a 2D game engine) do the same thing. > > > And test device of course its my nexus one. > > > > Rokon got 60fps and my app just 55fps in average. > > > It was weird because I saw a video on Google I/O Session about how to > > > write a real-time game(http://www.youtube.com/watch?v=U4Bk5rmIpic. > > > Video shows that draw_texture have better performance that the usual > > > way. > > > Somebody knew the reason? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

