* RE: Any tips for using GLUT
@ 1999-10-14 13:46 Champigny, Michael
0 siblings, 0 replies; 9+ messages in thread
From: Champigny, Michael @ 1999-10-14 13:46 UTC (permalink / raw)
To: 'axp-list@redhat.com'
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
^ permalink raw reply [flat|nested] 9+ messages in thread* RE: Any tips for using GLUT
@ 1999-10-13 21:34 Champigny, Michael
0 siblings, 0 replies; 9+ messages in thread
From: Champigny, Michael @ 1999-10-13 21:34 UTC (permalink / raw)
To: 'axp-list@redhat.com'
> What the code is telling you is that you need more Bits Per Pixel.
> If you're running 8 bit, try 16 bit. If you're already at 16 bit,
> try 24 or 32 bit if you have the card memory to support it and you
> defined it in your XF86Config file.
> This isn't Alpha specific, it's an X thing.
No, that wasn't the problem. OpenGL handles the visual automatically.
I don't think most implementations allocate a private colormap. In
particular, I don't think Mesa does unless you specify it specifically.
The problem was related to something else which eludes me at the moment.
If I think of it, I will post my workaround.
>
> 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??
>
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Any tips for using GLUT
@ 1999-10-13 20:23 Champigny, Michael
1999-10-13 21:12 ` Wes Bauske
1999-10-13 22:26 ` Blake L. Carlson
0 siblings, 2 replies; 9+ messages in thread
From: Champigny, Michael @ 1999-10-13 20:23 UTC (permalink / raw)
To: 'axp-list@redhat.com'
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Any tips for using GLUT
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 22:26 ` Blake L. Carlson
1 sibling, 1 reply; 9+ messages in thread
From: Wes Bauske @ 1999-10-13 21:12 UTC (permalink / raw)
To: axp-list
"Champigny, Michael" 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.
>
What the code is telling you is that you need more Bits Per Pixel.
If you're running 8 bit, try 16 bit. If you're already at 16 bit,
try 24 or 32 bit if you have the card memory to support it and you
defined it in your XF86Config file.
This isn't Alpha specific, it's an X thing.
>
> 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??
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Any tips for using GLUT
1999-10-13 21:12 ` Wes Bauske
@ 1999-10-13 21:37 ` Blake L. Carlson
1999-10-13 23:08 ` Wes Bauske
0 siblings, 1 reply; 9+ messages in thread
From: Blake L. Carlson @ 1999-10-13 21:37 UTC (permalink / raw)
To: axp-list
I've been playing with the Mesa demos and they seem to be working okay.
I tried going to 32 bit display depth and that didn't change anything.
24-bit crashed my graphics adapter.
Here's the error -
GLUT: Fatal Error in (unamed): visual with necessary capabilities not
found.
What if my program is trying to use double-buffered display for images?
I think I may be requesting a quality of service from Mesa/graphics
system (??) which isn't supported. I'll try removing the double
buffering. If that's not it, it's gotta be the colormap.
- Blake
wsb@paralleldata.com wrote:
>
> "Champigny, Michael" 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.
> >
>
> What the code is telling you is that you need more Bits Per Pixel.
> If you're running 8 bit, try 16 bit. If you're already at 16 bit,
> try 24 or 32 bit if you have the card memory to support it and you
> defined it in your XF86Config file.
>
> This isn't Alpha specific, it's an X thing.
>
> >
> > 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??
> >
>
> --
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Any tips for using GLUT
1999-10-13 21:37 ` Blake L. Carlson
@ 1999-10-13 23:08 ` Wes Bauske
1999-10-13 23:46 ` Blake L. Carlson
0 siblings, 1 reply; 9+ messages in thread
From: Wes Bauske @ 1999-10-13 23:08 UTC (permalink / raw)
To: axp-list
"Blake L. Carlson" wrote:
>
> I've been playing with the Mesa demos and they seem to be working okay.
> I tried going to 32 bit display depth and that didn't change anything.
> 24-bit crashed my graphics adapter.
>
I looked at the GLUT spec and it also supports indexed color,
which would be your normal 8 bit display. Possibly your
using 16/32 which uses the TrueColor visual in X and you told
it you want indexed color, which is 8 bit. At one point I
messed with this because I looked at porting my own 8 bit indexed
colormap X code to true color and didn't find a simple way to
get it working. Each screen has a list of visuals it supports
and you can retrieve that list using an X call. I did see that
in 16/24/32 bit modes, there was no 8 bit visual available to
use that I could find. That was the trick I had planned on trying
with my code. If anyone knows how to do this, please let me know.
> Here's the error -
> GLUT: Fatal Error in (unamed): visual with necessary capabilities not
> found.
>
> What if my program is trying to use double-buffered display for images?
> I think I may be requesting a quality of service from Mesa/graphics
> system (??) which isn't supported. I'll try removing the double
> buffering. If that's not it, it's gotta be the colormap.
>
Since Mesa is in SW, it probably isn't using HW mode double
buffering (a guess).
Wes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Any tips for using GLUT
1999-10-13 23:08 ` Wes Bauske
@ 1999-10-13 23:46 ` Blake L. Carlson
0 siblings, 0 replies; 9+ messages in thread
From: Blake L. Carlson @ 1999-10-13 23:46 UTC (permalink / raw)
To: axp-list
Wes -
That's the problem. I switched into 8-bit depth and got the GLUT_INDEX
stuff to work no sweat. Same fix also works for NT (switch to 255
colors). Now, we need a work-around so INDEX mode will still work in
16/24/32 bit modes.
It seems that this problem must plague all flavors of Linux and Win
people. Hmmmm... I'll hunt for a fix.
Thanks everyone for your help! Sorry if this thread was off topic for
the list.
- Blake
wsb@paralleldata.com wrote:
>
> "Blake L. Carlson" wrote:
> >
> > I've been playing with the Mesa demos and they seem to be working okay.
> > I tried going to 32 bit display depth and that didn't change anything.
> > 24-bit crashed my graphics adapter.
> >
>
> I looked at the GLUT spec and it also supports indexed color,
> which would be your normal 8 bit display. Possibly your
> using 16/32 which uses the TrueColor visual in X and you told
> it you want indexed color, which is 8 bit. At one point I
> messed with this because I looked at porting my own 8 bit indexed
> colormap X code to true color and didn't find a simple way to
> get it working. Each screen has a list of visuals it supports
> and you can retrieve that list using an X call. I did see that
> in 16/24/32 bit modes, there was no 8 bit visual available to
> use that I could find. That was the trick I had planned on trying
> with my code. If anyone knows how to do this, please let me know.
>
> > Here's the error -
> > GLUT: Fatal Error in (unamed): visual with necessary capabilities not
> > found.
> >
> > What if my program is trying to use double-buffered display for images?
> > I think I may be requesting a quality of service from Mesa/graphics
> > system (??) which isn't supported. I'll try removing the double
> > buffering. If that's not it, it's gotta be the colormap.
> >
>
> Since Mesa is in SW, it probably isn't using HW mode double
> buffering (a guess).
>
> Wes
>
> --
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Any tips for using GLUT
1999-10-13 20:23 Champigny, Michael
1999-10-13 21:12 ` Wes Bauske
@ 1999-10-13 22:26 ` Blake L. Carlson
1 sibling, 0 replies; 9+ messages in thread
From: Blake L. Carlson @ 1999-10-13 22:26 UTC (permalink / raw)
To: Michael.Champigny; +Cc: axp-list
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Any tips for using GLUT
@ 1999-10-13 19:30 Blake Carlson
0 siblings, 0 replies; 9+ messages in thread
From: Blake Carlson @ 1999-10-13 19:30 UTC (permalink / raw)
To: axp-list
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1999-10-14 13:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-14 13:46 Any tips for using GLUT Champigny, Michael
-- strict thread matches above, loose matches on Subject: below --
1999-10-13 21:34 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox