PDA

View Full Version : blending problem



mithun_daa
06-14-2004, 08:37 PM
i am dynamically generating a few polygons, changing my 3d perspective proj. to 2d ortho, coloring each polygon with the required color. the colors are being assigned right, but the only colors i can c r the first and the last one among 10 different colors. i then take a snapshot by reading the buffer and changing the projection back to 3d, and draping the snapshot as texture. my polygons get colored only in 2 colors. i tried different blending functions, though glblendfunc 1,0 sounds right. i tried disabling my lighting, but in vain. i think its a blending problem, but i could be overlookin something.
any help would be appreciated
thank u

*** my polygons are overlapping and i dont want any transparency

-NiCo-
06-15-2004, 12:12 AM
Did you add the following line of code?

glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_RE PLACE)

It is initially set to GL_MODULATE which doesn't give you the result you're looking for, unless you've set your color to {1.0,1.0,1.0,1.0}

Greetz,
Nico

mithun_daa
06-15-2004, 05:21 AM
i tried settin the environment , but it didnt help.

06-15-2004, 05:29 AM
the colors are being assigned right, but the only colors i can c r the first and the last one among 10 different colors.i can't get my head around that. you see the first and last of 10 different colors? could you clarify your problem a little?

maybe i'm just thick this morning...

mithun_daa
06-15-2004, 06:03 AM
Originally posted by <Q>:

the colors are being assigned right, but the only colors i can c r the first and the last one among 10 different colors.i can't get my head around that. you see the first and last of 10 different colors? could you clarify your problem a little?

maybe i'm just thick this morning...maybe this will help. web page (http://www.geocities.com/mithunp4u/)
i get only the red in the center and yellow in the remaining places.