From: "Champigny, Michael" <Michael.Champigny@compaq.com>
To: "'axp-list@redhat.com'" <axp-list@redhat.com>
Subject: RE: Any tips for using GLUT
Date: Thu, 14 Oct 1999 09:46:13 -0400 [thread overview]
Message-ID: <11EB515FBDB3D111BF270000F84A9ED60436C8A9@shrexc1.shr.dec.com> (raw)
Blake,
Unfortunately, most X servers don't support INDEX mode in
bit depths over 8. When you think about it, you'd need
a color LUT of 2^16 entries for a 16-bit indexed visual.
You wouldn't have the memory to contain that many cells!
For that reason, larger bit depths use a different visual.
For a 16-bit visual, usually the first 5 bits is the red
component, 6 bits for green, and the last 5 for blue. You
get this in GLUT via GLUT_RBG.
This is an X server limitation. Some X servers allow overlays
so that you can overlay an 8-bit window over a 16-bit display.
I'm afraid you'll have to port your INDEX mode app to RGB mode.
This is why the OpenGL handbook recommends never using INDEX
mode in the first place.
I hope that helps,
Michael
-----Original Message-----
From: Blake L. Carlson [mailto:blake-carlson@uiowa.edu]
Sent: Wednesday, October 13, 1999 6:27 PM
To: Champigny, Michael
Subject: Re: Any tips for using GLUT
Michael -
I've tracked down the bug to this GLUT init command:
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
It seems that indexed mode is not working on my system. I know that this
initialization command does work:
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
(See /usr/lib/Mesa-3.0/demos/drawpix.c if you have the Mesa demos
installed)
We really need the GLUT_INDEX mode, otherwise I'm going to have to do a
major overhaul in some of our SGI libraries to port to alpha.
Does this stir up any memories???
- Blake
Michael.Champigny@compaq.com wrote:
>
> I've seen this "bug" appear on Tru64 UNIX so it's not Linux
> specific. It usually happens when the colormap is being maxed
> out. I don't remember how I fixed it...sorry I can't be more
> specific, but at least you know your not alone. :-) By the
> way, it also happens on NT but the colormap there seems to
> go further.
>
> /Michael
>
> -----Original Message-----
> From: Blake Carlson [mailto:blake-carlson@uiowa.edu]
> Sent: Wednesday, October 13, 1999 3:30 PM
> To: axp-list@redhat.com
> Subject: Any tips for using GLUT
>
> Hello again -
>
> While I have your attention, I'll ask if anyone has had any trouble
> getting GLUT to work. I have a program that uses GLUT and works great
> on the SGI's. Everything compiles okay on the alphalinux machine, but
> when I execute the program GLUT complains that the visual class is not
> sufficient (or some error similar). Do I need to tweak X in some way to
> get this to work??
>
> (I don't know if this question is alphalinux or just plain linux
> specific???)
>
> Thanks -
>
> Blake
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next reply other threads:[~1999-10-14 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-14 13:46 Champigny, Michael [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-10-13 21:34 Any tips for using GLUT Champigny, Michael
1999-10-13 20:23 Champigny, Michael
1999-10-13 21:12 ` Wes Bauske
1999-10-13 21:37 ` Blake L. Carlson
1999-10-13 23:08 ` Wes Bauske
1999-10-13 23:46 ` Blake L. Carlson
1999-10-13 22:26 ` Blake L. Carlson
1999-10-13 19:30 Blake Carlson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox