bladix
03-27-2004, 06:35 AM
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);
/* Render bump-mapped walls by shaders */
glUseProgramObjectARB(g_PrgObj);
glUniform1iARB(g_Loc_Texture0, g_BaseTex);
glUniform1iARB(g_Loc_Texture1, g_BumpTex);
DrawWalls();
glUseProgramObjectARB(NULL);
Do you have any ideas or hints? Please help me...
Thanks.
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);
/* Render bump-mapped walls by shaders */
glUseProgramObjectARB(g_PrgObj);
glUniform1iARB(g_Loc_Texture0, g_BaseTex);
glUniform1iARB(g_Loc_Texture1, g_BumpTex);
DrawWalls();
glUseProgramObjectARB(NULL);
Do you have any ideas or hints? Please help me...
Thanks.