Disable envMap effect while blending
by Fyodor -bank- Osokin · in Torque Game Engine · 05/12/2007 (11:57 am) · 2 replies
Hi.
I've managed to draw dynamically generated texture over the "base" skin on DTS object, but can't make it apply "as needed".
It draws texture over the base, but I can't find out how to disable "envMapping effect" on it.
I'm doing it in TSMesh::setMaterial():
Here is the result of what I see in game:

I'm not fully understand rendering stuff there, sorry. What I do wrong? Any hints?
I've managed to draw dynamically generated texture over the "base" skin on DTS object, but can't make it apply "as needed".
It draws texture over the base, but I can't find out how to disable "envMapping effect" on it.
I'm doing it in TSMesh::setMaterial():
if (needSkinMod)
{
PROFILE_SCOPE(TSMeshSetMaterial___SkinMod);
glActiveTextureARB(GL_TEXTURE0_ARB + TSShapeInstance::smRenderData.baseTE + 1 );
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_ADD);
glBindTexture(GL_TEXTURE_2D, th.getGLName());
// set default texture unit...
glActiveTextureARB(GL_TEXTURE0_ARB + TSShapeInstance::smRenderData.baseTE);
}This code I've placed right before " // emap texture...".Here is the result of what I see in game:

I'm not fully understand rendering stuff there, sorry. What I do wrong? Any hints?
About the author
Game developer.
Associate Fyodor -bank- Osokin
Dedicated Logic