Hello,
so I have this problem with galaxy S3 and OpenGL ES 1.0.
Here's little backstory:
I had LG P350 (600MHZ CPU, Adreno 200 GPU, 2.8 inch screen) for 2 years or
so. And I was developing this little game framework which used OpenGL. My
old LG handled it pretty well, good framerates, no lags, everything worked
as expected. But few days ago I decided that I should get new phone, so I
ordered Galaxy S3.
So after I got the phone I installed my 2 games which used my framework and
noticed that there is a delay between touching / moving finger on the
screen and things appearing on screen. First I thought that this could be
problem of my input handling system, so I did something like this to check
if that was true:
inputSystem.update();
>
> float x = inputSystem.getTouchX();
> float y = inputSystem.geTouchY();
>
> Log.d("Touch: ", "X: " + x + " Y: " + y);
>
Essentially I just touched my screen, and looked at the logcat to see if
there is any delay in receiving data. And there was absolutely no delay! As
soon as I touched the screen, coordinates on logcat changed.
Then I thought to myself... OK, maybe my rendering system is messed up. To
test if that was true I did exactly this:
public void onDrawFrame(GL10 gl){
> FloatBuffer floatBuffer = buffer.asFloatBuffer();
>
> public void tempDraw(GL10 gl){
> gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
>
> gl.glViewport(0,0,1280,720);
> gl.glMatrixMode(GL10.GL_PROJECTION);
> gl.glLoadIdentity();
> gl.glOrthof(0, 20, 14, 0, -1, 1);
>
> gl.glMatrixMode(GL10.GL_MODELVIEW);
> gl.glLoadIdentity();
>
> gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
> gl.glVertexPointer(2,GL10.GL_FLOAT,0,floatBuffer);
>
> inputSystem.update();
>
> float x = inputSystem.getLastTouchEvent().position.x;
> float y = inputSystem.getLastTouchEvent().position.y;
>
> Log.d("Touch: ", "X: " + x + " Y: " + y);
>
> gl.glTranslatef(x,y,0);
> gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 6);
> }
>
This is as simple as it could be, I didn't use my render system for
rendering, I just used this little piece of code which couldn't get any
simpler. It just draws little rectangle on screen in the position of last
touch event.
And guess what! This didn't do the trick either! It still has delay! *Also
in developer options I enabled "Show touches" function, so I could see in
real time how much delay there is.* After I scroll my finger through
screen, I immediately can see output on logcat, but square on the screen
still has huge delay.
Here's the video showing the delay: GLSurfaceView lag/delay on Galaxy
S3<http://www.youtube.com/watch?v=fWZGshsXDhM>
You can see that "Show touches" android function showing the white dot on
screen, this is where I WANT my square to be, but my square just follows it
with delay.
Just for comparison I will launch painting application which paint on
EXACTLY the white dot. This is the performance I want in my game.
It can't be the problem of my phone, because other games and apps that I
downloaded from google play doesn't have this lag/delay problem.
So can someone help me out please? What am I missing? Have any of you
encountered this problem before?
--
--
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
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.