From Frashid Lashkari, added support for PointSprites to .ive
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()");
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -58,6 +58,7 @@ CXXFILES =\
|
||||
OccluderNode.cpp\
|
||||
PagedLOD.cpp\
|
||||
Point.cpp\
|
||||
PointSprite.cpp\
|
||||
PolygonMode.cpp\
|
||||
PolygonOffset.cpp\
|
||||
PositionAttitudeTransform.cpp\
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace ive {
|
||||
#define IVESCISSOR 0x00001128
|
||||
#define IVEPOLYGONMODE 0x00001129
|
||||
#define IVETEXTURERECTANGLE 0x00001130
|
||||
#define IVEPOINTSPRITE 0x00001131
|
||||
|
||||
// Drawables
|
||||
#define IVEDRAWABLE 0x00001000
|
||||
|
||||
Reference in New Issue
Block a user