Well I’m now working with MDL (Half-Life Model) in GLSL programs,
but I’m perplexed as to why the texture of MDL doesn’t be mapped.
Here’re some codes…
/* Render MDL by using the fixed pipelines. */
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_TEXTURE_2D);
DrawMDL();
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHT0);
glDisable(GL_LIGHTING);
You don’t pass a texture object to glUniform1iARB when setting samplers, you pass in an integer that specifies which texture unit you want that sampler to fetch from.
So assuming you bound g_BaseTex to texture unit 0, and g_BumpTex to texture unit 1, you would do this: