Open GL Surface

Hey all,

I had a quick question about the GL display surface provided by SDL. I
know SDL is mostly disconnected from the display once it’s created, but
do the values in the ‘format’ member reflect the actual values of the GL
surface?

Specifically, with the mask, loss and shifts actually reflect the
channel bit sizes of the GL display?–
Jimmy <@Jimmy>
Jimmy’s World.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030403/cdde5ce1/attachment.pgp

Jimmy wrote:

Specifically, with the mask, loss and shifts actually reflect the
channel bit sizes of the GL display?

No, although they should be a best match. Query them again after
setting the video mode if you need to know exactly what you have.
Hardware can have funny limitations (not supporting stencil except at
24 bit color depth, not supporting 16 bit Z depth except at 16 bit
color depth, etc…).

Andy–
Andrew J. Ross Beyond the Ordinary Plausibility Productions
Sole Proprietor Beneath the Infinite Hillsboro, OR
Experience… the Plausible?

Ok, but if I’m reading you right, they WILL be accurate after the video
mode is set? This is actually all I’m really looking for, so I can find
out if the number of bits per channel is what I actually requested.On Thu, 2003-04-03 at 11:38, Andy Ross wrote:

Jimmy wrote:

Specifically, with the mask, loss and shifts actually reflect the
channel bit sizes of the GL display?

No, although they should be a best match. Query them again after
setting the video mode if you need to know exactly what you have.
Hardware can have funny limitations (not supporting stencil except at
24 bit color depth, not supporting 16 bit Z depth except at 16 bit
color depth, etc…).

Andy


Jimmy <@Jimmy>
Jimmy’s World.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030403/1add696f/attachment.pgp

Jimmy wrote:

Specifically, with the mask, loss and shifts actually reflect the
channel bit sizes of the GL display?

No, although they should be a best match. Query them again after
setting the video mode if you need to know exactly what you have.
Hardware can have funny limitations (not supporting stencil except
at 24 bit color depth, not supporting 16 bit Z depth except at 16
bit color depth, etc…).

Andy

Ok, but if I’m reading you right, they WILL be accurate after the
video mode is set? This is actually all I’m really looking for, so I
can find out if the number of bits per channel is what I actually
requested.

You need to query the OpenGL settings using SDL_GL_GetAttribute()
just like you set the requirements.

From the SDL doc:

SDL_GL_GetAttribute – Get the value of a special SDL/OpenGL attribute
Synopsis

#include “SDL.h”

int SDL_GL_GetAttribute(SDLGLattr attr, int *value);

Description

Places the value of the SDL/OpenGL attribute attr into value. This is
useful after a call to SDL_SetVideoMode to check whether your
attributes have been set as you expected.
Return Value

Returns 0 on success, or -1 on an error.On Thursday 03 April 2003 22:58, Jimmy wrote:

On Thu, 2003-04-03 at 11:38, Andy Ross wrote: