🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1349

Re: Can I get more than 256 colors with InterViews?

#1349
From: njs
Date: Wed, 16 Dec 1992 10:08
26 lines
1962 bytes
In article <edh.723936953@staff.tc.umn.edu>, edh@staff.tc.umn.edu (Eric D. Hendrickson) writes:
|> I have a procedure for dynamically creating a Color * from a set of RGB
|> values.  On Suns, I keep running out of colors.  I have tried to display it
|> on an SGI, but it doesn't get any more colors.  I am not physically running
|> the program on either the Sun or the SGI, but on a faster MIPS machine.
|> 
|> I can't run the program on the SGI directly as there is no g++ compiler,
|> but my understanding is that only the display matters as far as color
|> allocation goes.
|> 
|> I'm using InterViews 2.6 and g++ 2.3.1.
|> 
|> Thanks!
|> 		--eric
|> -- 
|> 			   "'Wit smoke and fire and fumes an' what-not comin'
|> 			    outta dere nostrils... dey rep'esent youah
|> 			    virility... Likewise wit' d'enormous bulge in
|> 			    y'pants here."

What you could do here is create a colour catalog.  Wach time you want a color ask your catalog to give it to you.  The catalog can maintain a list of colors that it has already created and if a color that has already been created is requested then that colour can be passed back.  If the color does not exist then it can be created, added to the list and then passed back.

This would avoid the need to create duplicate colors.  You would probably need to add some persistence to your colour objects to avoid problems caused by an object deleting a colour that another object is still using.

Nathan
Technical Details
Message-ID: <1992Dec16.100848.19070@planet.bt.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!doc.ic.ac.uk!uknet!axion!planet.bt.co.uk!njs
References: <edh.723936953@staff.tc.umn.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!doc.ic.ac.uk!uknet!axion!planet.bt.co.uk!njs
From: njs@planet.bt.co.uk
Newsgroups: comp.windows.interviews
Subject: Re: Can I get more than 256 colors with InterViews?
Keywords: RGB->Color
Message-ID: <1992Dec16.100848.19070@planet.bt.co.uk>
Date: 16 Dec 92 10:08:48 GMT
References: <edh.723936953@staff.tc.umn.edu>
Sender: news@planet.bt.co.uk
Organization: DNM42, BT Labs, Martlesham Heath, Ipswich, UK.
Lines: 26
Originator: njs@andromeda