Why?

Hello,
during the init I use:

( SDL_SetVideoMode( 700, 300, 16, SDL_OPENGLBLIT | SDL_RESIZABLE ) == NULL )

them I ask :
printf(“Screen BPP: %d\n”, SDL_GetVideoSurface()->format->BitsPerPixel);

and the anwser that Windows gives me is : BPP=32,
while I expect BPP=16 ?

Why,

simply Jocelyn.

“Bille2” wrote:

( SDL_SetVideoMode( 700, 300, 16, SDL_OPENGLBLIT | SDL_RESIZABLE ) == NULL )
[…]
and the anwser that Windows gives me is : BPP=32,
while I expect BPP=16 ?

Your OpenGL implementation must support the RGB565 texture format
(either if it has the packed pixel extension, or if it implements the
OpenGL 1.2 API) for OPENGLBLIT to use 16bpp

Short answer: It’s OpenGL.

Long answer: When you open up an OpenGL context, it comes up at the bit
depth of your screen, regardless of what you asked for. (The very notable
exception is 3dfx cards prior to Voodoo4, which don’t support 32bpp and
always come up as 16 fullscreen if you use a 32 bpp desktop.) So when you
ask for 16, you’re really asking for at least 16.

You can still read 16bpp pixel format from it if you need to, but be
forewarnded that this is probably not an accellerated path. You can also
upload 16bpp pixel format textures to it. This probably is accellerated,
and is what most OpenGL games do when you set them to use “16bpp” instead
of 32.

Hope that makes sense.On Thu, Aug 09, 2001 at 09:22:10PM +0200, Bille2 wrote:

during the init I use:

( SDL_SetVideoMode( 700, 300, 16, SDL_OPENGLBLIT | SDL_RESIZABLE ) == NULL )

them I ask :
printf(“Screen BPP: %d\n”, SDL_GetVideoSurface()->format->BitsPerPixel);

and the anwser that Windows gives me is : BPP=32,
while I expect BPP=16 ?

Why,


Joseph Carter Free software developer

be vewwy vewwy qwuiet … I’m huntin wuntime ewwos

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010809/a0aaf88b/attachment.pgp

I would prefered a complete 16 bpp gestion, as it would be faster for
non openGL graphic card

“Joseph Carter” a ?crit dans le message news:
mailman.997393504.32587.sdl at libsdl.org