From Frashid Lashkari, added support for PointSprites to .ive

This commit is contained in:
Robert Osfield
2006-11-16 16:42:11 +00:00
parent 2151573ccd
commit 052d44a440
5 changed files with 21 additions and 1 deletions

View File

@@ -381,6 +381,10 @@ SOURCE=..\..\..\src\osgPlugins\ive\Point.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\ive\PointSprite.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.cpp
# End Source File
# Begin Source File
@@ -741,6 +745,10 @@ SOURCE=..\..\..\src\osgPlugins\ive\Point.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\ive\PointSprite.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.h
# End Source File
# Begin Source File

View File

@@ -46,6 +46,7 @@
#include "Viewport.h"
#include "Scissor.h"
#include "Image.h"
#include "PointSprite.h"
#include "Group.h"
#include "MatrixTransform.h"
@@ -1026,6 +1027,10 @@ osg::StateAttribute* DataInputStream::readStateAttribute()
attribute = new osg::Program();
((ive::Program*)(attribute))->read(this);
}
else if(attributeID == IVEPOINTSPRITE){
attribute = new osg::PointSprite();
((ive::PointSprite*)(attribute))->read(this);
}
else{
throw Exception("Unknown StateAttribute in StateSet::read()");
}

View File

@@ -49,6 +49,7 @@
#include "Viewport.h"
#include "Scissor.h"
#include "Image.h"
#include "PointSprite.h"
#include "Group.h"
#include "MatrixTransform.h"
@@ -749,10 +750,14 @@ void DataOutputStream::writeStateAttribute(const osg::StateAttribute* attribute)
else if(dynamic_cast<const osg::FrontFace*>(attribute)){
((ive::FrontFace*)(attribute))->write(this);
}
// This is a FrontFace
// This is a Program
else if(dynamic_cast<const osg::Program*>(attribute)){
((ive::Program*)(attribute))->write(this);
}
// This is a PointSprite
else if(dynamic_cast<const osg::PointSprite*>(attribute)){
((ive::PointSprite*)(attribute))->write(this);
}
else{
std::string className = attribute->className();

View File

@@ -58,6 +58,7 @@ CXXFILES =\
OccluderNode.cpp\
PagedLOD.cpp\
Point.cpp\
PointSprite.cpp\
PolygonMode.cpp\
PolygonOffset.cpp\
PositionAttitudeTransform.cpp\

View File

@@ -76,6 +76,7 @@ namespace ive {
#define IVESCISSOR 0x00001128
#define IVEPOLYGONMODE 0x00001129
#define IVETEXTURERECTANGLE 0x00001130
#define IVEPOINTSPRITE 0x00001131
// Drawables
#define IVEDRAWABLE 0x00001000