More 32bpp questions

Last month I wrote in with a few questions about regarding the details
of framebuffer bit depth and was subsequently enlightened on many
counts! However, there is an SDL behavior that seems quirky enough to
for me ask if it may be considered a bug:

In linux/x11 (but not in Windows on the same computer), if I request a
32bpp depth from SDL_SetVideoMode using OPENGL it fails with “Couldn’t
find matching GLX visual”. However, if I request 24 bits, it works
fine, but tells me it’s using 32 bits! Strange and confusing, no?

Hello All,

  How can I set up my icon for SDL main window to be in Windows
  TaskBar? Now I have window without any icon. :(

  Thank you!-- 

Best regards,
Alexander mailto:Editor at echo.ru

SDL_WM_SetIcon() should do it.On Tue, May 21, 2002 at 04:54:11PM +0100, Alexander Gayevoy wrote:

Hello All,
How can I set up my icon for SDL main window to be in Windows
TaskBar? Now I have window without any icon. :frowning:


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

Yes, and make sure you set the icon before you set the video mode.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment> On Tue, May 21, 2002 at 04:54:11PM +0100, Alexander Gayevoy wrote:

Hello All,
How can I set up my icon for SDL main window to be in Windows
TaskBar? Now I have window without any icon. :frowning:

SDL_WM_SetIcon() should do it.

On Tue, 21 May 2002 10:30:10 -0700, Sam Lantinga scribbled:>>On Tue, May 21, 2002 at 04:54:11PM +0100, Alexander Gayevoy wrote:

Hello All, How can I set up my icon for SDL main window to be in
Windows TaskBar? Now I have window without any icon. :frowning:

SDL_WM_SetIcon() should do it.

Yes, and make sure you set the icon before you set the video mode.

Well, under XP at least we seem to have a bit more problem than this.
The symptom I’m seeing under Windows XP is that the icon is correct
on the title bar and if you use alt-tab, but there is nothing on the
task bar (“start bar”) for the application, and if you minimize the
app there’s nothing to let you know it still exists unless you use
alt-tab.

I haven’t yet tested to see if this also occurs under other versions
of Windows.

Any help would be appreciated.

Here’s the code:

//---------
/* Initialize timer and video only – the rest of the subsystems
do their own thing. */
if((SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO |
SDL_INIT_NOPARACHUTE) == -1))
{
printf(“Could not initialize SDL: %s.\n”, SDL_GetError());
exit(1);
}

// set up the icon for windows
// ImgSurface is a C++ wrapper for SDL_Surface
ImgSurface icon("images/icon.png");	  
icon.setColorKey(255, 0, 255);
SDL_WM_SetIcon(icon.getSurface(), 0);

SDL_SetCursor(loadCursor());
SDL_WM_SetCaption("my title", "My title");

// video mode gets set here

//--------------------

Any advice?


Kent Quirk, CTO, CogniToy
@Kent_Quirk
http://www.cognitoy.com

Well, under XP at least we seem to have a bit more problem than this.
The symptom I’m seeing under Windows XP is that the icon is correct
on the title bar and if you use alt-tab, but there is nothing on the
task bar (“start bar”) for the application, and if you minimize the
app there’s nothing to let you know it still exists unless you use
alt-tab.

Can you put together a minimal complete example showing this problem?
It looks like you’re doing the right thing code-wise.

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hello All,
How can I set up my icon for SDL main window to be in Windows
TaskBar? Now I have window without any icon. :frowning:

SDL_WM_SetIcon() should do it.

Yes, and make sure you set the icon before you set the video mode.

Why?> > On Tue, May 21, 2002 at 04:54:11PM +0100, Alexander Gayevoy wrote:

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Some window managers on X11 don’t allow you to change the icon after
the window has been shown the first time.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment> > > On Tue, May 21, 2002 at 04:54:11PM +0100, Alexander Gayevoy wrote:

Hello All,
How can I set up my icon for SDL main window to be in Windows
TaskBar? Now I have window without any icon. :frowning:

SDL_WM_SetIcon() should do it.

Yes, and make sure you set the icon before you set the video mode.

Why?

Some targets may not allow you to change it later.On Tue, May 21, 2002 at 10:51:06PM -0300, Federico Berardi wrote:

SDL_WM_SetIcon() should do it.

Yes, and make sure you set the icon before you set the video mode.

Why?


Joseph Carter No conceit in my family

netgod: er, are these 2.2.0 packages 2.0.0pre9 or do you have a
direct line with the gods?
joeyh: i have the direct line

-------------- 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/20020521/7e432484/attachment.pgp

Hello Kent,

Tuesday, May 21, 2002, 23:21:37, you wrote:

KQ> // set up the icon for windows
KQ> // ImgSurface is a C++ wrapper for SDL_Surface
KQ> ImgSurface icon(“images/icon.png”);

Must the icon be 32x32 pixels?

KQ> icon.setColorKey(255, 0, 255);
KQ> SDL_WM_SetIcon(icon.getSurface(), 0);

BTW, does alpha ColorKey work only on 32bpp surface?–
Best regards,
Alexander mailto:Editor at echo.ru