To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.macOpen lugnet.cad.dev.mac in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Macintosh / 69
68  |  70
Subject: 
Re: glut conundrum
Newsgroups: 
lugnet.cad.dev.mac
Date: 
Mon, 18 Feb 2002 01:38:23 GMT
Viewed: 
1724 times
  
In lugnet.cad.dev.mac, Ray Sanders writes:
In lugnet.cad.dev.mac, Don Heyse writes:
That may be a very old bug.  I remember there was a problem with the
background color way back when.  You can check the logs or browse the
current (and old) source at the sourceforge to compare.

Indeed, it is a very old bug, and it appears that someone ran into this more
recently based on the following comment in the 0.9.5 code ...

// NOTE:  I dont understand the colortable stack used in translate_color()
// so use the default color_table to avoid bad colors (bad stack ptr?).

So someone else saw a different symptom of the same issue

That would be me.  Anywhere you see "NOTE" its probably a note to
myself that I want to get back to something and do it right when
I have more time.  I don't always get around to revisiting things
though, especially if the cheap fix works well enough...

What appears to be happening (in 0.5) is that the function 'translate_color' >is called from 'colormenu' and it wants zcolor_table to be valid. But, at
the conclusion of the previous rendering, znamelist_stack_index is
decremented and the associated color table is freed, so what
'translate_color' sees in memory is detritus left over from the
previous allocation. It just so happens, that on the
Mac runtime, that detritus is intact other than the entry for black. >Immediately after 'colormenu' changes the background color, a new
rendering is invoked, which reallocates the color table stack and
everything in the rendering looks cool. So the error is transient
during the instance that 'colormenu' is calling 'translate_color'.

So I guess if someone changes the color table with the 0 COLOR command
they won't get the new background color with my cheap fix.  I'm still OK
with this, I think.  But if you've got a better solution, I'd be happy
to fix it the right way.

Don



Message is in Reply To:
  Re: glut conundrum
 
(...) Indeed, it is a very old bug, and it appears that someone ran into this more recently based on the following comment in the 0.9.5 code ... // NOTE: I dont understand the colortable stack used in translate_color() // so use the default (...) (23 years ago, 17-Feb-02, to lugnet.cad.dev.mac)

6 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR