Joho,

found a funny bug while trying to set texture coordinates of 4 elements.

 

If you have:

osg::GeoTexCoords4fPtr coord; 

 

The 2 Commands do not the same!

coord->setValue(osg::Vec4f(x,y,z,w), 0); // only sets X & Y!

coord->getFieldPtr()->setValue(osg::Vec4f(x,y,z,w), 0); // sets X, Y, Z, W

 

 

 

Bug is:

GeoPropertyDesc::GenericType =
GeoTexCoordsPropertyDesc::InheritedDesc::GenericType =
GeoTexCoordsPropertyDesc::GenericType = Vec2f;

 

So you get an vec4 to vec2 conversion if you use:

GeoProperty<GeoTexCoords4fPropertyDesc>::setValue(const StoredGenericType
&val, const UInt32 index);

 

Mfg

Timm

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to