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
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\src\osgPlugins\ive\PointSprite.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.cpp
|
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -741,6 +745,10 @@ SOURCE=..\..\..\src\osgPlugins\ive\Point.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\src\osgPlugins\ive\PointSprite.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.h
|
SOURCE=..\..\..\src\osgPlugins\ive\PolygonMode.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#include "Viewport.h"
|
#include "Viewport.h"
|
||||||
#include "Scissor.h"
|
#include "Scissor.h"
|
||||||
#include "Image.h"
|
#include "Image.h"
|
||||||
|
#include "PointSprite.h"
|
||||||
|
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "MatrixTransform.h"
|
#include "MatrixTransform.h"
|
||||||
@@ -1026,6 +1027,10 @@ osg::StateAttribute* DataInputStream::readStateAttribute()
|
|||||||
attribute = new osg::Program();
|
attribute = new osg::Program();
|
||||||
((ive::Program*)(attribute))->read(this);
|
((ive::Program*)(attribute))->read(this);
|
||||||
}
|
}
|
||||||
|
else if(attributeID == IVEPOINTSPRITE){
|
||||||
|
attribute = new osg::PointSprite();
|
||||||
|
((ive::PointSprite*)(attribute))->read(this);
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
throw Exception("Unknown StateAttribute in StateSet::read()");
|
throw Exception("Unknown StateAttribute in StateSet::read()");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
#include "Viewport.h"
|
#include "Viewport.h"
|
||||||
#include "Scissor.h"
|
#include "Scissor.h"
|
||||||
#include "Image.h"
|
#include "Image.h"
|
||||||
|
#include "PointSprite.h"
|
||||||
|
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "MatrixTransform.h"
|
#include "MatrixTransform.h"
|
||||||
@@ -749,10 +750,14 @@ void DataOutputStream::writeStateAttribute(const osg::StateAttribute* attribute)
|
|||||||
else if(dynamic_cast<const osg::FrontFace*>(attribute)){
|
else if(dynamic_cast<const osg::FrontFace*>(attribute)){
|
||||||
((ive::FrontFace*)(attribute))->write(this);
|
((ive::FrontFace*)(attribute))->write(this);
|
||||||
}
|
}
|
||||||
// This is a FrontFace
|
// This is a Program
|
||||||
else if(dynamic_cast<const osg::Program*>(attribute)){
|
else if(dynamic_cast<const osg::Program*>(attribute)){
|
||||||
((ive::Program*)(attribute))->write(this);
|
((ive::Program*)(attribute))->write(this);
|
||||||
}
|
}
|
||||||
|
// This is a PointSprite
|
||||||
|
else if(dynamic_cast<const osg::PointSprite*>(attribute)){
|
||||||
|
((ive::PointSprite*)(attribute))->write(this);
|
||||||
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
std::string className = attribute->className();
|
std::string className = attribute->className();
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ CXXFILES =\
|
|||||||
OccluderNode.cpp\
|
OccluderNode.cpp\
|
||||||
PagedLOD.cpp\
|
PagedLOD.cpp\
|
||||||
Point.cpp\
|
Point.cpp\
|
||||||
|
PointSprite.cpp\
|
||||||
PolygonMode.cpp\
|
PolygonMode.cpp\
|
||||||
PolygonOffset.cpp\
|
PolygonOffset.cpp\
|
||||||
PositionAttitudeTransform.cpp\
|
PositionAttitudeTransform.cpp\
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ namespace ive {
|
|||||||
#define IVESCISSOR 0x00001128
|
#define IVESCISSOR 0x00001128
|
||||||
#define IVEPOLYGONMODE 0x00001129
|
#define IVEPOLYGONMODE 0x00001129
|
||||||
#define IVETEXTURERECTANGLE 0x00001130
|
#define IVETEXTURERECTANGLE 0x00001130
|
||||||
|
#define IVEPOINTSPRITE 0x00001131
|
||||||
|
|
||||||
// Drawables
|
// Drawables
|
||||||
#define IVEDRAWABLE 0x00001000
|
#define IVEDRAWABLE 0x00001000
|
||||||
|
|||||||
Reference in New Issue
Block a user