Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Promit

I really don't get GL multitexturing

This topic is 5374 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I understand multitexturing itself, a la Direct3D. The problem is, in OpenGL, I see none of the structure that is there with Direct3D. I don''t presume to say it''s not there--I just don''t get how to take advantage of it. In D3D (forgive me for mentioning it so often it''s just the only solid understanding I have) you set arguments for each stage and then what op to do between them. This makes sense to me. In GL, I see that there are lots of textures: GL_TEXTURE*_ARB. I can bind these to various textures, and for each of those I can set an Env mode. There are only 3 Env modes though: GL_DECAL, GL_REPLACE, and GL_MODULATE. Modulate is what I''ve been using for lightmapping. But I don''t see all of those various ops that D3D sports. Am I missing something here? Surely the texture combinations can''t be that simplistic? Also, how do I know how mnay textures I can actually bind stuff to and use? Suppose I want to keep to 1 pass rendering, and I don''t want GL to go to some emulation because I''ve bound too many textures. How can I detect the number of available textures at runtime?

Share this post


Link to post
Share on other sites
Advertisement
Lookup the GL_ARB_texture_env_combine extension. Probably all the multitexturing functionality that you''ve come to know and love in DirectX is in there and in related extensions, such as GL_ARB_texture_env_crossbar and GL_ARB_texture_env_dot3. They''re all in the OpenGL Extension Registry:

http://oss.sgi.com/projects/ogl-sample/registry/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!