From Andrew Bettison, "Attached are changes for src/osgPlugins/ive (version 2.4.0) that implement LineStipple read/write support for the ive file format."

This commit is contained in:
Robert Osfield
2008-06-19 14:14:20 +00:00
parent 37d81679b7
commit c3c727b822
4 changed files with 12 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ SET(TARGET_SRC
LightPoint.cpp
LightPointNode.cpp
LightSource.cpp
LineStipple.cpp
LineWidth.cpp
Locator.cpp
LOD.cpp
@@ -159,6 +160,7 @@ SET(TARGET_H
LightPoint.h
LightPointNode.h
LightSource.h
LineStipple.h
LineWidth.h
Locator.h
LOD.h

View File

@@ -31,6 +31,7 @@
#include "ShadeModel.h"
#include "Point.h"
#include "LineWidth.h"
#include "LineStipple.h"
#include "Texture1D.h"
#include "Texture2D.h"
#include "Texture3D.h"
@@ -1178,6 +1179,10 @@ osg::StateAttribute* DataInputStream::readStateAttribute()
attribute = new osg::Multisample();
((ive::Multisample*)(attribute))->read(this);
}
else if(attributeID == IVELINESTIPPLE){
attribute = new osg::LineStipple();
((ive::LineStipple*)(attribute))->read(this);
}
else if(attributeID == IVESTENCIL){
attribute = new osg::Stencil();
((ive::Stencil*)(attribute))->read(this);

View File

@@ -32,6 +32,7 @@
#include "ShadeModel.h"
#include "Point.h"
#include "LineWidth.h"
#include "LineStipple.h"
#include "Texture1D.h"
#include "Texture2D.h"
#include "Texture3D.h"
@@ -762,8 +763,9 @@ void DataOutputStream::writeStateAttribute(const osg::StateAttribute* attribute)
else if(dynamic_cast<const osg::LineWidth*>(attribute)){
((ive::LineWidth*)(attribute))->write(this);
}
else if(dynamic_cast<const osg::LineWidth*>(attribute)){
((ive::LineWidth*)(attribute))->write(this);
// This is a LineStipple
else if(dynamic_cast<const osg::LineStipple*>(attribute)){
((ive::LineStipple*)(attribute))->write(this);
}
// This is a Texture1D
else if(dynamic_cast<const osg::Texture1D*>(attribute)){

View File

@@ -84,6 +84,7 @@ namespace ive {
#define IVEPOINTSPRITE 0x00001131
#define IVEMULTISAMPLE 0x00001132
#define IVEFOG 0x00001133
#define IVELINESTIPPLE 0x00001134
// Drawables
#define IVEDRAWABLE 0x00001000