hi, if anyone can help it will be a major thing... ive been stuck most of the day on this problem, im using DevIL to load textures.
cTexture::cTexture(std::string nFilename, int nFlags)
{
tBlend = 2;
tScaleU = 1.0f; tScaleV = 1.0f;
ilInit();
iluInit();
ilutRenderer(ILUT_OPENGL);
ilutInit();
tTextureHandle = ilutGLLoadImage((char*)nFilename.c_str());
}
i dont get any errors, but when i try and render my objects with texture, there is no texture at all.
using gDebugger and forcing textures to 2x2 shows a black "mess" on the object that should be textured... im at a loss.
any help would be amazing.
im drawing with glDrawElements using vertex,normal,color and texture pointers, and my textures are setup
glActiveTextureARB(GL_TEXTURE0 + nIndex);
glClientActiveTextureARB(GL_TEXTURE0 + nIndex);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, tBrush.GetTexture(nIndex));
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);