Updates for new use of GLushort instead of osg::ushort in GeoSet index pointer.
This commit is contained in:
@@ -926,7 +926,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
if (is_ushort)
|
||||
{
|
||||
// read ushorts...
|
||||
osg::ushort* coordIndexList = osgNew osg::ushort[capacity];
|
||||
GLushort* coordIndexList = osgNew GLushort[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -938,8 +938,8 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
{
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
osg::ushort* oldList = coordIndexList;
|
||||
coordIndexList = osgNew osg::ushort[capacity];
|
||||
GLushort* oldList = coordIndexList;
|
||||
coordIndexList = osgNew GLushort[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
coordIndexList[i] = oldList[i];
|
||||
@@ -962,7 +962,7 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
else
|
||||
{
|
||||
// read uints...
|
||||
osg::uint* coordIndexList = osgNew osg::uint[capacity];
|
||||
GLuint* coordIndexList = osgNew GLuint[capacity];
|
||||
|
||||
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
|
||||
{
|
||||
@@ -974,8 +974,8 @@ bool GeoSet_readIndexData(Input& fr, const char* IndexName, GeoSet::IndexPointer
|
||||
{
|
||||
int oldCapacity = capacity;
|
||||
while(capacity<=size) capacity *= 2;
|
||||
osg::uint* oldList = coordIndexList;
|
||||
coordIndexList = osgNew osg::uint[capacity];
|
||||
GLuint* oldList = coordIndexList;
|
||||
coordIndexList = osgNew GLuint[capacity];
|
||||
for(int i=0;i<oldCapacity;++i)
|
||||
{
|
||||
coordIndexList[i] = oldList[i];
|
||||
|
||||
@@ -536,7 +536,7 @@ osg::Drawable* ConvertFromPerformer::visitGeoSet(osg::Geode* osgGeode,pfGeoSet*
|
||||
|
||||
if(ilist)
|
||||
{
|
||||
osg::ushort* osg_cindex = new osg::ushort [nv];
|
||||
GLushort* osg_cindex = new GLushort [nv];
|
||||
for( i = 0; i < nv; i++ )
|
||||
{
|
||||
osg_cindex[i] = ilist[i];
|
||||
@@ -587,7 +587,7 @@ osg::Drawable* ConvertFromPerformer::visitGeoSet(osg::Geode* osgGeode,pfGeoSet*
|
||||
|
||||
if(ilist)
|
||||
{
|
||||
osg::ushort* osg_cindex = new osg::ushort [nn];
|
||||
GLushort* osg_cindex = new GLushort [nn];
|
||||
for( i = 0; i < nn; i++ )
|
||||
{
|
||||
osg_cindex[i] = ilist[i];
|
||||
@@ -637,7 +637,7 @@ osg::Drawable* ConvertFromPerformer::visitGeoSet(osg::Geode* osgGeode,pfGeoSet*
|
||||
|
||||
if(ilist)
|
||||
{
|
||||
osg::ushort* osg_cindex = new osg::ushort [nn];
|
||||
GLushort* osg_cindex = new GLushort [nn];
|
||||
for( i = 0; i < nn; i++ )
|
||||
{
|
||||
osg_cindex[i] = ilist[i];
|
||||
@@ -689,7 +689,7 @@ osg::Drawable* ConvertFromPerformer::visitGeoSet(osg::Geode* osgGeode,pfGeoSet*
|
||||
|
||||
if(ilist)
|
||||
{
|
||||
osg::ushort* osg_cindex = new osg::ushort [nn];
|
||||
GLushort* osg_cindex = new GLushort [nn];
|
||||
for( i = 0; i < nn; i++ )
|
||||
{
|
||||
osg_cindex[i] = ilist[i];
|
||||
|
||||
@@ -348,7 +348,7 @@ pfGeoSet* ConvertToPerformer::visitGeoSet(osg::GeoSet* geoset)
|
||||
}
|
||||
|
||||
osg::Vec3 *coords = geoset->getCoords();
|
||||
osg::ushort *ilist = cindex._ptr._ushort;
|
||||
GLushort *ilist = cindex._ptr._ushort;
|
||||
|
||||
// copy the vertex coordinates across.
|
||||
if( coords )
|
||||
|
||||
Reference in New Issue
Block a user