Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 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
* 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