Andreas,
Your conclusion is correct: GL_MAX_TEXTURE_UNITS reports the maximum number
of texture units you can access using FFP multitexturing.

Multipass rendering is an option if you don't want to use shaders.


Glenn Waldron / @glennwaldron


On Fri, Dec 27, 2013 at 4:37 AM, Andreas Ekstrand <
[email protected]> wrote:

>  Hi,
>
> I'm experiencing some problems with multi-texturing and the maximum
> texture units. The attached .osg file works fine on my old ATI HD5800
> (skymap.jpg on layer 0 and detail.jpg on layer 4) but the detail texture at
> layer 4 fails on a newer Geforce GTX580, it simply doesn't show.
>
> Checking the setting of _glMaxTextureUnits in
> State::initializeExtensionProcs, my old ATI card gives
> GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 32 which is used since the GL version
> is at least 2.0. And in Texture::Extensions::Extensions, _numTextureUnits
> is set to GL_MAX_TEXTURE_IMAGE_UNITS = 16. The newer Geforce card seems to
> use even better values, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 192 and
> GL_MAX_TEXTURE_IMAGE_UNITS = 32. So this all seems correct, even if these
> values don't seem to be used or printed anywhere (?).
>
> So my conclusion is that since I'm not using shaders, but old-fasioned
> fixed-funtion multi-texturing, the GL_MAX_TEXTURE_UNITS actually sets the
> limit anyway. In the attached example I could of course use layer 1 instead
> of layer 4, but this is only to illustrate a more general case where one
> would want to use 4 layers or more in total, simultaneously. Besides
> implementing all this with shaders (which I'd rather not do right now), is
> there any way of making it work on newer hardware with this low maximum
> number of texture units? Any compatibility mode or other tricks to bypass
> this limit?
>
> Regards,
> Andreas
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to