Updated wrappers
This commit is contained in:
@@ -419,6 +419,16 @@ osg::Group* create3DText(const osg::Vec3& center,float radius)
|
||||
text4->setText("SCREEN");
|
||||
geode->addDrawable(text4);
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Added to show osgText state set malfunction
|
||||
osg::StateSet *textStateSet = new osg::StateSet();
|
||||
textStateSet->setMode(GL_BLEND, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
|
||||
textStateSet->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
|
||||
// This works:
|
||||
//geode->setStateSet(textStateSet);
|
||||
// This doesn't work:
|
||||
text4->setStateSet(textStateSet);
|
||||
|
||||
osg::ShapeDrawable* shape = new osg::ShapeDrawable(new osg::Sphere(center,characterSize*0.2f));
|
||||
shape->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::ON);
|
||||
geode->addDrawable(shape);
|
||||
|
||||
@@ -84,6 +84,8 @@ BEGIN_VALUE_REFLECTOR(osg::Matrixd)
|
||||
I_Method1(osg::Vec4d, preMult, IN, const osg::Vec4d &, v);
|
||||
I_Method1(osg::Vec4f, postMult, IN, const osg::Vec4f &, v);
|
||||
I_Method1(osg::Vec4d, postMult, IN, const osg::Vec4d &, v);
|
||||
I_Method1(void, set, IN, const osg::Quat &, q);
|
||||
I_Method1(void, get, IN, osg::Quat &, q);
|
||||
I_Method1(void, setRotate, IN, const osg::Quat &, q);
|
||||
I_Method0(osg::Quat, getRotate);
|
||||
I_Method3(void, setTrans, IN, osg::Matrixd::value_type, tx, IN, osg::Matrixd::value_type, ty, IN, osg::Matrixd::value_type, tz);
|
||||
|
||||
@@ -84,6 +84,8 @@ BEGIN_VALUE_REFLECTOR(osg::Matrixf)
|
||||
I_Method1(osg::Vec4d, preMult, IN, const osg::Vec4d &, v);
|
||||
I_Method1(osg::Vec4f, postMult, IN, const osg::Vec4f &, v);
|
||||
I_Method1(osg::Vec4d, postMult, IN, const osg::Vec4d &, v);
|
||||
I_Method1(void, set, IN, const osg::Quat &, q);
|
||||
I_Method1(void, get, IN, osg::Quat &, q);
|
||||
I_Method1(void, setRotate, IN, const osg::Quat &, q);
|
||||
I_Method0(osg::Quat, getRotate);
|
||||
I_Method3(void, setTrans, IN, osg::Matrixf::value_type, tx, IN, osg::Matrixf::value_type, ty, IN, osg::Matrixf::value_type, tz);
|
||||
|
||||
@@ -409,6 +409,7 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::DataSet::SourceData)
|
||||
I_Method1(void, readImage, IN, osgTerrain::DataSet::DestinationData &, destination);
|
||||
I_Method1(void, readHeightField, IN, osgTerrain::DataSet::DestinationData &, destination);
|
||||
I_Method1(void, readModels, IN, osgTerrain::DataSet::DestinationData &, destination);
|
||||
I_Method3(float, getInterpolatedValue, IN, GDALRasterBand *, band, IN, double, x, IN, double, y);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osgTerrain::DataSet::SpatialProperties)
|
||||
|
||||
@@ -100,8 +100,6 @@ BEGIN_OBJECT_REFLECTOR(osgText::Font::Glyph)
|
||||
I_Method1(void, setTexture, IN, osgText::Font::GlyphTexture *, texture);
|
||||
I_Method0(osgText::Font::GlyphTexture *, getTexture);
|
||||
I_Method0(const osgText::Font::GlyphTexture *, getTexture);
|
||||
I_Method0(osg::StateSet *, getStateSet);
|
||||
I_Method0(const osg::StateSet *, getStateSet);
|
||||
I_Method2(void, setTexturePosition, IN, int, posX, IN, int, posY);
|
||||
I_Method0(int, getTexturePositionX);
|
||||
I_Method0(int, getTexturePositionY);
|
||||
@@ -116,7 +114,6 @@ BEGIN_OBJECT_REFLECTOR(osgText::Font::Glyph)
|
||||
I_Property(const osg::Vec2 &, HorizontalBearing);
|
||||
I_Property(const osg::Vec2 &, MaxTexCoord);
|
||||
I_Property(const osg::Vec2 &, MinTexCoord);
|
||||
I_ReadOnlyProperty(osg::StateSet *, StateSet);
|
||||
I_Property(osgText::Font::GlyphTexture *, Texture);
|
||||
I_ReadOnlyProperty(int, TexturePositionX);
|
||||
I_ReadOnlyProperty(int, TexturePositionY);
|
||||
@@ -129,16 +126,12 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgText::Font::GlyphTexture)
|
||||
I_Constructor0();
|
||||
I_Method0(const char *, className);
|
||||
I_Method1(int, compare, IN, const osg::StateAttribute &, rhs);
|
||||
I_Method1(void, setStateSet, IN, osg::StateSet *, stateset);
|
||||
I_Method0(osg::StateSet *, getStateSet);
|
||||
I_Method0(const osg::StateSet *, getStateSet);
|
||||
I_Method1(void, setGlyphImageMargin, IN, unsigned int, margin);
|
||||
I_Method0(unsigned int, getGlyphImageMargin);
|
||||
I_Method3(bool, getSpaceForGlyph, IN, osgText::Font::Glyph *, glyph, IN, int &, posX, IN, int &, posY);
|
||||
I_Method3(void, addGlyph, IN, osgText::Font::Glyph *, glyph, IN, int, posX, IN, int, posY);
|
||||
I_Method1(void, apply, IN, osg::State &, state);
|
||||
I_Property(unsigned int, GlyphImageMargin);
|
||||
I_Property(osg::StateSet *, StateSet);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_ENUM_REFLECTOR(osgText::KerningType)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <osg/PrimitiveSet>
|
||||
#include <osg/Quat>
|
||||
#include <osg/State>
|
||||
#include <osg/StateSet>
|
||||
#include <osg/Vec3>
|
||||
#include <osg/Vec4>
|
||||
#include <osgText/Font>
|
||||
@@ -31,7 +30,7 @@
|
||||
#undef OUT
|
||||
#endif
|
||||
|
||||
TYPE_NAME_ALIAS(std::map< osg::ref_ptr< osg::StateSet > COMMA osgText::Text::GlyphQuads >, osgText::Text::TextureGlyphQuadMap);
|
||||
TYPE_NAME_ALIAS(std::map< osg::ref_ptr< osgText::Font::GlyphTexture > COMMA osgText::Text::GlyphQuads >, osgText::Text::TextureGlyphQuadMap);
|
||||
|
||||
BEGIN_ENUM_REFLECTOR(osgText::Text::CharacterSizeMode)
|
||||
I_EnumLabel(osgText::Text::OBJECT_COORDS);
|
||||
@@ -179,7 +178,7 @@ BEGIN_OBJECT_REFLECTOR(osgText::Text)
|
||||
I_Method1(bool, supports, IN, const osg::PrimitiveFunctor &, x);
|
||||
I_Method1(void, accept, IN, osg::PrimitiveFunctor &, pf);
|
||||
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0);
|
||||
I_Method1(const osgText::Text::GlyphQuads *, getGlyphQuads, IN, osg::StateSet *, stateSet);
|
||||
I_Method1(const osgText::Text::GlyphQuads *, getGlyphQuads, IN, osgText::Font::GlyphTexture *, texture);
|
||||
I_Method0(const osgText::Text::TextureGlyphQuadMap &, getTextureGlyphQuadMap);
|
||||
I_Method0(osg::BoundingBox, computeBound);
|
||||
I_Property(osgText::Text::AlignmentType, Alignment);
|
||||
@@ -245,7 +244,18 @@ BEGIN_VALUE_REFLECTOR(osgText::Text::GlyphQuads)
|
||||
I_ReadOnlyProperty(osgText::Text::GlyphQuads::TexCoords &, TexCoords);
|
||||
END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< osg::ref_ptr< osg::StateSet > COMMA osgText::Text::GlyphQuads >);
|
||||
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgText::Font::GlyphTexture >)
|
||||
I_Constructor0();
|
||||
I_Constructor1(IN, osgText::Font::GlyphTexture *, ptr);
|
||||
I_Constructor1(IN, const osg::ref_ptr< osgText::Font::GlyphTexture > &, rp);
|
||||
I_Method0(osgText::Font::GlyphTexture *, get);
|
||||
I_Method0(bool, valid);
|
||||
I_Method0(osgText::Font::GlyphTexture *, release);
|
||||
I_Method1(void, swap, IN, osg::ref_ptr< osgText::Font::GlyphTexture > &, rp);
|
||||
I_ReadOnlyProperty(osgText::Font::GlyphTexture *, );
|
||||
END_REFLECTOR
|
||||
|
||||
STD_MAP_REFLECTOR(std::map< osg::ref_ptr< osgText::Font::GlyphTexture > COMMA osgText::Text::GlyphQuads >);
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osgText::Font::Glyph * >);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user