Converted the instance of osgNew and osgDelete back to new and delete as part

of depecating the include/osg/MemoryManager
This commit is contained in:
Robert Osfield
2002-12-16 13:40:58 +00:00
parent de9b0b336a
commit 00cc3a1833
186 changed files with 812 additions and 809 deletions

View File

@@ -409,7 +409,7 @@ class ReaderWriterGEO : public ReaderWriter
}
else
{
Group* group = osgNew Group;
Group* group = new Group;
group->setName("import group");
for(NodeList::iterator itr=nodeList.begin();
itr!=nodeList.end();
@@ -698,10 +698,10 @@ class ReaderWriterGEO : public ReaderWriter
osg::MatrixTransform *makeText(georecord *gr) { // make transform, geode & text
std::string ttfPath("fonts/times.ttf");
int gFontSize1=2;
osgText::PolygonFont* polygonFont= osgNew osgText::PolygonFont(ttfPath,
osgText::PolygonFont* polygonFont= new osgText::PolygonFont(ttfPath,
gFontSize1,
3);
osgText::Text *text= osgNew osgText::Text(polygonFont);
osgText::Text *text= new osgText::Text(polygonFont);
const geoField *gfd=gr->getField(GEO_DB_TEXT_NAME);
//const char *name=gfd ? gfd->getChar() : "a text";
gfd=gr->getField(GEO_DB_TEXT_STRING);
@@ -735,7 +735,7 @@ class ReaderWriterGEO : public ReaderWriter
}
}
osg::Geode *geod=new osg::Geode;
osg::StateSet *textState = osgNew osg::StateSet();
osg::StateSet *textState = new osg::StateSet();
textState->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
geod->setStateSet( textState );
osg::MatrixTransform *numt=new osg::MatrixTransform;

View File

@@ -264,7 +264,7 @@ Lwo2::_read_layer(unsigned long size)
unsigned short number = _read_short();
size -= 2;
Lwo2Layer* layer = osgNew Lwo2Layer();
Lwo2Layer* layer = new Lwo2Layer();
_layers[number] = layer;
_current_layer = layer;
layer->_number = number;
@@ -540,7 +540,7 @@ Lwo2::_read_image_definition(unsigned long size)
void
Lwo2::_read_surface(unsigned long size)
{
Lwo2Surface* surface = osgNew Lwo2Surface();
Lwo2Surface* surface = new Lwo2Surface();
surface->image_index = -1;
surface->state_set = NULL;
@@ -658,7 +658,7 @@ Lwo2::GenerateGroup( Group& group )
// itr++;
// itr++;
{
osg::Geode* geode = osgNew osg::Geode();
osg::Geode* geode = new osg::Geode();
notify(DEBUG_INFO) << "Generate geode for layer " << (*itr).first << std::endl;
DrawableToTagMapping tag_mapping;
@@ -684,7 +684,7 @@ Lwo2::_generate_statesets_from_surfaces()
for (IteratorSurfaces itr_surf = _surfaces.begin(); itr_surf != _surfaces.end(); itr_surf++)
{
Lwo2Surface* surface = (*itr_surf).second;
StateSet* state_set = osgNew osg::StateSet;
StateSet* state_set = new osg::StateSet;
notify(DEBUG_INFO) << "\tcreating surface " << (*itr_surf).first << std::endl;
@@ -696,14 +696,14 @@ Lwo2::_generate_statesets_from_surfaces()
notify(DEBUG_INFO) << "\tresult - " << image << std::endl;
if (image)
{
Texture2D* texture = osgNew osg::Texture2D;
Texture2D* texture = new osg::Texture2D;
texture->setImage(image);
state_set->setTextureAttributeAndModes(0, texture, StateAttribute::ON);
}
}
// set color
Material* material = osgNew Material();
Material* material = new Material();
Vec4 color(surface->color[0],
surface->color[1],
surface->color[2],
@@ -712,7 +712,7 @@ Lwo2::_generate_statesets_from_surfaces()
state_set->setAttribute(material);
// setup culling
CullFace* cull = osgNew CullFace();
CullFace* cull = new CullFace();
cull->setMode(CullFace::BACK);
state_set->setAttribute(cull);
state_set->setMode(GL_CULL_FACE, StateAttribute::ON);

View File

@@ -95,13 +95,13 @@ Lwo2Layer::GenerateGeode( Geode& geode, short tags_count, DrawableToTagMapping&
have_texture_coords = false;
// new geometry
ref_ptr<Geometry> geometry = osgNew Geometry;
ref_ptr<Geometry> geometry = new Geometry;
// create coords array
ref_ptr<Vec3Array> coords = osgNew Vec3Array;
ref_ptr<Vec3Array> coords = new Vec3Array;
// create texture array
ref_ptr<Vec2Array> texcoords = osgNew Vec2Array;
ref_ptr<Vec2Array> texcoords = new Vec2Array;
// selecting polygons for current layer only
int polygon_index = 0;
@@ -159,15 +159,15 @@ Lwo2Layer::GenerateGeode( Geode& geode, short tags_count, DrawableToTagMapping&
unsigned int points_count = (*polygon_iterator).size();
if (points_count == 3)
{
geometry->addPrimitiveSet(osgNew DrawArrays(PrimitiveSet::TRIANGLES, points_start, points_count));
geometry->addPrimitiveSet(new DrawArrays(PrimitiveSet::TRIANGLES, points_start, points_count));
}
else if (points_count == 4)
{
geometry->addPrimitiveSet(osgNew DrawArrays(PrimitiveSet::QUADS, points_start, points_count));
geometry->addPrimitiveSet(new DrawArrays(PrimitiveSet::QUADS, points_start, points_count));
}
else
{
geometry->addPrimitiveSet(osgNew DrawArrays(PrimitiveSet::POLYGON, points_start, points_count));
geometry->addPrimitiveSet(new DrawArrays(PrimitiveSet::POLYGON, points_start, points_count));
}
}
}
@@ -194,7 +194,7 @@ Lwo2Layer::GenerateGeode( Geode& geode, short tags_count, DrawableToTagMapping&
unsigned int points_start = (*coords).size() - (*polygon_iterator).size();
unsigned int points_count = (*polygon_iterator).size();
geometry->addPrimitiveSet(osgNew DrawArrays(PrimitiveSet::TRIANGLE_FAN, points_start, points_count));
geometry->addPrimitiveSet(new DrawArrays(PrimitiveSet::TRIANGLE_FAN, points_start, points_count));
}
// triangle strips of current layer
@@ -219,7 +219,7 @@ Lwo2Layer::GenerateGeode( Geode& geode, short tags_count, DrawableToTagMapping&
unsigned int points_start = (*coords).size() - (*polygon_iterator).size();
unsigned int points_count = (*polygon_iterator).size();
geometry->addPrimitiveSet(osgNew DrawArrays(PrimitiveSet::TRIANGLE_STRIP, points_start, points_count));
geometry->addPrimitiveSet(new DrawArrays(PrimitiveSet::TRIANGLE_STRIP, points_start, points_count));
}
// add geometry if it contains any points

View File

@@ -70,10 +70,10 @@ osgDB::RegisterReaderWriterProxy<ReaderWriterLWO> g_lwoReaderWriterProxy;
osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO2(const std::string& fileName, const osgDB::ReaderWriter::Options*)
{
std::auto_ptr<Lwo2> lwo2(osgNew Lwo2());
std::auto_ptr<Lwo2> lwo2(new Lwo2());
if (lwo2->ReadFile(fileName))
{
osg::ref_ptr<Group> group = osgNew osg::Group();
osg::ref_ptr<Group> group = new osg::Group();
if (lwo2->GenerateGroup(*group)) return group.take();
}
return ReadResult::FILE_NOT_HANDLED;
@@ -145,14 +145,14 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
{
lwMaterial& lw_material = lw->material[itr->first];
gc._geom = osgNew osg::Geometry;
gc._geom = new osg::Geometry;
osg::Vec3Array* vertArray = osgNew osg::Vec3Array(gc._numPoints);
osg::Vec3Array* vertArray = new osg::Vec3Array(gc._numPoints);
gc._vertices = vertArray->begin();
gc._geom->setVertexArray(vertArray);
// set up color.
osg::Vec4Array* colors = osgNew osg::Vec4Array(1);
osg::Vec4Array* colors = new osg::Vec4Array(1);
(*colors)[0].set(lw_material.r,
lw_material.g,
lw_material.b,
@@ -171,10 +171,10 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
if (image)
{
// create state
osg::StateSet* stateset = osgNew osg::StateSet;
osg::StateSet* stateset = new osg::StateSet;
// create texture
osg::Texture2D* texture = osgNew osg::Texture2D;
osg::Texture2D* texture = new osg::Texture2D;
texture->setImage(image);
// texture wrap mode
@@ -194,7 +194,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
gc._geom->setStateSet(stateset);
osg::Vec2Array* texcoordArray = osgNew osg::Vec2Array(gc._numPoints);
osg::Vec2Array* texcoordArray = new osg::Vec2Array(gc._numPoints);
gc._texcoords = texcoordArray->begin();
gc._geom->setTexCoordArray(0,texcoordArray);
}
@@ -234,7 +234,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
break;
}
gc._geom->addPrimitiveSet(osgNew osg::DrawArrays(mode,gc._coordCount,face.index_cnt));
gc._geom->addPrimitiveSet(new osg::DrawArrays(mode,gc._coordCount,face.index_cnt));
gc._coordCount += face.index_cnt;
// From the spec_low.lxt :
@@ -261,7 +261,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
}
}
osg::Geode* geode = osgNew osg::Geode;
osg::Geode* geode = new osg::Geode;
osgUtil::Tesselator tesselator;

View File

@@ -16,7 +16,7 @@ const char* AlphaFunc_getFuncStr(AlphaFunc::ComparisonFunction func);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_AlphaFuncProxy
(
osgNew osg::AlphaFunc,
new osg::AlphaFunc,
"AlphaFunc",
"Object StateAttribute AlphaFunc",
&AlphaFunc_readLocalData,

View File

@@ -18,7 +18,7 @@ bool AnimationPath_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
// register the read and write functions with the osgDB::Registry.
osgDB::RegisterDotOsgWrapperProxy AnimationPath_Proxy
(
osgNew osg::AnimationPath,
new osg::AnimationPath,
"AnimationPath",
"Object AnimationPath",
AnimationPath_readLocalData,

View File

@@ -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
(
osgNew osg::Billboard,
new osg::Billboard,
"Billboard",
"Object Node Geode Billboard",
&Billboard_readLocalData,

View File

@@ -18,7 +18,7 @@ const char* BlendFunc_getModeStr(int value);
RegisterDotOsgWrapperProxy g_TransparencyProxy
(
osgNew osg::BlendFunc,
new osg::BlendFunc,
"Transparency",
"Object StateAttribute Transparency",
&BlendFunc_readLocalData,
@@ -27,7 +27,7 @@ RegisterDotOsgWrapperProxy g_TransparencyProxy
RegisterDotOsgWrapperProxy g_BlendFuncProxy
(
osgNew osg::BlendFunc,
new osg::BlendFunc,
"BlendFunc",
"Object StateAttribute BlendFunc",
&BlendFunc_readLocalData,

View File

@@ -15,7 +15,7 @@ bool ClearNode_writeLocalData(const Object& obj, Output& fw);
RegisterDotOsgWrapperProxy g_EarthSkyProxy
(
osgNew osg::ClearNode,
new osg::ClearNode,
"EarthSky",
"Object Node EarthSky Group",
&ClearNode_readLocalData,
@@ -24,7 +24,7 @@ RegisterDotOsgWrapperProxy g_EarthSkyProxy
RegisterDotOsgWrapperProxy g_ClearNodeProxy
(
osgNew osg::ClearNode,
new osg::ClearNode,
"ClearNode",
"Object Node ClearNode Group",
&ClearNode_readLocalData,

View File

@@ -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
(
osgNew osg::ClipPlane,
new osg::ClipPlane,
"ClipPlane",
"Object StateAttribute ClipPlane",
&ClipPlane_readLocalData,

View File

@@ -16,7 +16,7 @@ const char* ColorMask_getModeStr(bool mode);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_ColorMaskProxy
(
osgNew osg::ColorMask,
new osg::ColorMask,
"ColorMask",
"Object StateAttribute ColorMask",
&ColorMask_readLocalData,

View File

@@ -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
(
osgNew osg::ColorMatrix,
new osg::ColorMatrix,
"ColorMatrix",
"Object StateAttribute ColorMatrix",
&ColorMatrix_readLocalData,

View File

@@ -20,7 +20,7 @@ bool ConvexPlanarOccluder_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_ConvexPlanarOccluderFuncProxy
(
osgNew osg::ConvexPlanarOccluder,
new osg::ConvexPlanarOccluder,
"ConvexPlanarOccluder",
"Object ConvexPlanarOccluder",
&ConvexPlanarOccluder_readLocalData,

View File

@@ -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
(
osgNew osg::CullFace,
new osg::CullFace,
"CullFace",
"Object StateAttribute CullFace",
&CullFace_readLocalData,

View File

@@ -15,7 +15,7 @@ bool DOFTransform_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_DOFTransformProxy
(
osgNew osg::DOFTransform,
new osg::DOFTransform,
"DOFTransform",
"Object Node Transform DOFTransform Group",
&DOFTransform_readLocalData,

View File

@@ -18,7 +18,7 @@ const char* Depth_getFuncStr(Depth::Function func);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_DepthProxy
(
osgNew osg::Depth,
new osg::Depth,
"Depth",
"Object StateAttribute Depth",
&Depth_readLocalData,

View File

@@ -27,7 +27,7 @@ bool Drawable_readLocalData(Object& obj, Input& fr)
Drawable& drawable = static_cast<Drawable&>(obj);
static ref_ptr<StateSet> s_drawstate = osgNew osg::StateSet;
static ref_ptr<StateSet> s_drawstate = new osg::StateSet;
if (StateSet* readState = static_cast<StateSet*>(fr.readObjectOfType(*s_drawstate)))
{
drawable.setStateSet(readState);

View File

@@ -20,7 +20,7 @@ const char* Fog_getModeStr(Fog::Mode mode);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_FogProxy
(
osgNew osg::Fog,
new osg::Fog,
"Fog",
"Object StateAttribute Fog",
&Fog_readLocalData,

View File

@@ -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
(
osgNew osg::FrontFace,
new osg::FrontFace,
"FrontFace",
"Object StateAttribute FrontFace",
&FrontFace_readLocalData,

View File

@@ -27,7 +27,7 @@ int GeoSet_getInterleavedRowLength(GeoSet::InterleaveArrayType at);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_GeoSetFuncProxy
(
osgNew osg::GeoSet,
new 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
(
osgNew osg::GeoSet,
new 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 = osgNew int [capacity];
int* list = new int [capacity];
memset(list,0,capacity*sizeof(int));
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -150,13 +150,13 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
int* oldList = list;
list = osgNew int[capacity];
list = new int[capacity];
memset(list,0,capacity*sizeof(int));
for(int i=0;i<oldCapacity;++i)
{
list[i] = oldList[i];
}
osgDelete [] oldList;
delete [] oldList;
}
list[size] = primLength;
++size;
@@ -227,7 +227,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
}
int size = 0;
coordList = osgNew Vec3[capacity];
coordList = new Vec3[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -241,14 +241,14 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
Vec3* oldList = coordList;
coordList = osgNew Vec3[capacity];
coordList = new 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];
}
osgDelete [] oldList;
delete [] oldList;
}
coordList[size][0] = x;
coordList[size][1] = y;
@@ -297,7 +297,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
}
int size = 0;
normalList = osgNew Vec3[capacity];
normalList = new Vec3[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -311,14 +311,14 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
Vec3* oldList = normalList;
normalList = osgNew Vec3[capacity];
normalList = new 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];
}
osgDelete [] oldList;
delete [] oldList;
}
normalList[size][0] = x;
normalList[size][1] = y;
@@ -366,7 +366,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
}
int size = 0;
colorList = osgNew Vec4[capacity];
colorList = new Vec4[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -381,7 +381,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
Vec4* oldList = colorList;
colorList = osgNew Vec4[capacity];
colorList = new Vec4[capacity];
for(int i=0;i<oldCapacity;++i)
{
colorList[i][0] = oldList[i][0];
@@ -389,7 +389,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
colorList[i][2] = oldList[i][2];
colorList[i][3] = oldList[i][3];
}
osgDelete [] oldList;
delete [] oldList;
}
colorList[size][0] = r;
@@ -440,7 +440,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
}
int size = 0;
textureList = osgNew Vec2[capacity];
textureList = new Vec2[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -453,13 +453,13 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
Vec2* oldList = textureList;
textureList = osgNew Vec2[capacity];
textureList = new Vec2[capacity];
for(int i=0;i<oldCapacity;++i)
{
textureList[i][0] = oldList[i][0];
textureList[i][1] = oldList[i][1];
}
osgDelete [] oldList;
delete [] oldList;
}
textureList[size][0] = r;
textureList[size][1] = s;
@@ -534,9 +534,9 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int rowLength = GeoSet_getInterleavedRowLength(iaType);
int size = 0;
unsigned char* dataList = osgNew unsigned char[capacity*rowLength];
unsigned char* dataList = new unsigned char[capacity*rowLength];
unsigned char* rowData = osgNew unsigned char [rowLength];
unsigned char* rowData = new unsigned char [rowLength];
float floatData;
int intData;
@@ -571,9 +571,9 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
unsigned char* oldList = dataList;
dataList = osgNew unsigned char[capacity*rowLength];
dataList = new unsigned char[capacity*rowLength];
memcpy(dataList,oldList,oldCapacity*rowLength);
osgDelete [] oldList;
delete [] oldList;
}
memcpy(dataList+size*rowLength,rowData,rowLength);
++size;
@@ -585,7 +585,7 @@ bool GeoSet_readLocalData(Object& obj, Input& fr)
}
}
osgDelete [] rowData;
delete [] rowData;
interleavedArray = (float*)dataList;
}
@@ -928,7 +928,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
if (is_ushort)
{
// read ushorts...
GLushort* coordIndexList = osgNew GLushort[capacity];
GLushort* coordIndexList = new GLushort[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -941,12 +941,12 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
GLushort* oldList = coordIndexList;
coordIndexList = osgNew GLushort[capacity];
coordIndexList = new GLushort[capacity];
for(int i=0;i<oldCapacity;++i)
{
coordIndexList[i] = oldList[i];
}
osgDelete [] oldList;
delete [] oldList;
}
coordIndexList[size] = index;
++size;
@@ -964,7 +964,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
else
{
// read uints...
GLuint* coordIndexList = osgNew GLuint[capacity];
GLuint* coordIndexList = new GLuint[capacity];
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -977,12 +977,12 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
int oldCapacity = capacity;
while(capacity<=size) capacity *= 2;
GLuint* oldList = coordIndexList;
coordIndexList = osgNew GLuint[capacity];
coordIndexList = new GLuint[capacity];
for(int i=0;i<oldCapacity;++i)
{
coordIndexList[i] = oldList[i];
}
osgDelete [] oldList;
delete [] oldList;
}
coordIndexList[size] = index;
++size;

View File

@@ -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
(
osgNew osg::Geode,
new osg::Geode,
"Geode",
"Object Node Geode",
&Geode_readLocalData,

View File

@@ -24,7 +24,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom);
//register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_GeometryFuncProxy
(
osgNew osg::Geometry,
new osg::Geometry,
"Geometry",
"Object Drawable Geometry",
&Geometry_readLocalData,
@@ -71,7 +71,7 @@ bool Geometry_readLocalData(Object& obj, Input& fr)
int capacity;
fr[1].getInt(capacity);
Vec3Array* vertices = osgNew Vec3Array;
Vec3Array* vertices = new Vec3Array;
vertices->reserve(capacity);
fr += 3;
@@ -125,7 +125,7 @@ bool Geometry_readLocalData(Object& obj, Input& fr)
int capacity;
fr[1].getInt(capacity);
Vec3Array* normals = osgNew Vec3Array;
Vec3Array* normals = new Vec3Array;
normals->reserve(capacity);
fr += 3;
@@ -237,7 +237,7 @@ bool Geometry_readLocalData(Object& obj, Input& fr)
int capacity;
fr[1].getInt(capacity);
FloatArray* fogcoords = osgNew FloatArray;
FloatArray* fogcoords = new FloatArray;
fogcoords->reserve(capacity);
fr += 3;
@@ -321,7 +321,7 @@ Array* Array_readLocalData(Input& fr)
if (strcmp(arrayName,"ByteArray")==0)
{
ByteArray* array = osgNew ByteArray;
ByteArray* array = new ByteArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -338,7 +338,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"ShortArray")==0)
{
ShortArray* array = osgNew ShortArray;
ShortArray* array = new ShortArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -355,7 +355,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"IntArray")==0)
{
IntArray* array = osgNew IntArray;
IntArray* array = new IntArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -372,7 +372,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"UByteArray")==0)
{
UByteArray* array = osgNew UByteArray;
UByteArray* array = new UByteArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -389,7 +389,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"UShortArray")==0)
{
UShortArray* array = osgNew UShortArray;
UShortArray* array = new UShortArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -406,7 +406,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"UIntArray")==0)
{
UIntArray* array = osgNew UIntArray;
UIntArray* array = new UIntArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -423,7 +423,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"UByte4Array")==0)
{
UByte4Array* array = osgNew UByte4Array;
UByte4Array* array = new UByte4Array;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -443,7 +443,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"FloatArray")==0)
{
FloatArray* array = osgNew FloatArray;
FloatArray* array = new FloatArray;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -460,7 +460,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"Vec2Array")==0)
{
Vec2Array* array = osgNew Vec2Array;
Vec2Array* array = new Vec2Array;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -477,7 +477,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"Vec3Array")==0)
{
Vec3Array* array = osgNew Vec3Array;
Vec3Array* array = new Vec3Array;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -494,7 +494,7 @@ Array* Array_readLocalData(Input& fr)
}
else if (strcmp(arrayName,"Vec4Array")==0)
{
Vec4Array* array = osgNew Vec4Array;
Vec4Array* array = new Vec4Array;
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
@@ -696,7 +696,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom)
int count;
fr[3].getInt(count);
geom.addPrimitiveSet(osgNew DrawArrays(mode,first,count));
geom.addPrimitiveSet(new DrawArrays(mode,first,count));
fr += 4;
@@ -718,7 +718,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom)
fr += 5;
DrawArrayLengths* prim = osgNew DrawArrayLengths;
DrawArrayLengths* prim = new DrawArrayLengths;
prim->setMode(mode);
prim->setFirst(first);
prim->reserve(capacity);
@@ -750,7 +750,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom)
fr += 4;
DrawElementsUByte* prim = osgNew DrawElementsUByte;
DrawElementsUByte* prim = new DrawElementsUByte;
prim->setMode(mode);
prim->reserve(capacity);
@@ -781,7 +781,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom)
fr += 4;
DrawElementsUShort* prim = osgNew DrawElementsUShort;
DrawElementsUShort* prim = new DrawElementsUShort;
prim->setMode(mode);
prim->reserve(capacity);
@@ -812,7 +812,7 @@ bool Primitive_readLocalData(Input& fr,osg::Geometry& geom)
fr += 4;
DrawElementsUInt* prim = osgNew DrawElementsUInt;
DrawElementsUInt* prim = new DrawElementsUInt;
prim->setMode(mode);
prim->reserve(capacity);

View File

@@ -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
(
osgNew osg::Group,
new osg::Group,
"Group",
"Object Node Group",
&Group_readLocalData,

View File

@@ -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
(
osgNew osg::Image,
new osg::Image,
"Image",
"Object Image",
&Image_readLocalData,

View File

@@ -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
(
osgNew osg::Impostor,
new osg::Impostor,
"Impostor",
"Object Node Impostor LOD Group",
&Impostor_readLocalData,

View File

@@ -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
(
osgNew osg::LOD,
new osg::LOD,
"LOD",
"Object Node LOD Group",
&LOD_readLocalData,

View File

@@ -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
(
osgNew osg::Light,
new osg::Light,
"Light",
"Object StateAttribute Light",
&Light_readLocalData,

View File

@@ -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
(
osgNew osg::LightModel,
new osg::LightModel,
"LightModel",
"Object StateAttribute LightModel",
&LightModel_readLocalData,

View File

@@ -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
(
osgNew osg::LightSource,
new osg::LightSource,
"LightSource",
"Object Node LightSource",
&LightSource_readLocalData,

View File

@@ -16,7 +16,7 @@ bool LineStipple_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_LineStippleProxy
(
osgNew osg::LineStipple,
new osg::LineStipple,
"LineStipple",
"Object StateAttribute LineStipple",
&LineStipple_readLocalData,

View File

@@ -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
(
osgNew osg::LineWidth,
new osg::LineWidth,
"LineWidth",
"Object StateAttribute LineWidth",
&LineWidth_readLocalData,

View File

@@ -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
(
osgNew osg::Material,
new osg::Material,
"Material",
"Object StateAttribute Material",
&Material_readLocalData,

View File

@@ -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
(
osgNew osg::Matrix,
new osg::Matrix,
"Matrix",
"Object Matrix",
&Matrix_readLocalData,

View File

@@ -14,7 +14,7 @@ bool MatrixTransform_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_MatrixTransformProxy
(
osgNew osg::MatrixTransform,
new osg::MatrixTransform,
"MatrixTransform",
"Object Node Transform MatrixTransform Group",
&MatrixTransform_readLocalData,
@@ -25,7 +25,7 @@ RegisterDotOsgWrapperProxy g_MatrixTransformProxy
// register old style 'DCS' read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_DCSProxy
(
osgNew osg::MatrixTransform,
new osg::MatrixTransform,
"DCS",
"Object Node Group DCS",
&MatrixTransform_readLocalData,
@@ -63,7 +63,7 @@ bool MatrixTransform_readLocalData(Object& obj, Input& fr)
transform.setMatrix(*tmpMatrix);
osgDelete tmpMatrix;
delete tmpMatrix;
iteratorAdvanced = true;
}

View File

@@ -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
(
osgNew osg::Node,
new 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 = osgNew osg::StateSet;
static ref_ptr<StateSet> s_drawstate = new osg::StateSet;
if (StateSet* readState = static_cast<StateSet*>(fr.readObjectOfType(*s_drawstate)))
{
node.setStateSet(readState);

View File

@@ -14,7 +14,7 @@ bool OccluderNode_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_OccluderNodeProxy
(
osgNew osg::OccluderNode,
new osg::OccluderNode,
"OccluderNode",
"Object Node OccluderNode Group",
&OccluderNode_readLocalData,
@@ -27,7 +27,7 @@ bool OccluderNode_readLocalData(Object& obj, Input& fr)
OccluderNode& occludernode = static_cast<OccluderNode&>(obj);
static ref_ptr<ConvexPlanarOccluder> s_occluder = osgNew ConvexPlanarOccluder;
static ref_ptr<ConvexPlanarOccluder> s_occluder = new ConvexPlanarOccluder;
ConvexPlanarOccluder* tmpOccluder = static_cast<ConvexPlanarOccluder*>(fr.readObjectOfType(*s_occluder));

View File

@@ -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
(
osgNew osg::Point,
new osg::Point,
"Point",
"Object StateAttribute Point",
&Point_readLocalData,

View File

@@ -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
(
osgNew osg::PolygonMode,
new osg::PolygonMode,
"PolygonMode",
"Object StateAttribute PolygonMode",
&PolygonMode_readLocalData,

View File

@@ -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
(
osgNew osg::PolygonOffset,
new osg::PolygonOffset,
"PolygonOffset",
"Object StateAttribute PolygonOffset",
&PolygonOffset_readLocalData,

View File

@@ -14,7 +14,7 @@ bool PositionAttitudeTransform_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_PositionAttitudeTransformProxy
(
osgNew osg::PositionAttitudeTransform,
new osg::PositionAttitudeTransform,
"PositionAttitudeTransform",
"Object Node Transform PositionAttitudeTransform Group",
&PositionAttitudeTransform_readLocalData,

View File

@@ -15,7 +15,7 @@ bool Projection_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_ProjectionProxy
(
osgNew osg::Projection,
new osg::Projection,
"Projection",
"Object Node Group Projection",
&Projection_readLocalData,

View File

@@ -53,7 +53,7 @@ class OSGReaderWriter : public ReaderWriter
}
else
{
Group* group = osgNew Group;
Group* group = new Group;
group->setName("import group");
for(NodeList::iterator itr=nodeList.begin();
itr!=nodeList.end();

View File

@@ -14,7 +14,7 @@ bool Sequence_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_SequenceProxy
(
osgNew osg::Sequence,
new osg::Sequence,
"Sequence",
"Object Node Switch Sequence Group",
&Sequence_readLocalData,

View File

@@ -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
(
osgNew osg::ShadeModel,
new osg::ShadeModel,
"ShadeModel",
"Object StateAttribute ShadeModel",
&ShadeModel_readLocalData,

View File

@@ -14,7 +14,7 @@ bool ShapeDrawable_writeLocalData(const Object& obj, Output& fw);
//register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_ShapeDrawableFuncProxy
(
osgNew osg::ShapeDrawable,
new osg::ShapeDrawable,
"ShapeDrawable",
"Object Drawable ShapeDrawable",
&ShapeDrawable_readLocalData,

View File

@@ -27,7 +27,7 @@ const char* StateSet_getRenderBinModeStr(StateSet::RenderBinMode mode);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_StateSetFuncProxy
(
osgNew osg::StateSet,
new osg::StateSet,
"StateSet",
"Object StateSet",
&StateSet_readLocalData,
@@ -38,7 +38,7 @@ RegisterDotOsgWrapperProxy g_StateSetFuncProxy
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_GeoStateFuncProxy
(
osgNew osg::StateSet,
new osg::StateSet,
"GeoState",
"Object GeoState",
&GeoState_readLocalData,

View File

@@ -21,7 +21,7 @@ const char* Stencil_getOperationStr(Stencil::Operation op);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_StencilProxy
(
osgNew osg::Stencil,
new osg::Stencil,
"Stencil",
"Object StateAttribute Stencil",
&Stencil_readLocalData,

View File

@@ -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
(
osgNew osg::Switch,
new osg::Switch,
"Switch",
"Object Node Switch Group",
&Switch_readLocalData,

View File

@@ -16,7 +16,7 @@ const char* TexEnv_getModeStr(TexEnv::Mode mode);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_TexEnvProxy
(
osgNew osg::TexEnv,
new osg::TexEnv,
"TexEnv",
"Object StateAttribute TexEnv",
&TexEnv_readLocalData,

View File

@@ -23,7 +23,7 @@ const char* TexEnvCombine_getOperandParamStr(GLint value);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_TexEnvCombineProxy
(
osgNew osg::TexEnvCombine,
new osg::TexEnvCombine,
"TexEnvCombine",
"Object StateAttribute TexEnvCombine",
&TexEnvCombine_readLocalData,

View File

@@ -20,7 +20,7 @@ const char* TexGen_getModeStr(TexGen::Mode mode);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_TexGenProxy
(
osgNew osg::TexGen,
new osg::TexGen,
"TexGen",
"Object StateAttribute TexGen",
&TexGen_readLocalData,

View File

@@ -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
(
osgNew osg::TexMat,
new osg::TexMat,
"TexMat",
"Object StateAttribute TexMat",
&TexMat_readLocalData,

View File

@@ -23,7 +23,7 @@ const char* Texture1D_getInternalFormatStr(int value);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_Texture1DProxy
(
osgNew osg::Texture1D,
new osg::Texture1D,
"Texture1D",
"Object StateAttribute Texture1D TextureBase",
&Texture1D_readLocalData,

View File

@@ -22,7 +22,7 @@ const char* Texture2D_getInternalFormatStr(int value);
RegisterDotOsgWrapperProxy g_OldTextureProxy
(
osgNew osg::Texture2D,
new osg::Texture2D,
"Texture",
"Object StateAttribute Texture2D TextureBase",
0,
@@ -32,7 +32,7 @@ RegisterDotOsgWrapperProxy g_OldTextureProxy
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_Texture2DProxy
(
osgNew osg::Texture2D,
new osg::Texture2D,
"Texture2D",
"Object StateAttribute Texture2D TextureBase",
&Texture2D_readLocalData,

View File

@@ -23,7 +23,7 @@ const char* Texture3D_getInternalFormatStr(int value);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_Texture3DProxy
(
osgNew osg::Texture3D,
new osg::Texture3D,
"Texture3D",
"Object StateAttribute Texture3D TextureBase",
&Texture3D_readLocalData,

View File

@@ -14,7 +14,7 @@ bool TextureCubeMap_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_TextureCubeMapProxy
(
osgNew osg::TextureCubeMap,
new osg::TextureCubeMap,
"TextureCubeMap",
"Object StateAttribute TextureCubeMap TextureBase",
&TextureCubeMap_readLocalData,

View File

@@ -17,7 +17,7 @@ bool Transform_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_TransformProxy
(
osgNew osg::Transform,
new osg::Transform,
"Transform",
"Object Node Transform Group",
&Transform_readLocalData,

View File

@@ -14,7 +14,7 @@ bool AccelOperator_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy AccelOperator_Proxy
(
osgNew osgParticle::AccelOperator,
new osgParticle::AccelOperator,
"AccelOperator",
"Object Operator AccelOperator",
AccelOperator_readLocalData,

View File

@@ -12,7 +12,7 @@ bool FluidFrictionOperator_writeLocalData(const osg::Object &obj, osgDB::Output
osgDB::RegisterDotOsgWrapperProxy FluidFrictionOperator_Proxy
(
osgNew osgParticle::FluidFrictionOperator,
new osgParticle::FluidFrictionOperator,
"FluidFrictionOperator",
"Object Operator FluidFrictionOperator",
FluidFrictionOperator_readLocalData,

View File

@@ -14,7 +14,7 @@ bool ForceOperator_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy ForceOperator_Proxy
(
osgNew osgParticle::ForceOperator,
new osgParticle::ForceOperator,
"ForceOperator",
"Object Operator ForceOperator",
ForceOperator_readLocalData,

View File

@@ -10,7 +10,7 @@ bool LinearInterpolator_writeLocalData(const osg::Object &obj, osgDB::Output &f
osgDB::RegisterDotOsgWrapperProxy LinearInterpolator_Proxy
(
osgNew osgParticle::LinearInterpolator,
new osgParticle::LinearInterpolator,
"LinearInterpolator",
"Object Interpolator LinearInterpolator",
LinearInterpolator_readLocalData,

View File

@@ -13,7 +13,7 @@ bool ModularEmitter_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy ModularEmitter_Proxy
(
osgNew osgParticle::ModularEmitter,
new osgParticle::ModularEmitter,
"ModularEmitter",
"Object Node ParticleProcessor Emitter ModularEmitter",
ModularEmitter_readLocalData,

View File

@@ -13,7 +13,7 @@ bool ModularProgram_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy ModularProgram_Proxy
(
osgNew osgParticle::ModularProgram,
new osgParticle::ModularProgram,
"ModularProgram",
"Object Node ParticleProcessor Program ModularProgram",
ModularProgram_readLocalData,

View File

@@ -14,7 +14,7 @@ bool MultiSegmentPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &f
osgDB::RegisterDotOsgWrapperProxy MultiSegmentPlacer_Proxy
(
osgNew osgParticle::MultiSegmentPlacer,
new osgParticle::MultiSegmentPlacer,
"MultiSegmentPlacer",
"Object Placer MultiSegmentPlacer",
MultiSegmentPlacer_readLocalData,

View File

@@ -30,7 +30,7 @@ bool ParticleProcessor_readLocalData(osg::Object &obj, osgDB::Input &fr)
osgParticle::ParticleProcessor &myobj = static_cast<osgParticle::ParticleProcessor &>(obj);
bool itAdvanced = false;
osg::ref_ptr<osgParticle::ParticleSystem> ps_proto = osgNew osgParticle::ParticleSystem;
osg::ref_ptr<osgParticle::ParticleSystem> ps_proto = new osgParticle::ParticleSystem;
osgParticle::ParticleSystem *ps = static_cast<osgParticle::ParticleSystem *>(fr.readObjectOfType(*ps_proto));
if (ps) {

View File

@@ -18,7 +18,7 @@ bool ParticleSystem_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy ParticleSystem_Proxy
(
osgNew osgParticle::ParticleSystem,
new osgParticle::ParticleSystem,
"ParticleSystem",
"Object Drawable ParticleSystem",
ParticleSystem_readLocalData,

View File

@@ -11,7 +11,7 @@ bool PSU_writeLocalData(const osg::Object &obj, osgDB::Output &fr);
osgDB::RegisterDotOsgWrapperProxy PSU_Proxy
(
osgNew osgParticle::ParticleSystemUpdater,
new osgParticle::ParticleSystemUpdater,
"ParticleSystemUpdater",
"Object Node ParticleSystemUpdater",
PSU_readLocalData,
@@ -23,7 +23,7 @@ bool PSU_readLocalData(osg::Object &obj, osgDB::Input &fr)
osgParticle::ParticleSystemUpdater &myobj = static_cast<osgParticle::ParticleSystemUpdater &>(obj);
bool itAdvanced = false;
osg::ref_ptr<osgParticle::ParticleSystem> proto = osgNew osgParticle::ParticleSystem;
osg::ref_ptr<osgParticle::ParticleSystem> proto = new osgParticle::ParticleSystem;
osgParticle::ParticleSystem *ps = static_cast<osgParticle::ParticleSystem *>(fr.readObjectOfType(*proto));
if (ps) {
myobj.addParticleSystem(ps);

View File

@@ -10,7 +10,7 @@ bool PointPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy PointPlacer_Proxy
(
osgNew osgParticle::PointPlacer,
new osgParticle::PointPlacer,
"PointPlacer",
"Object Placer CenteredPlacer PointPlacer",
PointPlacer_readLocalData,

View File

@@ -11,7 +11,7 @@ bool RadialShooter_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy RadialShooter_Proxy
(
osgNew osgParticle::RadialShooter,
new osgParticle::RadialShooter,
"RadialShooter",
"Object Shooter RadialShooter",
RadialShooter_readLocalData,

View File

@@ -12,7 +12,7 @@ bool RandomRateCounter_writeLocalData(const osg::Object &obj, osgDB::Output &fw
osgDB::RegisterDotOsgWrapperProxy RandomRateCounter_Proxy
(
osgNew osgParticle::RandomRateCounter,
new osgParticle::RandomRateCounter,
"RandomRateCounter",
"Object Counter VariableRateCounter RandomRateCounter",
RandomRateCounter_readLocalData,

View File

@@ -12,7 +12,7 @@ bool SectorPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy SectorPlacer_Proxy
(
osgNew osgParticle::SectorPlacer,
new osgParticle::SectorPlacer,
"SectorPlacer",
"Object Placer CenteredPlacer SectorPlacer",
SectorPlacer_readLocalData,

View File

@@ -14,7 +14,7 @@ bool SegmentPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy SegmentPlacer_Proxy
(
osgNew osgParticle::SegmentPlacer,
new osgParticle::SegmentPlacer,
"SegmentPlacer",
"Object Placer SegmentPlacer",
SegmentPlacer_readLocalData,

View File

@@ -45,7 +45,7 @@ bool BitmapFont_readLocalData(osg::Object &obj, osgDB::Input &fr);
osgDB::RegisterDotOsgWrapperProxy BitmapFont_Proxy
(
osgNew osgText::BitmapFont,
new osgText::BitmapFont,
"BitmapFont",
"Object Font RasterFont BitmapFont",
BitmapFont_readLocalData,
@@ -60,7 +60,7 @@ bool BitmapFont_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr[0].matchWord("parameters")) {
int psize;
if (fr[1].getInt(psize) && fr[2].isInt() && fr[3].isString()) {
osgText::BitmapFont *temp = osgNew osgText::BitmapFont(std::string(fr[3].getStr()), psize);
osgText::BitmapFont *temp = new osgText::BitmapFont(std::string(fr[3].getStr()), psize);
temp->copyAndInvalidate(myobj);
fr += 4;
itAdvanced = true;
@@ -79,7 +79,7 @@ bool PixmapFont_readLocalData(osg::Object &obj, osgDB::Input &fr);
osgDB::RegisterDotOsgWrapperProxy PixmapFont_Proxy
(
osgNew osgText::PixmapFont,
new osgText::PixmapFont,
"PixmapFont",
"Object Font RasterFont PixmapFont",
PixmapFont_readLocalData,
@@ -94,7 +94,7 @@ bool PixmapFont_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr[0].matchWord("parameters")) {
int psize;
if (fr[1].getInt(psize) && fr[2].isInt() && fr[3].isString()) {
osgText::PixmapFont *temp = osgNew osgText::PixmapFont(std::string(fr[3].getStr()), psize);
osgText::PixmapFont *temp = new osgText::PixmapFont(std::string(fr[3].getStr()), psize);
temp->copyAndInvalidate(myobj);
fr += 4;
itAdvanced = true;
@@ -112,7 +112,7 @@ bool TextureFont_readLocalData(osg::Object &obj, osgDB::Input &fr);
osgDB::RegisterDotOsgWrapperProxy TextureFont_Proxy
(
osgNew osgText::TextureFont,
new osgText::TextureFont,
"TextureFont",
"Object Font RasterFont TextureFont",
TextureFont_readLocalData,
@@ -127,7 +127,7 @@ bool TextureFont_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr[0].matchWord("parameters")) {
int psize, txsize;
if (fr[1].getInt(psize) && fr[2].getInt(txsize) && fr[3].isString()) {
osgText::TextureFont *temp = osgNew osgText::TextureFont(std::string(fr[3].getStr()), psize, txsize);
osgText::TextureFont *temp = new osgText::TextureFont(std::string(fr[3].getStr()), psize, txsize);
temp->copyAndInvalidate(myobj);
fr += 4;
itAdvanced = true;
@@ -146,7 +146,7 @@ bool OutlineFont_readLocalData(osg::Object &obj, osgDB::Input &fr);
osgDB::RegisterDotOsgWrapperProxy OutlineFont_Proxy
(
osgNew osgText::OutlineFont,
new osgText::OutlineFont,
"OutlineFont",
"Object Font VectorFont OutlineFont",
OutlineFont_readLocalData,
@@ -161,7 +161,7 @@ bool OutlineFont_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr[0].matchWord("parameters")) {
int psize;
if (fr[1].getInt(psize) && fr[2].isInt() && fr[3].isString()) {
osgText::OutlineFont *temp = osgNew osgText::OutlineFont(std::string(fr[3].getStr()), psize, 1);
osgText::OutlineFont *temp = new osgText::OutlineFont(std::string(fr[3].getStr()), psize, 1);
temp->copyAndInvalidate(myobj);
fr += 4;
itAdvanced = true;
@@ -179,7 +179,7 @@ bool PolygonFont_readLocalData(osg::Object &obj, osgDB::Input &fr);
osgDB::RegisterDotOsgWrapperProxy PolygonFont_Proxy
(
osgNew osgText::PolygonFont,
new osgText::PolygonFont,
"PolygonFont",
"Object Font VectorFont PolygonFont",
PolygonFont_readLocalData,
@@ -194,7 +194,7 @@ bool PolygonFont_readLocalData(osg::Object &obj, osgDB::Input &fr)
if (fr[0].matchWord("parameters")) {
int psize;
if (fr[1].getInt(psize) && fr[2].isInt() && fr[3].isString()) {
osgText::PolygonFont *temp = osgNew osgText::PolygonFont(std::string(fr[3].getStr()), psize, 1);
osgText::PolygonFont *temp = new osgText::PolygonFont(std::string(fr[3].getStr()), psize, 1);
temp->copyAndInvalidate(myobj);
fr += 4;
itAdvanced = true;

View File

@@ -15,7 +15,7 @@ bool Paragraph_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
// osgDB::RegisterDotOsgWrapperProxy Paragraph_Proxy
// (
// osgNew osgText::Paragraph,
// new osgText::Paragraph,
// "Paragraph",
// "Object Node Geode Paragraph",
// Paragraph_readLocalData,

View File

@@ -16,7 +16,7 @@ bool Text_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy Text_Proxy
(
osgNew osgText::Text,
new osgText::Text,
"Text",
"Object Drawable Text",
Text_readLocalData,

View File

@@ -358,7 +358,7 @@ class ReaderWriterRGB : public osgDB::ReaderWriter
RawImageGetData(raw, &data);
RawImageClose(raw);
Image* image = osgNew Image();
Image* image = new Image();
image->setFileName(fileName.c_str());
image->setImage(s,t,r,
internalFormat,