[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-04 Thread Sérgio Faria
I'm of the same opinion as Nobu Games, it might be a concurrency issue. Canvas works because it runs on the UI Thread. Edvinas, try this (in your sample): // replace x and y with a single volatile variable or use synchronized private volatile long mCoords; //... public boolean

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-02 Thread Nobu Games
Hi Edvinas, I need to ask again, because I think that may be the cause of the delay: how do you communicate the touch events to your rendering thread? Because Android can bombard your UI thread with lots of touch events in no time. But your rendering thread needs to peek before updating the

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-01 Thread Edvinas Kilbauskas
OK, I did that. And yes. It doesn't have the delay anymore! But the problem is... It's Canvas. I don't need canvas, it doesn't fulfill my needs. I need OpenGL. What the hell could be wrong? This is REALLY strange. OpenGL ES 1.0 has delay, ES 1.1 has delay, ES 2.0 has delay. Canvas - no delay!

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-01 Thread Streets Of Boston
Running out of ideas here :-) The test wasn't meant to see if Canvas would work or not. It was about the speed of the touch-event-message delivery. At least we figured out it isn't an issue with the onTouch callbacks. They happen fast enough. What happens if you play with the values of the

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Streets Of Boston
Is your render-mode continuously or when-dirty? If it is when-dirty, be sure to call surfaceView.requestRender() in your onTouchEvent implementation. On Tuesday, July 30, 2013 7:14:22 AM UTC-4, Edvinas Kilbauskas wrote: The best solution to your problem is probably to bite the bullet and

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Edvinas Kilbauskas
2013 m. liepa 31 d., trečiadienis 19:28:23 UTC+3, Streets Of Boston rašė: Is your render-mode continuously or when-dirty? If it is when-dirty, be sure to call surfaceView.requestRender() in your onTouchEvent implementation. It's RENDERMODE_CONTINUOUSLY. Also, I took the advice, and

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Nobu Games
I see in your code sample in your original post that you log the event coordinates. That can stall your app and may be a reason for these delays. Also, how do you communicate the touch events to your rendering thread? On Wednesday, July 31, 2013 12:06:22 PM UTC-5, Edvinas Kilbauskas wrote:

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-31 Thread Streets Of Boston
I looked at your video. It seems that the drawing itself is not an issue. The framerate doesn't stutter nor is it slow. It just lags behind the position of your finger. It seems that the delivery of the touch-events is delayed (at least as far as the rendering is concerned). Try to create a

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread Indicator Veritatis
The best solution to your problem is probably to bite the bullet and rewrite your code to use shaders in OpenGL ES 2.0. All major phones and quite a few minor ones support it now. It may be your only solution, if the Galaxy S3 has to move too many more bits than the P350 did, or has a slower

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread a1
The best solution to your problem is probably to bite the bullet and rewrite your code to use shaders in OpenGL ES 2.0. All major phones and quite a few minor ones support it now. It may be your only solution, if the Galaxy S3 has to move too many more bits than the P350 did, or has a

[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread Edvinas Kilbauskas
The best solution to your problem is probably to bite the bullet and rewrite your code to use shaders in OpenGL ES 2.0. All major phones and quite a few minor ones support it now. It may be your only solution, if the Galaxy S3 has to move too many more bits than the P350 did, or has a