Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Altering color

0 views
Skip to first unread message

WTees

unread,
Nov 10, 2009, 1:12:44 PM11/10/09
to
Hi everyone,

How do I prevent if I altering an objectcolor, the textcolor is altering
too.

Thanks in advanced

Andy V

unread,
Nov 10, 2009, 9:57:47 PM11/10/09
to

Can you put your question into OpenGL calls and their undesired
effects?

My guess is that you are using bitmap text and are not explicitly
setting the color (glColor) before setting the raster position and
associated data (glRasterPos). Perhaps you are setting the color
*after* calling glRasterPos.

--
Andy V

John Tsiombikas

unread,
Nov 10, 2009, 9:58:56 PM11/10/09
to
On 2009-11-10, WTees <w.vante...@casema.nl> wrote:
> Hi everyone,
>
> How do I prevent if I altering an objectcolor, the textcolor is altering
> too.

State creep? Just make sure you explicitly set the color of the text
before drawing it. Then it won't be affected by the color of what was
rendered previously.

Also, take a look at glPushAttrib/glPopAttrib.

--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/

fungus

unread,
Nov 11, 2009, 12:25:26 AM11/11/09
to
On Nov 10, 7:12 pm, "WTees" <w.vanteesel...@casema.nl> wrote:
> Hi everyone,
>
> How do I prevent if I altering an objectcolor, the textcolor is altering
> too.
>

Set the color of your text every time.

nb. Because of the way OpenGL works you have to call
glColor() before you call glRasterPos().

0 new messages