I was looking in to finally getting around to trying out
OpenGL to handle Sprites in a game I'm working on. I
figured before I start I'd run Chris Pruett's
SpriteMethodTest (http://tinyurl.com/2u5tbwj)
to get some numbers and motivation to move to OpenGL
from Canvas drawing.
But on an N1, I'm
OK, increased the size and changed the png
images used for the sprites to have transparent
and semi-transparent areas and I get results that
make more sense (but still don't show OpenGL
winning?!?)
200 128x128pixel sprites w/ transparent areas
Canvas:
--
Frame: 46ms (21.73913 fps)
OpenGL ES
You are witnessing the fill-boundedness of that chip. Chris's testing
was on a G1. It has very different performance characteristics.
Canvas is software rendering using a special framebuffer blit which is
lightning fast.
GL is hardware rendering using a texel shader (even if you don't use
it -
You are right, being an OpenGL noob I only timed GL commands, the
actual fps is around 40
On Apr 14, 1:24 am, Mario Zechner badlogicga...@gmail.com wrote:
Hm, seems my post got swalled by the flying spagetthi monster. Here we
go again.
I wonder how you measure the time. Do you measure you
That's still better than what i'd have excepted. Do you draw 4-5 full
screen quads with alpha blending? Are they textured? Gotta try that
myself sometime. 40fps wouldn't be that bad.
On 14 Apr., 11:36, Vladimir vladimir.funti...@gmail.com wrote:
You are right, being an OpenGL noob I only timed
I get around 35 FPS on the N1 on my current 2D game in-dev. The thing
about it, though, is that it's plenty of framerate. The game feels
totally smooth at that rate and doesn't really experience significant
drops (unless you count gmail sync), even when I throw 200 particles
out into the scene.
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) {
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 smallli...@gmail.com wrote:
The test(not my code) just hold a Texture array
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
Rokon got 60fps and my app just 55fps in average.
I tried drawTexfOES for backgrounds in Rokon and got 200+ fps with 4
or 5 alpha-blended layers on Droid, around 100-120 on G1. I also used
it in a 3D game I wrote from scratch and there was a noticeable
performance boost compared to quads.
Canvas
I kind of doubt the performance figures you give. 4 to 5 full screen
alpha blended layers on the droid will give you around 30 to 35 fps. I
assume you only measure the time it takes to execute your OpenGL
commands. The real deal is measuring the delta time between the last
and the current frame.
Hm, seems my post got swalled by the flying spagetthi monster. Here we
go again.
I wonder how you measure the time. Do you measure you frames like
this?
...
long startTime = System.nanoTime();
int frames = 0;
public void onDrawFrame( )
{
... draw stuff ...
if( System.nanoTime() -
12 matches
Mail list logo