Fixes for VS6.0

This commit is contained in:
Robert Osfield 2005-11-10 20:04:16 +00:00
parent 435e4b828c
commit 6fb7ff83d7
2 changed files with 65 additions and 63 deletions

View File

@ -10,6 +10,31 @@
#include <osgUtil/Optimizer> #include <osgUtil/Optimizer>
const int _eq_nb=8;
const osg::BlendEquation::Equation _equations[_eq_nb]=
{
osg::BlendEquation::FUNC_ADD,
osg::BlendEquation::FUNC_SUBTRACT,
osg::BlendEquation::FUNC_REVERSE_SUBTRACT,
osg::BlendEquation::RGBA_MIN,
osg::BlendEquation::RGBA_MAX,
osg::BlendEquation::ALPHA_MIN,
osg::BlendEquation::ALPHA_MAX,
osg::BlendEquation::LOGIC_OP
};
const char* _equations_name[_eq_nb]=
{
"osg::BlendEquation::FUNC_ADD",
"osg::BlendEquation::FUNC_SUBTRACT",
"osg::BlendEquation::FUNC_REVERSE_SUBTRACT",
"osg::BlendEquation::RGBA_MIN",
"osg::BlendEquation::RGBA_MAX",
"osg::BlendEquation::ALPHA_MIN",
"osg::BlendEquation::ALPHA_MAX",
"osg::BlendEquation::LOGIC_OP"
};
class TechniqueEventHandler : public osgGA::GUIEventHandler class TechniqueEventHandler : public osgGA::GUIEventHandler
{ {
@ -34,32 +59,9 @@ protected:
osg::BlendEquation* _blendEq; osg::BlendEquation* _blendEq;
static const int _eq_nb=8;
int _eq_index; int _eq_index;
static const osg::BlendEquation::Equation _equations[_eq_nb];
static const char* _equations_name[_eq_nb];
}; };
const osg::BlendEquation::Equation TechniqueEventHandler::_equations[_eq_nb]={
osg::BlendEquation::FUNC_ADD,
osg::BlendEquation::FUNC_SUBTRACT,
osg::BlendEquation::FUNC_REVERSE_SUBTRACT,
osg::BlendEquation::RGBA_MIN,
osg::BlendEquation::RGBA_MAX,
osg::BlendEquation::ALPHA_MIN,
osg::BlendEquation::ALPHA_MAX,
osg::BlendEquation::LOGIC_OP
};
const char* TechniqueEventHandler::_equations_name[_eq_nb]={
"osg::BlendEquation::FUNC_ADD",
"osg::BlendEquation::FUNC_SUBTRACT",
"osg::BlendEquation::FUNC_REVERSE_SUBTRACT",
"osg::BlendEquation::RGBA_MIN",
"osg::BlendEquation::RGBA_MAX",
"osg::BlendEquation::ALPHA_MIN",
"osg::BlendEquation::ALPHA_MAX",
"osg::BlendEquation::LOGIC_OP"
};

View File

@ -10,6 +10,46 @@
#include <osgUtil/Optimizer> #include <osgUtil/Optimizer>
const int _ops_nb=16;
const osg::LogicOp::Opcode _operations[_ops_nb]=
{
osg::LogicOp::CLEAR,
osg::LogicOp::SET,
osg::LogicOp::COPY,
osg::LogicOp::COPY_INVERTED,
osg::LogicOp::NOOP,
osg::LogicOp::INVERT,
osg::LogicOp::AND,
osg::LogicOp::NAND,
osg::LogicOp::OR,
osg::LogicOp::NOR,
osg::LogicOp::XOR,
osg::LogicOp::EQUIV,
osg::LogicOp::AND_REVERSE,
osg::LogicOp::AND_INVERTED,
osg::LogicOp::OR_REVERSE,
osg::LogicOp::OR_INVERTED
};
const char* _ops_name[_ops_nb]=
{
"osg::LogicOp::CLEAR",
"osg::LogicOp::SET",
"osg::LogicOp::COPY",
"osg::LogicOp::COPY_INVERTED",
"osg::LogicOp::NOOP",
"osg::LogicOp::INVERT",
"osg::LogicOp::AND",
"osg::LogicOp::NAND",
"osg::LogicOp::OR",
"osg::LogicOp::NOR",
"osg::LogicOp::XOR",
"osg::LogicOp::EQUIV",
"osg::LogicOp::AND_REVERSE",
"osg::LogicOp::AND_INVERTED",
"osg::LogicOp::OR_REVERSE",
"osg::LogicOp::OR_INVERTED"
};
class TechniqueEventHandler : public osgGA::GUIEventHandler class TechniqueEventHandler : public osgGA::GUIEventHandler
{ {
@ -34,49 +74,9 @@ protected:
osg::LogicOp* _logicOp; osg::LogicOp* _logicOp;
static const int _ops_nb=16;
int _ops_index; int _ops_index;
static const osg::LogicOp::Opcode _operations[_ops_nb];
static const char* _ops_name[_ops_nb];
}; };
const osg::LogicOp::Opcode TechniqueEventHandler::_operations[_ops_nb]={
osg::LogicOp::CLEAR,
osg::LogicOp::SET,
osg::LogicOp::COPY,
osg::LogicOp::COPY_INVERTED,
osg::LogicOp::NOOP,
osg::LogicOp::INVERT,
osg::LogicOp::AND,
osg::LogicOp::NAND,
osg::LogicOp::OR,
osg::LogicOp::NOR,
osg::LogicOp::XOR,
osg::LogicOp::EQUIV,
osg::LogicOp::AND_REVERSE,
osg::LogicOp::AND_INVERTED,
osg::LogicOp::OR_REVERSE,
osg::LogicOp::OR_INVERTED
};
const char* TechniqueEventHandler::_ops_name[_ops_nb]={
"osg::LogicOp::CLEAR",
"osg::LogicOp::SET",
"osg::LogicOp::COPY",
"osg::LogicOp::COPY_INVERTED",
"osg::LogicOp::NOOP",
"osg::LogicOp::INVERT",
"osg::LogicOp::AND",
"osg::LogicOp::NAND",
"osg::LogicOp::OR",
"osg::LogicOp::NOR",
"osg::LogicOp::XOR",
"osg::LogicOp::EQUIV",
"osg::LogicOp::AND_REVERSE",
"osg::LogicOp::AND_INVERTED",
"osg::LogicOp::OR_REVERSE",
"osg::LogicOp::OR_INVERTED"
};
bool TechniqueEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&) bool TechniqueEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&)
{ {