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. */
/* Render bump-mapped walls by shaders */
Do you have any ideas or hints? Please help me…
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:
Well I have no problem with GLSL.
But when I use MDL textures and GLSL textures at the same time, the former fails.
Is it possible to use both textures at the same time?
assuming your using multitexturing extension
Yep, I’m using multitexturing.
MDL textures would be mapped correctly when I turn off multitexturing.
So maybe that is the problem, but I don’t understand how to cook that off…
This is getting off topic… Are you setting the active texture back to GL_TEXTURE0 before binding your MDL’s texture?
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.