Preparation for moving osgGL2 out of the core OSG into its own seperate distribution.
This commit is contained in:
parent
22c695cdef
commit
16c55531da
@ -8,6 +8,8 @@ COMPILE_INTROSPECTION = no
|
|||||||
# should we compile any of the examples?
|
# should we compile any of the examples?
|
||||||
COMPILE_EXAMPLES ?= no
|
COMPILE_EXAMPLES ?= no
|
||||||
|
|
||||||
|
# should we compile the deprecated osgGL2 library.
|
||||||
|
COMPILE_osgGL2 ?= no
|
||||||
|
|
||||||
# follows are dependenices on the various plugins.
|
# follows are dependenices on the various plugins.
|
||||||
|
|
||||||
|
@ -20,9 +20,13 @@ SRC_DIRS = \
|
|||||||
osgParticle\
|
osgParticle\
|
||||||
osgText\
|
osgText\
|
||||||
osgSim\
|
osgSim\
|
||||||
osgGL2\
|
osgProducer
|
||||||
osgFX\
|
|
||||||
osgProducer\
|
ifeq ($(COMPILE_osgGL2),yes)
|
||||||
|
SRC_DIRS += osgGL2
|
||||||
|
endif
|
||||||
|
|
||||||
|
SRC_DIRS += osgFX
|
||||||
|
|
||||||
ifeq ($(GDAL_INSTALLED),yes)
|
ifeq ($(GDAL_INSTALLED),yes)
|
||||||
SRC_DIRS += osgTerrain
|
SRC_DIRS += osgTerrain
|
||||||
@ -42,6 +46,8 @@ WRAPPER_DIRS = \
|
|||||||
osg\
|
osg\
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Directories traversed in the TOPDIR/src/osgPlugins directory
|
# Directories traversed in the TOPDIR/src/osgPlugins directory
|
||||||
|
|
||||||
@ -237,6 +243,9 @@ EXAMPLE_DIRS = \
|
|||||||
osgvolume\
|
osgvolume\
|
||||||
osgwindows\
|
osgwindows\
|
||||||
|
|
||||||
|
ifeq ($(COMPILE_osgGL2),yes)
|
||||||
|
EXAMPLE_DIRS += osgGL2Shaders
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(COMPILE_INTROSPECTION),yes)
|
ifeq ($(COMPILE_INTROSPECTION),yes)
|
||||||
EXAMPLE_DIRS += osgintrospection
|
EXAMPLE_DIRS += osgintrospection
|
||||||
|
@ -116,9 +116,6 @@ Package=<4>
|
|||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgDB
|
Project_Dep_Name Core osgDB
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -723,9 +720,6 @@ Package=<4>
|
|||||||
Project_Dep_Name Core osgFX
|
Project_Dep_Name Core osgFX
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGA
|
Project_Dep_Name Core osgGA
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
@ -953,9 +947,6 @@ Package=<4>
|
|||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgFX
|
Project_Dep_Name Core osgFX
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -1461,9 +1452,6 @@ Package=<4>
|
|||||||
Project_Dep_Name Core osgGA
|
Project_Dep_Name Core osgGA
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgText
|
Project_Dep_Name Core osgText
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
@ -1580,9 +1568,6 @@ Package=<4>
|
|||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgFX
|
Project_Dep_Name Core osgFX
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -1607,9 +1592,6 @@ Package=<4>
|
|||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgFX
|
Project_Dep_Name Core osgFX
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -2459,9 +2441,6 @@ Package=<4>
|
|||||||
Begin Project Dependency
|
Begin Project Dependency
|
||||||
Project_Dep_Name Core osgFX
|
Project_Dep_Name Core osgFX
|
||||||
End Project Dependency
|
End Project Dependency
|
||||||
Begin Project Dependency
|
|
||||||
Project_Dep_Name Core osgGL2
|
|
||||||
End Project Dependency
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgdem.cpp\
|
osgdem.cpp\
|
||||||
|
|
||||||
LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
INSTFILES = \
|
INSTFILES = \
|
||||||
$(CXXFILES)\
|
$(CXXFILES)\
|
||||||
|
@ -5,7 +5,7 @@ CXXFILES =\
|
|||||||
osgdem.cpp\
|
osgdem.cpp\
|
||||||
|
|
||||||
|
|
||||||
LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgGL2 -losgDB -losgText -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -losgProducer -lProducer -losgTerrain -losgFX -losgDB -losgText -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
EXEC = osgdem
|
EXEC = osgdem
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ CXXFILES =\
|
|||||||
osgfxbrowser.cpp\
|
osgfxbrowser.cpp\
|
||||||
Frame.cpp\
|
Frame.cpp\
|
||||||
|
|
||||||
LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg -losgGL2 -losgFX $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg -losgFX $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
INSTFILES = \
|
INSTFILES = \
|
||||||
$(CXXFILES)\
|
$(CXXFILES)\
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgkeyboardmouse.cpp\
|
osgkeyboardmouse.cpp\
|
||||||
|
|
||||||
LIBS += -lProducer -losgFX -losgGL2 -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
|
LIBS += -lProducer -losgFX -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
|
||||||
|
|
||||||
INSTFILES = \
|
INSTFILES = \
|
||||||
$(CXXFILES)\
|
$(CXXFILES)\
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgkeyboardmouse.cpp\
|
osgkeyboardmouse.cpp\
|
||||||
|
|
||||||
LIBS += -lProducer -losgFX -losgGL2 -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -lProducer -losgFX -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
EXEC = osgkeyboardmouse
|
EXEC = osgkeyboardmouse
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgsimplepager.cpp\
|
osgsimplepager.cpp\
|
||||||
|
|
||||||
LIBS += -lProducer -losgFX -losgGL2 -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
|
LIBS += -lProducer -losgFX -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
|
||||||
|
|
||||||
INSTFILES = \
|
INSTFILES = \
|
||||||
$(CXXFILES)\
|
$(CXXFILES)\
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgsimplepager.cpp\
|
osgsimplepager.cpp\
|
||||||
|
|
||||||
LIBS += -lProducer -losgFX -losgGL2 -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -lProducer -losgFX -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
EXEC = osgsimplepager
|
EXEC = osgsimplepager
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
|
|||||||
CXXFILES =\
|
CXXFILES =\
|
||||||
osgsimulation.cpp\
|
osgsimulation.cpp\
|
||||||
|
|
||||||
LIBS += -losgTerrain -losgFX -losgGL2 -losgProducer -lProducer -losgParticle -losgSim -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
LIBS += -losgTerrain -losgFX -losgProducer -lProducer -losgParticle -losgSim -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
INSTFILES = \
|
INSTFILES = \
|
||||||
$(CXXFILES)\
|
$(CXXFILES)\
|
||||||
|
@ -30,14 +30,14 @@ osgclip cow.osg
|
|||||||
echo osgcubemap
|
echo osgcubemap
|
||||||
osgcubemap cessna.osg
|
osgcubemap cessna.osg
|
||||||
|
|
||||||
echo osgdepthshadow
|
# echo osgdepthshadow
|
||||||
osgdepthshadow
|
# osgdepthshadow
|
||||||
|
|
||||||
echo osgdistortion
|
echo osgdistortion
|
||||||
osgdistortion cow.osg
|
osgdistortion cow.osg
|
||||||
|
|
||||||
echo osgforest
|
#echo osgforest
|
||||||
osgforest
|
#osgforest
|
||||||
|
|
||||||
echo osgfxbrowser
|
echo osgfxbrowser
|
||||||
osgfxbrowser dumptruck.osg
|
osgfxbrowser dumptruck.osg
|
||||||
@ -96,8 +96,8 @@ osgplanets
|
|||||||
echo osgprerender
|
echo osgprerender
|
||||||
osgprerender dumptruck.osg
|
osgprerender dumptruck.osg
|
||||||
|
|
||||||
echo osgprerendercubemap
|
#echo osgprerendercubemap
|
||||||
osgprerendercubemap
|
#osgprerendercubemap
|
||||||
|
|
||||||
echo osgreflect
|
echo osgreflect
|
||||||
osgreflect cessna.osg
|
osgreflect cessna.osg
|
||||||
|
@ -10,8 +10,9 @@
|
|||||||
#include <osg/TexEnv>
|
#include <osg/TexEnv>
|
||||||
#include <osg/LineWidth>
|
#include <osg/LineWidth>
|
||||||
#include <osg/Material>
|
#include <osg/Material>
|
||||||
|
#include <osg/Program>
|
||||||
|
#include <osg/Shader>
|
||||||
|
|
||||||
#include <osgGL2/ProgramObject>
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -44,7 +45,6 @@ namespace
|
|||||||
// register a prototype for this effect
|
// register a prototype for this effect
|
||||||
Registry::Proxy proxy(new Cartoon);
|
Registry::Proxy proxy(new Cartoon);
|
||||||
|
|
||||||
|
|
||||||
// default technique class
|
// default technique class
|
||||||
class DefaultTechnique: public Technique {
|
class DefaultTechnique: public Technique {
|
||||||
public:
|
public:
|
||||||
@ -152,12 +152,11 @@ namespace
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// A port of Marco Jez's "cartoon.cg" to the OpenGL Shading Language
|
// A port of Marco Jez's "cartoon.cg" to the OpenGL Shading Language
|
||||||
// using osgGL2 by Mike Weiblen 2003-10-03.
|
// by Mike Weiblen 2003-10-03,
|
||||||
//
|
//
|
||||||
// This shader is simplified due to limitations in the OGLSL implementation
|
// This shader is simplified due to limitations in the OGLSL implementation
|
||||||
// in the current 3Dlabs driver. As the OGLSL implementation improves,
|
// in the current 3Dlabs driver. As the OGLSL implementation improves,
|
||||||
// need to revisit and enhance this shader.
|
// need to revisit and enhance this shader.
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
class OGLSL_Technique : public Technique {
|
class OGLSL_Technique : public Technique {
|
||||||
@ -178,7 +177,6 @@ namespace
|
|||||||
{
|
{
|
||||||
// implement pass #1 (solid surfaces)
|
// implement pass #1 (solid surfaces)
|
||||||
{
|
{
|
||||||
|
|
||||||
const char * vert_source =
|
const char * vert_source =
|
||||||
"const vec3 LightPosition = vec3( 0.0, 2.0, 4.0 );"
|
"const vec3 LightPosition = vec3( 0.0, 2.0, 4.0 );"
|
||||||
"varying float CartoonTexCoord;"
|
"varying float CartoonTexCoord;"
|
||||||
@ -204,11 +202,13 @@ namespace
|
|||||||
polyoffset->setUnits(1.0f);
|
polyoffset->setUnits(1.0f);
|
||||||
ss->setAttributeAndModes(polyoffset.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
ss->setAttributeAndModes(polyoffset.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
||||||
|
|
||||||
osg::ref_ptr<osgGL2::ProgramObject> progObj = new osgGL2::ProgramObject;
|
osg::ref_ptr<osg::Program> program = new osg::Program;
|
||||||
progObj->addShader( new osgGL2::ShaderObject( osgGL2::ShaderObject::VERTEX, vert_source ) );
|
program->addShader( new osg::Shader( osg::Shader::VERTEX, vert_source ) );
|
||||||
progObj->addShader( new osgGL2::ShaderObject( osgGL2::ShaderObject::FRAGMENT, frag_source ) );
|
program->addShader( new osg::Shader( osg::Shader::FRAGMENT, frag_source ) );
|
||||||
progObj->setSampler( "CartoonTexUnit", 0 );
|
|
||||||
ss->setAttributeAndModes( progObj.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
|
ss->addUniform( new osg::Uniform("CartoonTexUnit", 0));
|
||||||
|
ss->setAttributeAndModes( program.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
|
||||||
ss->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF);
|
ss->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF);
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ CXXFILES =\
|
|||||||
Technique.cpp\
|
Technique.cpp\
|
||||||
Validator.cpp\
|
Validator.cpp\
|
||||||
|
|
||||||
|
LIBS += -losg -losgDB -losgUtil $(GL_LIBS) $(OTHER_LIBS) $(DYNAMICLIBRARYLIB)
|
||||||
|
|
||||||
LIBS += -losg -losgDB -losgUtil -losgGL2 $(GL_LIBS) $(OTHER_LIBS) $(DYNAMICLIBRARYLIB)
|
|
||||||
DEF += -DOSGFX_LIBRARY
|
DEF += -DOSGFX_LIBRARY
|
||||||
|
|
||||||
TARGET_BASENAME = osgFX
|
TARGET_BASENAME = osgFX
|
||||||
|
@ -80,7 +80,7 @@ CXXFILES =\
|
|||||||
VertexProgram.cpp\
|
VertexProgram.cpp\
|
||||||
VisibilityGroup.cpp\
|
VisibilityGroup.cpp\
|
||||||
|
|
||||||
LIBS += -losgFX -losgGL2 -losgSim -losgText $(OSG_LIBS) $(OTHER_LIBS)
|
LIBS += -losgFX -losgSim -losgText $(OSG_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
TARGET_BASENAME = ive
|
TARGET_BASENAME = ive
|
||||||
include $(TOPDIR)/Make/cygwin_plugin_def
|
include $(TOPDIR)/Make/cygwin_plugin_def
|
||||||
|
@ -19,7 +19,7 @@ CXXFILES =\
|
|||||||
|
|
||||||
INC += -I$(THISDIR)
|
INC += -I$(THISDIR)
|
||||||
|
|
||||||
LIBS += -losgFX -losgGL2 $(OSG_LIBS) $(OTHER_LIBS) $(GL_LIBS)
|
LIBS += -losgFX $(OSG_LIBS) $(OTHER_LIBS) $(GL_LIBS)
|
||||||
|
|
||||||
TARGET_BASENAME = lwo
|
TARGET_BASENAME = lwo
|
||||||
include $(TOPDIR)/Make/cygwin_plugin_def
|
include $(TOPDIR)/Make/cygwin_plugin_def
|
||||||
|
@ -11,7 +11,7 @@ CXXFILES =\
|
|||||||
IO_Effect.cpp\
|
IO_Effect.cpp\
|
||||||
|
|
||||||
|
|
||||||
LIBS += -losgFX -losgGL2 $(OSG_LIBS) $(OTHER_LIBS)
|
LIBS += -losgFX $(OSG_LIBS) $(OTHER_LIBS)
|
||||||
|
|
||||||
TARGET_BASENAME = osgFX
|
TARGET_BASENAME = osgFX
|
||||||
include $(TOPDIR)/Make/cygwin_plugin_def
|
include $(TOPDIR)/Make/cygwin_plugin_def
|
||||||
|
Loading…
Reference in New Issue
Block a user