Hi All,
does anyone know how to add chrome/metalic look to a primitive? Some sourcecode would help a lot ;-)
Thanx,
Daniel
Hi All,
does anyone know how to add chrome/metalic look to a primitive? Some sourcecode would help a lot ;-)
Thanx,
Daniel
a way to achieve this is to make a second rendering pass.
in the first, you draw your object.
in the second you blend the chroming.
your object must have normals (or something resembling)
try this:
this should work.Code :glDepthFunc(GL_LEQUAL); glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); <render object> glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_ONE,GL_ONE); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP); glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP); glBindTexture(GL_TEXTURE_2D,texid_chrome); <render object>
Dolo/\/\ightY
Dolo/\/\ightY
Thank you,
Daniel.