Android 2.2 SDL Init: "Pixel format unknown -1"

Any ideas? On Android 2.3 it works. This happens at the initial SDL init.

andreas

On Lun 24 Oct 2011 14:29:00 akr escribi?:

Any ideas? On Android 2.3 it works. This happens at the initial SDL init.

andreas

What backend (OpenGL ES 1 or 2?) ? Which SDL (1.3 from HG?) ? The more
information you give the more helpful answers you’ll get.

Gabriel.

gabomdq wrote:

On Lun 24 Oct 2011 14:29:00 akr escribi?:

Any ideas? On Android 2.3 it works. This happens at the initial SDL init.

andreas

What backend (OpenGL ES 1 or 2?) ? Which SDL (1.3 from HG?) ? The more
information you give the more helpful answers you’ll get.

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks for your quick reply. I am using

SDL-1.3.0-5605 from the zipfile downloaded at libsdl.org
/* Enable OpenGL ES */
#define SDL_VIDEO_OPENGL_ES 1
//#define SDL_VIDEO_RENDER_OGL_ES 1
//#define SDL_VIDEO_RENDER_OGL_ES2 1

Also tried to enable all OGL support without success.

On Lun 24 Oct 2011 15:19:35 akr escribi?:

Thanks for your quick reply. I am using

SDL-1.3.0-5605 from the zipfile downloaded at libsdl.org

My first suggestion would be trying again with the latest from HG, perhaps the
problem is solved as there’s been a few changes in the Android code recently.

Gabriel.

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It happens on both - HTC Desire and Simulator

akr wrote:

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It happens on both - HTC Desire and Simulator

HTC Desire classic and Simulator 2.2.

Btw I updated my sources with the most current git. Didnt fix the problem.

Are you using the latest NDK and SDK?

The message comes from surfaceChanged in the SDLActivity.java file. The problem
is that this function gets a -1 as the surface pixel format. -1 as a pixel
format mean an OPAQUE surface
(http://developer.android.com/reference/android/graphics/PixelFormat.html#OPAQUE)
which is a kind of wildcard to indicate any surface with no alpha
channel…however how we should proceed to match this to a SDL format is
beyond me…as an OPAQUE surface seems to be RGB565 by default, but it may not
always be so…perhaps Tim Angus knows better (or perhaps we should just match
-1 to RGB565 and hope for the best).

Gabriel.On Lun 24 Oct 2011 16:06:58 akr escribi?: akr wrote:

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.

HTC Desire classic and Simulator 2.2.

Btw I updated my sources with the most current git. Didnt fix the problem.

gabomdq wrote:> On Lun 24 Oct 2011 16:06:58 akr escribi?: akr wrote:

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.

HTC Desire classic and Simulator 2.2.

Btw I updated my sources with the most current git. Didnt fix the problem.

Are you using the latest NDK and SDK?

The message comes from surfaceChanged in the SDLActivity.java file. The problem
is that this function gets a -1 as the surface pixel format. -1 as a pixel
format mean an OPAQUE surface
(http://developer.android.com/reference/android/graphics/PixelFormat.html#OPAQUE)
which is a kind of wildcard to indicate any surface with no alpha
channel…however how we should proceed to match this to a SDL format is
beyond me…as an OPAQUE surface seems to be RGB565 by default, but it may not
always be so…perhaps Tim Angus knows better (or perhaps we should just match
-1 to RGB565 and hope for the best).

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I updated to 2.3 and suddenly - the error message is gone. Thanks Gabriel and all the other people for the great help here!!!

andreas

akr wrote:

gabomdq wrote:

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.

HTC Desire classic and Simulator 2.2.

Btw I updated my sources with the most current git. Didnt fix the problem.

Are you using the latest NDK and SDK?

The message comes from surfaceChanged in the SDLActivity.java file. The problem
is that this function gets a -1 as the surface pixel format. -1 as a pixel
format mean an OPAQUE surface
(http://developer.android.com/reference/android/graphics/PixelFormat.html#OPAQUE)
which is a kind of wildcard to indicate any surface with no alpha
channel…however how we should proceed to match this to a SDL format is
beyond me…as an OPAQUE surface seems to be RGB565 by default, but it may not
always be so…perhaps Tim Angus knows better (or perhaps we should just match
-1 to RGB565 and hope for the best).

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I updated to 2.3 and suddenly - the error message is gone. Thanks Gabriel and all the other people for the great help here!!!

andreas

Suddenly the error message came back. I used the simulator instead of the device. 2.2, wvga800. Any ideas?> > On Lun 24 Oct 2011 16:06:58 akr escribi?: akr wrote:

akr wrote:

akr wrote:

gabomdq wrote:

Ryan C. Gordon wrote:

Thanks for your quick reply. I am using

Simulator, or a real device? (and if a real device: which one?).

–ryan.

HTC Desire classic and Simulator 2.2.

Btw I updated my sources with the most current git. Didnt fix the problem.

Are you using the latest NDK and SDK?

The message comes from surfaceChanged in the SDLActivity.java file. The problem
is that this function gets a -1 as the surface pixel format. -1 as a pixel
format mean an OPAQUE surface
(http://developer.android.com/reference/android/graphics/PixelFormat.html#OPAQUE)
which is a kind of wildcard to indicate any surface with no alpha
channel…however how we should proceed to match this to a SDL format is
beyond me…as an OPAQUE surface seems to be RGB565 by default, but it may not
always be so…perhaps Tim Angus knows better (or perhaps we should just match
-1 to RGB565 and hope for the best).

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I updated to 2.3 and suddenly - the error message is gone. Thanks Gabriel and all the other people for the great help here!!!

andreas

Suddenly the error message came back. I used the simulator instead of the device. 2.2, wvga800. Any ideas?

And again. Switching to 2.3.3 solves the problem. Gives: RGB_565. Strange…> > > On Lun 24 Oct 2011 16:06:58 akr escribi?: akr wrote: