[osg-users] ShadowMap problem...
Jean-Sébastien Guay
jean-sebastien.guay at cm-labs.com
Wed Nov 11 08:26:39 PST 2009
Hi Wyatt,
> 1. Is there a way I can query the number of texture units available on my
> GPU via an OSG call?
A Google search turned up glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB). Also
searching the OSG headers, I found
osg::Texture::Extensions::numTextureUnits() which returns a GLint (int).
Look at the source to find out where the value will be initialized or
how to initialize it yourself.
I generally don't bother to query and use 8 (0-7) as a number that's
supported pretty much everywhere.
> 2. Is there a list, other than the osgShadow programming guide of shadowmap
> techniques, specifically ViewDependentShadow techniques?
The source/headers... And the mailing list archives.
The three usable types are:
class LightSpacePerspectiveShadowMapDB /*...*/ {};
class LightSpacePerspectiveShadowMapCB /*...*/ {};
class LightSpacePerspectiveShadowMapVB /*...*/ {};
And LightSpacePerspectiveShadowMap is an alias for
LightSpacePerspectiveShadowMapDB :
typedef LightSpacePerspectiveShadowMapDB LightSpacePerspectiveShadowMap;
And also StandardShadowMap is usable, but it's not view-dependent, so
it's pretty much a direct replacement for osgShadow::ShadowMap but in
the same class hierarchy as the LightSpace* classes.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
More information about the osg-users
mailing list