Jump to content
  • Advertisement
Sign in to follow this  
emmai

OpenGL OpenGL tell me my Video Card has 4 texture-units,but...

This topic is 4856 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

OPENGL:glGet(GL_MAX_TEXTURE_UINT) returns 4 D3D:GetDeviceCaps,caps.dwMaxBlendStages == 8 which is correct? my terrain program(4 texture layers,3 alpha maps between them) is now do single-pass rendering in D3D,and multi-pass in OpenGL.and I want to do single-pass in OpenGL. the fact that I can do 7layer multitexturing in D3D means my card do support 8 texture blend stages. but OpenGL tell me the max-texture-units is 4,so can I do single-pass rendering with OpenGL?

Share this post


Link to post
Share on other sites
Advertisement
I'm guessing you've got an NV card?

In OpenGL NV only expose 4 texture units via the fixed function pipeline, to use more you'll have to use a fragment shader

Share this post


Link to post
Share on other sites
You can use Cg, Vertex/Fragment programs or GLSL to access 16 texture units. ATI has 8 texture units in the FFP.

Share this post


Link to post
Share on other sites
Quote:
Original post by Code-R
weird. why does NV do that?

Because a texture image unit (ie. that which lets you sample from a texture, including any filtering done) is seperate from a texture coord unit (which includes a set of texture coords, behaviour for wrapping/clamping and texture coord generation). A matching pair of these makes up a complete fixed function texture unit.

Obviously these all take up space on the chip. nVidia obviously thinks that it's chip real estate is better spent on extra texture samplers at the expense of texture coord sets (and they've got a point - most fragment programs typically use the same set of texture coords for multiple textures, such as colour+normalmap+specularmap).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!