The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
Any ideas? On Android 2.3 it works. This happens at the initial SDL init.

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


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
On Lun 24 Oct 2011 14:29:00 akr escribió:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
gabomdq wrote:
On Lun 24 Oct 2011 14:29:00 akr escribió:
Quote:
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

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.
Android 2.2 SDL Init: "Pixel format unknown -1"
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
On Lun 24 Oct 2011 15:19:35 akr escribió:
Quote:
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.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Android 2.2 SDL Init: "Pixel format unknown -1"
Ryan C. Gordon
Guest

Quote:
Thanks for your quick reply. I am using

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

--ryan.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
Ryan C. Gordon wrote:
Quote:
Thanks for your quick reply. I am using

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

--ryan.

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


It happens on both - HTC Desire and Simulator
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
akr wrote:
Ryan C. Gordon wrote:
Quote:
Thanks for your quick reply. I am using

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

--ryan.

_______________________________________________
SDL mailing list

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.
Android 2.2 SDL Init: "Pixel format unknown -1"
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
On Lun 24 Oct 2011 16:06:58 akr escribió:
Quote:
akr wrote:
Quote:
Ryan C. Gordon wrote:
Quote:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
gabomdq wrote:
On Lun 24 Oct 2011 16:06:58 akr escribió:
Quote:
akr wrote:
Quote:
Ryan C. Gordon wrote:
Quote:
Quote:
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

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
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
akr wrote:
gabomdq wrote:
On Lun 24 Oct 2011 16:06:58 akr escribió:
Quote:
akr wrote:
Quote:
Ryan C. Gordon wrote:
Quote:
Quote:
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

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?
Re: Android 2.2 SDL Init: "Pixel format unknown -1"
akr


Joined: 20 Jun 2010
Posts: 29
akr wrote:
akr wrote:
gabomdq wrote:
On Lun 24 Oct 2011 16:06:58 akr escribió:
Quote:
akr wrote:
Quote:
Ryan C. Gordon wrote:
Quote:
Quote:
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

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......