[android-developers] Re: Nexus S and gingerbread Sensor events — Which sensor uses what hardware ?

2011-03-16 Thread Mathias Agopian
Hello, TYPE_ACCELEROMETER uses the accelerometer and only the accelerometer. It returns raw accelerometer events, with minimal or no processing at all. TYPE_GYROSCOPE (if present) uses the gyroscope and only the gyroscope. Like above, it returns raw events (angular speed un rad/s) with no

[android-developers] Re: Motorola Droid -- Poor accelerometer performance

2009-12-16 Thread Mathias Agopian
Hello, I have double checked the code that returns the sensor list and it seems correct. You definitely don't want to use SensorManager.SENSOR_ACCELEROMETER, which is a deprecated constant for the 1.0 API. The correct way to retrieve a sensor is to do the following: Sensor s = getDefaultSensor(

[android-developers] Re: Motorola Droid -- Poor accelerometer performance

2009-12-16 Thread Mathias Agopian
With respect to the unreliable delay between events there are 2 reasons for this: 1) you don't receive an event when the value doesn't change. 2) there is a known bug in SensorManager where the thread pulling the events out of the h/w queue is running at the same priority than the UI thread

[android-developers] Re: OpenGL on T-Mobile G1: How to turn OpenGL on and off with SurfaceHolder ?

2008-12-26 Thread Mathias Agopian
Hi, On Dec 26, 5:00 am, Toothy Bunny hongkun...@gmail.com wrote: Hi All, When designing a 3D game running on Android, we need to enter into 3D (OpenGL) rendering and quit back to 2D rendering from time to time, like this control flow: game title page (2D) - game main menu (2D) - game window

[android-developers] Re: OpenGL context = how to load non power of two dimension bitmap?

2008-12-07 Thread Mathias Agopian
Hi, The G1 h/w doesn't support non power-of-two texture (NPOT) dimensions. However, Android's software implementation does. In order to know if a particular opengl context supports NPOT, you need to check for the npot extension string. When the extension is not available, you have to use a