[osg-users] Simple question: How to set the icon that will be used when a viewer is realized?

Guy guy at dvp.co.il
Wed Mar 11 03:15:56 PDT 2009

It should be string or handle.

And you don't have to check all by yourself. I'm sure there are experts here on each platform that can find in seconds how to set their windows icons.

For example, I think in X11 it should be

XSetIconName(display, w, icon_name)
      Display *display;
      Window w;
      char *icon_name;

I'm not sure since I never programmed X11.


2009/3/11 Guy <guy at dvp.co.il>:
> Robert,
>  I'm probably stating the obvious, but besides Matt changes I guess icon loading implementation for each of the platforms except windows will be required too.

Yes it will, but the first step is to get an interface defined, then
implementations can follow after.

It's a while since I tried to set the icon on a window on any platform
so I'll have to do trawling the web to spot how to do it under X11, it
shouldn't be too difficult though.  The only awkward part might be the
definition of the icon, a path string is obviously portable, but it
might be that this won't map directly to how various OS's handle it.
I'm open to suggestions on how best to get different platforms
working. Ideally we'd have one standard way for all platforms.

osg-users mailing list
osg-users at lists.openscenegraph.org

More information about the osg-users mailing list