Added support for osg::MemoryManager which is based upon Paul Nettle's
memory manager published at flipcode.com. This can be turned on with the OSG_USE_MEMORY_MANGER option which then uses custom global new and delete operators as well as provide osgNew and osgDelete macro's which add ability to log line and file from which calls are made. Updated osg,osgUtil,osgDB,osgText and osgPlugins/osg to use osgNew/osgDelete, and fixed memory leaks highlighted by the new memory manager.
This commit is contained in:
@@ -16,7 +16,7 @@ const char* AlphaFunc_getFuncStr(AlphaFunc::ComparisonFunction func);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_AlphaFuncProxy
|
||||
(
|
||||
new osg::AlphaFunc,
|
||||
osgNew osg::AlphaFunc,
|
||||
"AlphaFunc",
|
||||
"Object StateAttribute AlphaFunc",
|
||||
&AlphaFunc_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Billboard_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_BillboardProxy
|
||||
(
|
||||
new osg::Billboard,
|
||||
osgNew osg::Billboard,
|
||||
"Billboard",
|
||||
"Object Node Geode Billboard",
|
||||
&Billboard_readLocalData,
|
||||
|
||||
@@ -18,7 +18,7 @@ bool ClipPlane_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ClipPlaneProxy
|
||||
(
|
||||
new osg::ClipPlane,
|
||||
osgNew osg::ClipPlane,
|
||||
"ClipPlane",
|
||||
"Object StateAttribute ClipPlane",
|
||||
&ClipPlane_readLocalData,
|
||||
|
||||
@@ -16,7 +16,7 @@ const char* ColorMask_getModeStr(bool mode);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ColorMaskProxy
|
||||
(
|
||||
new osg::ColorMask,
|
||||
osgNew osg::ColorMask,
|
||||
"ColorMask",
|
||||
"Object StateAttribute ColorMask",
|
||||
&ColorMask_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool ColorMatrix_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ColorMatrixProxy
|
||||
(
|
||||
new osg::ColorMatrix,
|
||||
osgNew osg::ColorMatrix,
|
||||
"ColorMatrix",
|
||||
"Object StateAttribute ColorMatrix",
|
||||
&ColorMatrix_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool CullFace_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_CullFaceFuncProxy
|
||||
(
|
||||
new osg::CullFace,
|
||||
osgNew osg::CullFace,
|
||||
"CullFace",
|
||||
"Object StateAttribute CullFace",
|
||||
&CullFace_readLocalData,
|
||||
|
||||
@@ -18,7 +18,7 @@ const char* Depth_getFuncStr(Depth::Function func);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_DepthProxy
|
||||
(
|
||||
new osg::Depth,
|
||||
osgNew osg::Depth,
|
||||
"Depth",
|
||||
"Object StateAttribute Depth",
|
||||
&Depth_readLocalData,
|
||||
|
||||
@@ -27,7 +27,7 @@ bool Drawable_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
Drawable& drawable = static_cast<Drawable&>(obj);
|
||||
|
||||
static ref_ptr<StateSet> s_drawstate = new osg::StateSet;
|
||||
static ref_ptr<StateSet> s_drawstate = osgNew osg::StateSet;
|
||||
if (StateSet* readState = static_cast<StateSet*>(fr.readObjectOfType(*s_drawstate)))
|
||||
{
|
||||
drawable.setStateSet(readState);
|
||||
|
||||
@@ -14,7 +14,7 @@ bool EarthSky_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_EarthSkyProxy
|
||||
(
|
||||
new osg::EarthSky,
|
||||
osgNew osg::EarthSky,
|
||||
"EarthSky",
|
||||
"Object Node EarthSky Group",
|
||||
&EarthSky_readLocalData,
|
||||
|
||||
@@ -20,7 +20,7 @@ const char* Fog_getModeStr(Fog::Mode mode);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_FogProxy
|
||||
(
|
||||
new osg::Fog,
|
||||
osgNew osg::Fog,
|
||||
"Fog",
|
||||
"Object StateAttribute Fog",
|
||||
&Fog_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool FrontFace_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_FrontFaceProxy
|
||||
(
|
||||
new osg::FrontFace,
|
||||
osgNew osg::FrontFace,
|
||||
"FrontFace",
|
||||
"Object StateAttribute FrontFace",
|
||||
&FrontFace_readLocalData,
|
||||
|
||||
@@ -27,7 +27,7 @@ int GeoSet_getInterleavedRowLength(GeoSet::InterleaveArrayType at);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_GeoSetFuncProxy
|
||||
(
|
||||
new osg::GeoSet,
|
||||
osgNew osg::GeoSet,
|
||||
"GeoSet",
|
||||
"Object Drawable GeoSet",
|
||||
&GeoSet_readLocalData,
|
||||
@@ -38,7 +38,7 @@ RegisterDotOsgWrapperProxy g_GeoSetFuncProxy
|
||||
// register the old style 'Geoset' keyword read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_GeosetFuncProxy
|
||||
(
|
||||
new osg::GeoSet,
|
||||
osgNew osg::GeoSet,
|
||||
"Geoset",
|
||||
"Object Drawable Geoset",
|
||||
&GeoSet_readLocalData,
|
||||
@@ -136,7 +136,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int capacity;
|
||||
if (!fr[1].getInt(capacity)) capacity=100;
|
||||
int size = 0;
|
||||
int* list = new int [capacity];
|
||||
int* list = osgNew int [capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -149,12 +149,12 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
int* oldList = list;
|
||||
list = new int[capacity];
|
||||
list = osgNew int[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
list[i] = oldList[i];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
list[size] = primLength;
|
||||
++size;
|
||||
@@ -225,7 +225,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
|
||||
int size = 0;
|
||||
coordList = new Vec3[capacity];
|
||||
coordList = osgNew Vec3[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -239,14 +239,14 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
Vec3* oldList = coordList;
|
||||
coordList = new Vec3[capacity];
|
||||
coordList = osgNew Vec3[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
coordList[i][0] = oldList[i][0];
|
||||
coordList[i][1] = oldList[i][1];
|
||||
coordList[i][2] = oldList[i][2];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
coordList[size][0] = x;
|
||||
coordList[size][1] = y;
|
||||
@@ -295,7 +295,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
|
||||
int size = 0;
|
||||
normalList = new Vec3[capacity];
|
||||
normalList = osgNew Vec3[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -309,14 +309,14 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
Vec3* oldList = normalList;
|
||||
normalList = new Vec3[capacity];
|
||||
normalList = osgNew Vec3[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
normalList[i][0] = oldList[i][0];
|
||||
normalList[i][1] = oldList[i][1];
|
||||
normalList[i][2] = oldList[i][2];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
normalList[size][0] = x;
|
||||
normalList[size][1] = y;
|
||||
@@ -364,7 +364,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
|
||||
int size = 0;
|
||||
colorList = new Vec4[capacity];
|
||||
colorList = osgNew Vec4[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -379,7 +379,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
Vec4* oldList = colorList;
|
||||
colorList = new Vec4[capacity];
|
||||
colorList = osgNew Vec4[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
colorList[i][0] = oldList[i][0];
|
||||
@@ -387,7 +387,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
colorList[i][2] = oldList[i][2];
|
||||
colorList[i][3] = oldList[i][3];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
|
||||
colorList[size][0] = r;
|
||||
@@ -438,7 +438,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
|
||||
int size = 0;
|
||||
textureList = new Vec2[capacity];
|
||||
textureList = osgNew Vec2[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -451,13 +451,13 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
Vec2* oldList = textureList;
|
||||
textureList = new Vec2[capacity];
|
||||
textureList = osgNew Vec2[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
textureList[i][0] = oldList[i][0];
|
||||
textureList[i][1] = oldList[i][1];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
textureList[size][0] = r;
|
||||
textureList[size][1] = s;
|
||||
@@ -532,9 +532,9 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int rowLength = GeoSet_getInterleavedRowLength(iaType);
|
||||
|
||||
int size = 0;
|
||||
unsigned char* dataList = new unsigned char[capacity*rowLength];
|
||||
unsigned char* dataList = osgNew unsigned char[capacity*rowLength];
|
||||
|
||||
unsigned char* rowData = new unsigned char [rowLength];
|
||||
unsigned char* rowData = osgNew unsigned char [rowLength];
|
||||
|
||||
float floatData;
|
||||
int intData;
|
||||
@@ -569,9 +569,9 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
unsigned char* oldList = dataList;
|
||||
dataList = new unsigned char[capacity*rowLength];
|
||||
dataList = osgNew unsigned char[capacity*rowLength];
|
||||
memcpy(dataList,oldList,oldCapacity*rowLength);
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
memcpy(dataList+size*rowLength,rowData,rowLength);
|
||||
++size;
|
||||
@@ -583,7 +583,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
}
|
||||
|
||||
delete [] rowData;
|
||||
osgDelete [] rowData;
|
||||
|
||||
interleavedArray = (float*)dataList;
|
||||
}
|
||||
@@ -926,7 +926,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
if (is_ushort)
|
||||
{
|
||||
// read ushorts...
|
||||
osg::ushort* coordIndexList = new osg::ushort[capacity];
|
||||
osg::ushort* coordIndexList = osgNew osg::ushort[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -939,12 +939,12 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
osg::ushort* oldList = coordIndexList;
|
||||
coordIndexList = new osg::ushort[capacity];
|
||||
coordIndexList = osgNew osg::ushort[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
coordIndexList[i] = oldList[i];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
coordIndexList[size] = index;
|
||||
++size;
|
||||
@@ -962,7 +962,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
else
|
||||
{
|
||||
// read uints...
|
||||
osg::uint* coordIndexList = new osg::uint[capacity];
|
||||
osg::uint* coordIndexList = osgNew osg::uint[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -975,12 +975,12 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
osg::uint* oldList = coordIndexList;
|
||||
coordIndexList = new osg::uint[capacity];
|
||||
coordIndexList = osgNew osg::uint[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
coordIndexList[i] = oldList[i];
|
||||
}
|
||||
delete [] oldList;
|
||||
osgDelete [] oldList;
|
||||
}
|
||||
coordIndexList[size] = index;
|
||||
++size;
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Geode_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_GeodeProxy
|
||||
(
|
||||
new osg::Geode,
|
||||
osgNew osg::Geode,
|
||||
"Geode",
|
||||
"Object Node Geode",
|
||||
&Geode_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Group_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_GroupProxy
|
||||
(
|
||||
new osg::Group,
|
||||
osgNew osg::Group,
|
||||
"Group",
|
||||
"Object Node Group",
|
||||
&Group_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Image_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ImageFuncProxy
|
||||
(
|
||||
new osg::Image,
|
||||
osgNew osg::Image,
|
||||
"Image",
|
||||
"Object Image",
|
||||
&Image_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Impostor_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ImpostorProxy
|
||||
(
|
||||
new osg::Impostor,
|
||||
osgNew osg::Impostor,
|
||||
"Impostor",
|
||||
"Object Node Impostor LOD Group",
|
||||
&Impostor_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool LOD_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LODProxy
|
||||
(
|
||||
new osg::LOD,
|
||||
osgNew osg::LOD,
|
||||
"LOD",
|
||||
"Object Node LOD Group",
|
||||
&LOD_readLocalData,
|
||||
|
||||
@@ -18,7 +18,7 @@ bool Light_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LightProxy
|
||||
(
|
||||
new osg::Light,
|
||||
osgNew osg::Light,
|
||||
"Light",
|
||||
"Object StateAttribute Light",
|
||||
&Light_readLocalData,
|
||||
|
||||
@@ -15,7 +15,7 @@ bool LightModel_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LightModelProxy
|
||||
(
|
||||
new osg::LightModel,
|
||||
osgNew osg::LightModel,
|
||||
"LightModel",
|
||||
"Object StateAttribute LightModel",
|
||||
&LightModel_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool LightSource_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LightSourceProxy
|
||||
(
|
||||
new osg::LightSource,
|
||||
osgNew osg::LightSource,
|
||||
"LightSource",
|
||||
"Object Node LightSource",
|
||||
&LightSource_readLocalData,
|
||||
@@ -27,7 +27,7 @@ bool LightSource_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
LightSource& lightsource = static_cast<LightSource&>(obj);
|
||||
|
||||
static ref_ptr<Light> s_light = new osg::Light;
|
||||
static ref_ptr<Light> s_light = osgNew osg::Light;
|
||||
|
||||
Light* light = static_cast<Light*>(fr.readObjectOfType(*s_light));
|
||||
if (light)
|
||||
|
||||
@@ -15,7 +15,7 @@ bool LineStipple_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LineStippleProxy
|
||||
(
|
||||
new osg::LineStipple,
|
||||
osgNew osg::LineStipple,
|
||||
"LineStipple",
|
||||
"Object StateAttribute LineStipple",
|
||||
&LineStipple_readLocalData,
|
||||
|
||||
@@ -18,7 +18,7 @@ bool LineWidth_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_LineWidthProxy
|
||||
(
|
||||
new osg::LineWidth,
|
||||
osgNew osg::LineWidth,
|
||||
"LineWidth",
|
||||
"Object StateAttribute LineWidth",
|
||||
&LineWidth_readLocalData,
|
||||
|
||||
@@ -19,7 +19,7 @@ bool Material_matchFaceAndColor(Input& fr,const char* name,Material::Face& mf,Ve
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_MaterialProxy
|
||||
(
|
||||
new osg::Material,
|
||||
osgNew osg::Material,
|
||||
"Material",
|
||||
"Object StateAttribute Material",
|
||||
&Material_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Matrix_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_MatrixFuncProxy
|
||||
(
|
||||
new osg::Matrix,
|
||||
osgNew osg::Matrix,
|
||||
"Matrix",
|
||||
"Object Matrix",
|
||||
&Matrix_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Node_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_NodeProxy
|
||||
(
|
||||
new osg::Node,
|
||||
osgNew osg::Node,
|
||||
"Node",
|
||||
"Object Node",
|
||||
&Node_readLocalData,
|
||||
@@ -87,7 +87,7 @@ bool Node_readLocalData(Object& obj, Input& fr)
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
static ref_ptr<StateSet> s_drawstate = new osg::StateSet;
|
||||
static ref_ptr<StateSet> s_drawstate = osgNew osg::StateSet;
|
||||
if (StateSet* readState = static_cast<StateSet*>(fr.readObjectOfType(*s_drawstate)))
|
||||
{
|
||||
node.setStateSet(readState);
|
||||
|
||||
@@ -18,7 +18,7 @@ bool Point_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_PointProxy
|
||||
(
|
||||
new osg::Point,
|
||||
osgNew osg::Point,
|
||||
"Point",
|
||||
"Object StateAttribute Point",
|
||||
&Point_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool PolygonMode_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_PolygonModeProxy
|
||||
(
|
||||
new osg::PolygonMode,
|
||||
osgNew osg::PolygonMode,
|
||||
"PolygonMode",
|
||||
"Object StateAttribute PolygonMode",
|
||||
&PolygonMode_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool PolygonOffset_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_PolygonOffsetProxy
|
||||
(
|
||||
new osg::PolygonOffset,
|
||||
osgNew osg::PolygonOffset,
|
||||
"PolygonOffset",
|
||||
"Object StateAttribute PolygonOffset",
|
||||
&PolygonOffset_readLocalData,
|
||||
|
||||
@@ -53,7 +53,7 @@ class OSGReaderWriter : public ReaderWriter
|
||||
}
|
||||
else
|
||||
{
|
||||
Group* group = new Group;
|
||||
Group* group = osgNew Group;
|
||||
group->setName("import group");
|
||||
for(NodeList::iterator itr=nodeList.begin();
|
||||
itr!=nodeList.end();
|
||||
|
||||
@@ -14,7 +14,7 @@ bool ShadeModel_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ShadeModelFuncProxy
|
||||
(
|
||||
new osg::ShadeModel,
|
||||
osgNew osg::ShadeModel,
|
||||
"ShadeModel",
|
||||
"Object StateAttribute ShadeModel",
|
||||
&ShadeModel_readLocalData,
|
||||
|
||||
@@ -24,7 +24,7 @@ const char* StateSet_getRenderBinModeStr(StateSet::RenderBinMode mode);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_StateSetFuncProxy
|
||||
(
|
||||
new osg::StateSet,
|
||||
osgNew osg::StateSet,
|
||||
"StateSet",
|
||||
"Object StateSet",
|
||||
&StateSet_readLocalData,
|
||||
@@ -35,7 +35,7 @@ RegisterDotOsgWrapperProxy g_StateSetFuncProxy
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_GeoStateFuncProxy
|
||||
(
|
||||
new osg::StateSet,
|
||||
osgNew osg::StateSet,
|
||||
"GeoState",
|
||||
"Object GeoState",
|
||||
&GeoState_readLocalData,
|
||||
|
||||
@@ -20,7 +20,7 @@ const char* Stencil_getOperationStr(Stencil::Operation op);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_StencilProxy
|
||||
(
|
||||
new osg::Stencil,
|
||||
osgNew osg::Stencil,
|
||||
"Stencil",
|
||||
"Object StateAttribute Stencil",
|
||||
&Stencil_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Switch_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_SwitchProxy
|
||||
(
|
||||
new osg::Switch,
|
||||
osgNew osg::Switch,
|
||||
"Switch",
|
||||
"Object Node Group Switch",
|
||||
&Switch_readLocalData,
|
||||
|
||||
@@ -16,7 +16,7 @@ const char* TexEnv_getModeStr(TexEnv::Mode mode);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TexEnvProxy
|
||||
(
|
||||
new osg::TexEnv,
|
||||
osgNew osg::TexEnv,
|
||||
"TexEnv",
|
||||
"Object StateAttribute TexEnv",
|
||||
&TexEnv_readLocalData,
|
||||
|
||||
@@ -20,7 +20,7 @@ const char* TexGen_getModeStr(TexGen::Mode mode);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TexGenProxy
|
||||
(
|
||||
new osg::TexGen,
|
||||
osgNew osg::TexGen,
|
||||
"TexGen",
|
||||
"Object StateAttribute TexGen",
|
||||
&TexGen_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool TexMat_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TexMatProxy
|
||||
(
|
||||
new osg::TexMat,
|
||||
osgNew osg::TexMat,
|
||||
"TexMat",
|
||||
"Object StateAttribute TexMat",
|
||||
&TexMat_readLocalData,
|
||||
|
||||
@@ -25,7 +25,7 @@ const char* Texture_getSubloadModeStr(Texture::SubloadMode value);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TextureProxy
|
||||
(
|
||||
new osg::Texture,
|
||||
osgNew osg::Texture,
|
||||
"Texture",
|
||||
"Object StateAttribute Texture",
|
||||
&Texture_readLocalData,
|
||||
|
||||
@@ -25,7 +25,7 @@ const char* TextureCubeMap_getSubloadModeStr(TextureCubeMap::SubloadMode value);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TextureCubeMapProxy
|
||||
(
|
||||
new osg::TextureCubeMap,
|
||||
osgNew osg::TextureCubeMap,
|
||||
"TextureCubeMap",
|
||||
"Object StateAttribute TextureCubeMap Texture",
|
||||
&TextureCubeMap_readLocalData,
|
||||
|
||||
@@ -14,7 +14,7 @@ bool Transform_writeLocalData(const Object& obj, Output& fw);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TransformProxy
|
||||
(
|
||||
new osg::Transform,
|
||||
osgNew osg::Transform,
|
||||
"Transform",
|
||||
"Object Node Transform Group",
|
||||
&Transform_readLocalData,
|
||||
@@ -25,7 +25,7 @@ RegisterDotOsgWrapperProxy g_TransformProxy
|
||||
// register old style 'DCS' read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_DCSProxy
|
||||
(
|
||||
new osg::Transform,
|
||||
osgNew osg::Transform,
|
||||
"DCS",
|
||||
"Object Node Group DCS",
|
||||
&Transform_readLocalData,
|
||||
@@ -62,7 +62,7 @@ bool Transform_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
transform.setMatrix(*tmpMatrix);
|
||||
|
||||
delete tmpMatrix;
|
||||
osgDelete tmpMatrix;
|
||||
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ const char* Transparency_getModeStr(int value);
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_TransparencyProxy
|
||||
(
|
||||
new osg::Transparency,
|
||||
osgNew osg::Transparency,
|
||||
"Transparency",
|
||||
"Object StateAttribute Transparency",
|
||||
&Transparency_readLocalData,
|
||||
|
||||
Reference in New Issue
Block a user