Added osgFX - Marco Jez's special effects nodekit.

This commit is contained in:
Robert Osfield
2003-08-26 21:17:22 +00:00
parent a782cbad60
commit 2c4c2ad068
22 changed files with 3520 additions and 157 deletions

View File

@@ -15,6 +15,7 @@ SRC_DIRS = \
osgText\
osgSim\
osgGL2\
osgFX\
osgProducer\
osgPlugins\
../examples
@@ -39,6 +40,7 @@ PLUGIN_DIRS = \
osgParticle\
osgText\
osgSim\
osgFX\
osg\
osgtgz\
pic\
@@ -120,6 +122,7 @@ EXAMPLE_DIRS = \
osggeometry\
osghangglide\
osghud\
osgfxbrowser\
osgimpostor\
osgkeyboard\
osglight\

View File

@@ -3,15 +3,17 @@ OSG News (most significant items from ChangeLog)
OpenSceneGraph-0.9.6
>>> Improved build support, thread safety and robustness.
>>> osgFX Special Effects nodekit, Improved build support, thread safety and robustness.
The 0.9.6 release is primiarily a release which tackles build and
stability problems under various platforms.
The new osgFX nodekit, written by Marco Jez, adds a set of decorator
nodes that add can be convienantly added above subgraphs in your scene
to add special a range of special rendering effects. Effects include AnisotopicLight, Scribe, Specular Highlights
and Cartoon rendering.
The key areas of work have been on OpenThreads and OpenProducer in
particular to improve thread safety and robustness on the Win32 platform.
Reported crashes on exit from osgProducer::Viewer based apps, and
freezes during runtime have been fixed.
Work has been on OpenThreads and OpenProducer, in particular to improve
thread safety and robustness on the Win32 platform. Reported crashes
on exit from osgProducer::Viewer based apps, and freezes during runtime
have been fixed.
Threading problems which caused crashes in recent updates of the Terrapage
loader have also been fixed, and additional internal changes have been made

View File

@@ -30,6 +30,24 @@ Package=<4>
###############################################################################
Project: "Core osgFX"=.\osgFX\osgFX.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Core osgGA"=.\osgGA\osgGA.dsp - Package Owner=<4>
Package=<5>
@@ -48,6 +66,27 @@ Package=<4>
###############################################################################
Project: "Core osgGL2"=.\osgGL2\osgGL2.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "Core osgParticle"=.\osgParticle\osgParticle.dsp - Package Owner=<4>
Package=<5>
@@ -114,27 +153,6 @@ Package=<4>
###############################################################################
Project: "Core osgGL2"=.\osgGL2\osgGL2.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "Core osgText"=.\osgText\osgText.dsp - Package Owner=<4>
Package=<5>
@@ -381,6 +399,39 @@ Package=<4>
###############################################################################
Project: "Example osgfxbrowser"=.\examples\osgfxbrowser\osgfxbrowser.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgFX
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgText
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Example osggeodemo"=.\examples\osggeodemo\osggeodemo.dsp - Package Owner=<4>
Package=<5>
@@ -462,36 +513,6 @@ Package=<4>
###############################################################################
Project: "Example slideshow3D"=.\examples\slideshow3D\slideshow3D.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgText
End Project Dependency
}}}
###############################################################################
Project: "Example osghud"=.\examples\osghud\osghud.dsp - Package Owner=<4>
Package=<5>
@@ -777,6 +798,36 @@ Package=<4>
###############################################################################
Project: "Example osgpick"=.\examples\osgpick\osgpick.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgText
End Project Dependency
}}}
###############################################################################
Project: "Example osgprerender"=.\examples\osgprerender\osgprerender.dsp - Package Owner=<4>
Package=<5>
@@ -1140,6 +1191,33 @@ Package=<4>
###############################################################################
Project: "Example osgtexture3D"=.\examples\osgtexture3D\osgtexture3D.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Example osgtexturerectangle"=.\examples\osgtexturerectangle\osgtexturerectangle.dsp - Package Owner=<4>
Package=<5>
@@ -1170,33 +1248,6 @@ Package=<4>
###############################################################################
Project: "Example osgtexture3D"=.\examples\osgtexture3D\osgtexture3D.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Example osgunittests"=.\examples\osgunittests\osgunittests.dsp - Package Owner=<4>
Package=<5>
@@ -1287,7 +1338,34 @@ Package=<4>
###############################################################################
Project: "Example osgpick"=.\examples\osgpick\osgpick.dsp - Package Owner=<4>
Project: "Example osgwindows"=.\examples\osgwindows\osgwindows.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Example slideshow3D"=.\examples\slideshow3D\slideshow3D.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -1317,7 +1395,7 @@ Package=<4>
###############################################################################
Project: "Example osgwindows"=.\examples\osgwindows\osgwindows.dsp - Package Owner=<4>
Project: "osgPlugin 3dc"=.\osgPlugins\3dc\3dc.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -1331,15 +1409,6 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
@@ -1401,6 +1470,24 @@ Package=<4>
###############################################################################
Project: "osgPlugin dds"=.\osgPlugins\dds\dds.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin directx"=.\osgPlugins\directx\directx.dsp - Package Owner=<4>
Package=<5>
@@ -1545,6 +1632,24 @@ Package=<4>
###############################################################################
Project: "osgPlugin ive"=.\osgPlugins\ive\ive.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin jpeg"=.\osgPlugins\jpeg\jpeg.dsp - Package Owner=<4>
Package=<5>
@@ -1563,7 +1668,7 @@ Package=<4>
###############################################################################
Project: "osgPlugin logo"=".\osgPlugins\logo\logo.dsp" - Package Owner=<4>
Project: "osgPlugin logo"=.\osgPlugins\logo\logo.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -1656,7 +1761,7 @@ Package=<4>
###############################################################################
Project: "osgPlugin ive"=.\osgPlugins\ive\ive.dsp - Package Owner=<4>
Project: "osgPlugin osgFX"=.\osgPlugins\osgFX\dot_osgFX.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -1670,6 +1775,9 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgFX
End Project Dependency
}}}
###############################################################################
@@ -1693,28 +1801,6 @@ Package=<4>
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin osgText"=.\osgPlugins\osgText\dot_osgText.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgText
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin osgSim"=.\osgPlugins\osgSim\dot_osgSim.dsp - Package Owner=<4>
@@ -1738,6 +1824,27 @@ Package=<4>
###############################################################################
Project: "osgPlugin osgText"=.\osgPlugins\osgText\dot_osgText.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgText
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin osgtgz"=.\osgPlugins\osgtgz\osgtgz.dsp - Package Owner=<4>
Package=<5>
@@ -1792,42 +1899,6 @@ Package=<4>
###############################################################################
Project: "osgPlugin rgb"=.\osgPlugins\rgb\rgb.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin 3dc"=.\osgPlugins\3dc\3dc.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
}}}
###############################################################################
Project: "osgPlugin pnm"=.\osgPlugins\pnm\pnm.dsp - Package Owner=<4>
Package=<5>
@@ -1846,7 +1917,7 @@ Package=<4>
###############################################################################
Project: "osgPlugin dds"=.\osgPlugins\dds\dds.dsp - Package Owner=<4>
Project: "osgPlugin rgb"=.\osgPlugins\rgb\rgb.dsp - Package Owner=<4>
Package=<5>
{{{

View File

@@ -0,0 +1,279 @@
# Microsoft Developer Studio Project File - Name="Example osgfxbrowser" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=Example osgfxbrowser - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "osgfxbrowser.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "osgfxbrowser.mak" CFG="Example osgfxbrowser - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Example osgfxbrowser - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "Example osgfxbrowser - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Example osgfxbrowser - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "../../../bin"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../bin"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /GZ /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib osgd.lib Producer.lib osgProducerd.lib osgUtild.lib osgDBd.lib osgUtild.lib osgGAd.lib osgTextd.lib /nologo /subsystem:console /pdb:"..\..\..\bin\osgfxbrowser.pdb" /debug /machine:IX86 /out:"..\..\..\bin\osgfxbrowserd.exe" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /pdb:"..\..\..\bin\osgfxbrowser.pdb" /debug /machine:IX86 /out:"..\..\..\bin\osgfxbrowserd.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "Example osgfxbrowser - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "../../../bin"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../bin"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /c
# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib osg.lib Producer.lib osgProducer.lib osgUtil.lib osgDB.lib osgUtil.lib osgGA.lib osgText.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /opt:ref /opt:icf
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /debug /machine:IX86 /pdbtype:sept /opt:ref /opt:icf
!ENDIF
# Begin Target
# Name "Example osgfxbrowser - Win32 Debug"
# Name "Example osgfxbrowser - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;def;odl;idl;hpj;bat;asm"
# Begin Source File
SOURCE=..\..\..\examples\osgfxbrowser\Frame.cpp
DEP_CPP_FRAME=\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Image"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\Include\Osg\Texture"\
"..\..\..\Include\Osg\Texture2D"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\include\osgText\Export"\
"..\..\..\include\osgText\Font"\
"..\..\..\include\osgText\String"\
"..\..\..\include\osgText\Text"\
# End Source File
# Begin Source File
SOURCE=..\..\..\examples\osgfxbrowser\Frame.h
# End Source File
# Begin Source File
SOURCE=..\..\..\examples\osgfxbrowser\osgfxbrowser.cpp
DEP_CPP_OSGFX=\
"..\..\..\Include\Osg\AlphaFunc"\
"..\..\..\Include\Osg\AnimationPath"\
"..\..\..\Include\osg\ApplicationUsage"\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BlendFunc"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\include\osg\ClearNode"\
"..\..\..\Include\Osg\ColorMask"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\Include\Osg\CullingSet"\
"..\..\..\Include\Osg\CullStack"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Geometry"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\Include\Osg\Impostor"\
"..\..\..\Include\Osg\ImpostorSprite"\
"..\..\..\Include\Osg\Light"\
"..\..\..\Include\Osg\LightSource"\
"..\..\..\Include\Osg\LineSegment"\
"..\..\..\Include\Osg\Lod"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\MatrixTransform"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Notify"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\PagedLOD"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\PrimitiveSet"\
"..\..\..\Include\Osg\Projection"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\ShadowVolumeOccluder"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\Include\Osg\TexEnv"\
"..\..\..\Include\Osg\Texture"\
"..\..\..\Include\Osg\Texture2D"\
"..\..\..\Include\Osg\Timer"\
"..\..\..\Include\Osg\Transform"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DatabasePager"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\ReadFile"\
"..\..\..\Include\osgDB\WriteFile"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\Registry"\
"..\..\..\include\osgFX\Technique"\
"..\..\..\Include\osgGA\Export"\
"..\..\..\Include\osgGA\GUIActionAdapter"\
"..\..\..\Include\osgGA\GUIEventAdapter"\
"..\..\..\Include\osgGA\GUIEventHandler"\
"..\..\..\Include\osgGA\GUIEventHandlerVisitor"\
"..\..\..\Include\osgGA\KeySwitchMatrixManipulator"\
"..\..\..\Include\osgGA\MatrixManipulator"\
"..\..\..\Include\osgProducer\EventAdapter"\
"..\..\..\Include\osgProducer\Export"\
"..\..\..\Include\osgProducer\KeyboardMouseCallback"\
"..\..\..\include\osgProducer\OsgCameraGroup"\
"..\..\..\Include\osgProducer\OsgSceneHandler"\
"..\..\..\Include\osgProducer\Viewer"\
"..\..\..\include\osgText\Export"\
"..\..\..\include\osgText\Font"\
"..\..\..\include\osgText\String"\
"..\..\..\include\osgText\Text"\
"..\..\..\Include\osgUtil\CullVisitor"\
"..\..\..\Include\osgUtil\Export"\
"..\..\..\Include\osgUtil\IntersectVisitor"\
"..\..\..\include\osgUtil\Optimizer"\
"..\..\..\include\osgUtil\RenderBin"\
"..\..\..\include\osgUtil\RenderGraph"\
"..\..\..\include\osgUtil\RenderLeaf"\
"..\..\..\include\osgUtil\RenderStage"\
"..\..\..\include\osgUtil\RenderStageLighting"\
"..\..\..\Include\osgUtil\SceneView"\
{$(INCLUDE)}"openthreads\barrier"\
{$(INCLUDE)}"openthreads\condition"\
{$(INCLUDE)}"openthreads\exports"\
{$(INCLUDE)}"openthreads\mutex"\
{$(INCLUDE)}"openthreads\thread"\
{$(INCLUDE)}"producer\block"\
{$(INCLUDE)}"producer\blockingqueue"\
{$(INCLUDE)}"producer\camera"\
{$(INCLUDE)}"producer\cameraconfig"\
{$(INCLUDE)}"producer\cameragroup"\
{$(INCLUDE)}"producer\export"\
{$(INCLUDE)}"producer\inputarea"\
{$(INCLUDE)}"producer\keyboard"\
{$(INCLUDE)}"producer\keyboardmouse"\
{$(INCLUDE)}"producer\math"\
{$(INCLUDE)}"producer\referenced"\
{$(INCLUDE)}"producer\refopenthread"\
{$(INCLUDE)}"producer\rendersurface"\
{$(INCLUDE)}"producer\timer"\
{$(INCLUDE)}"producer\types"\
{$(INCLUDE)}"producer\visualchooser"\
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;inc"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,538 @@
# Microsoft Developer Studio Project File - Name="Core osgFX" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=Core osgFX - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "osgFX.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "osgFX.mak" CFG="Core osgFX - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Core osgFX - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "Core osgFX - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Core osgFX - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "../../bin"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
F90=df.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OSGFX_EXPORTS" /D "OSGFX_LIBRARY" /D "_MBCS" /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OSGFX_EXPORTS" /D "OSGFX_LIBRARY" /D "_MBCS" /GZ /c
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib osgd.lib osgUtild.lib osgDBd.lib opengl32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\bin\osgFXd.dll" /implib:"../../lib/osgFXd.lib" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\bin\osgFXd.dll" /implib:"../../lib/osgFXd.lib" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "Core osgFX - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "../../bin"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../bin"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
F90=df.exe
# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OSGFX_EXPORTS" /D "OSGFX_LIBRARY" /D "_MBCS" /GF /c
# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OSGFX_EXPORTS" /D "OSGFX_LIBRARY" /D "_MBCS" /GF /c
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib osg.lib osgUtil.lib osgDB.lib opengl32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /implib:"../../lib/osgFX.lib" /pdbtype:sept /opt:ref /opt:icf
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /implib:"../../lib/osgFX.lib" /pdbtype:sept /opt:ref /opt:icf
!ENDIF
# Begin Target
# Name "Core osgFX - Win32 Debug"
# Name "Core osgFX - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;def;odl;idl;hpj;bat;asm"
# Begin Source File
SOURCE=..\..\src\osgFX\AnisotropicLighting.cpp
DEP_CPP_ANISO=\
"..\..\Include\osg\ArgumentParser"\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\Include\Osg\Image"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\Include\Osg\TexEnv"\
"..\..\Include\Osg\Texture"\
"..\..\Include\Osg\Texture2D"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\Include\Osg\VertexProgram"\
"..\..\include\osg\Viewport"\
"..\..\Include\osgDB\Export"\
"..\..\Include\osgDB\ReadFile"\
"..\..\include\osgFX\AnisotropicLighting"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Registry"\
"..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Cartoon.cpp
DEP_CPP_CARTO=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\Include\Osg\CullFace"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\Include\Osg\Image"\
"..\..\Include\Osg\LineWidth"\
"..\..\Include\Osg\Material"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\PolygonMode"\
"..\..\Include\Osg\PolygonOffset"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\Include\Osg\TexEnv"\
"..\..\Include\Osg\Texture"\
"..\..\Include\Osg\Texture1D"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\Include\Osg\VertexProgram"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Cartoon"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Registry"\
"..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Effect.cpp
DEP_CPP_EFFEC=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Geometry"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Notify"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\PrimitiveSet"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Technique"\
"..\..\include\osgFX\Validator"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Registry.cpp
DEP_CPP_REGIS=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Registry"\
"..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Scribe.cpp
DEP_CPP_SCRIB=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\Include\Osg\LineWidth"\
"..\..\Include\Osg\Material"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\PolygonMode"\
"..\..\Include\Osg\PolygonOffset"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Registry"\
"..\..\include\osgFX\Scribe"\
"..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\SpecularHighlights.cpp
DEP_CPP_SPECU=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ColorMatrix"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\Include\Osg\Image"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Notify"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\Include\Osg\TexEnv"\
"..\..\Include\Osg\TexGen"\
"..\..\Include\Osg\Texture"\
"..\..\Include\Osg\TextureCubeMap"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Registry"\
"..\..\include\osgFX\SpecularHighlights"\
"..\..\include\osgFX\Technique"\
"..\..\include\osgUtil\CubeMapGenerator"\
"..\..\Include\osgUtil\Export"\
"..\..\include\osgUtil\HighlightMapGenerator"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Technique.cpp
DEP_CPP_TECHN=\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\GLExtensions"\
"..\..\Include\Osg\Group"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\src\osgFX\Validator.cpp
DEP_CPP_VALID=\
"..\..\Include\Osg\Array"\
"..\..\Include\Osg\BoundingBox"\
"..\..\Include\Osg\BoundingSphere"\
"..\..\include\osg\buffered_value"\
"..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\Include\Osg\CopyOp"\
"..\..\include\osg\DisplaySettings"\
"..\..\Include\Osg\Drawable"\
"..\..\Include\Osg\Export"\
"..\..\include\osg\fast_back_stack"\
"..\..\include\osg\FrameStamp"\
"..\..\Include\Osg\Geode"\
"..\..\Include\Osg\Gl"\
"..\..\Include\Osg\Group"\
"..\..\include\osg\Math"\
"..\..\Include\Osg\Matrix"\
"..\..\Include\Osg\Node"\
"..\..\include\osg\NodeCallback"\
"..\..\Include\Osg\NodeVisitor"\
"..\..\Include\Osg\Notify"\
"..\..\Include\Osg\Object"\
"..\..\Include\Osg\OccluderNode"\
"..\..\Include\Osg\Plane"\
"..\..\Include\Osg\Polytope"\
"..\..\Include\Osg\Quat"\
"..\..\include\osg\ref_ptr"\
"..\..\Include\Osg\Referenced"\
"..\..\Include\Osg\Shape"\
"..\..\Include\Osg\State"\
"..\..\Include\Osg\StateAttribute"\
"..\..\Include\Osg\StateSet"\
"..\..\include\osg\UByte4"\
"..\..\Include\Osg\Vec2"\
"..\..\Include\Osg\Vec3"\
"..\..\Include\Osg\Vec4"\
"..\..\include\osg\Viewport"\
"..\..\include\osgFX\Effect"\
"..\..\include\osgFX\Export"\
"..\..\include\osgFX\Technique"\
"..\..\include\osgFX\Validator"\
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;inc"
# Begin Source File
SOURCE=..\..\include\osgFX\AnisotropicLighting
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Cartoon
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Effect
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Export
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Registry
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Scribe
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\SpecularHighlights
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Technique
# End Source File
# Begin Source File
SOURCE=..\..\include\osgFX\Validator
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,400 @@
# Microsoft Developer Studio Project File - Name="osgPlugin osgFX" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=osgPlugin osgFX - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "dot_osgFX.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "dot_osgFX.mak" CFG="osgPlugin osgFX - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "osgPlugin osgFX - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "osgPlugin osgFX - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "osgPlugin osgFX - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "../../../bin"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../bin"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
F90=df.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "DOT_OSGNV_EXPORTS" /D "_MBCS" /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "DOT_OSGNV_EXPORTS" /D "_MBCS" /GZ /c
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib osgd.lib osgDBd.lib /nologo /subsystem:windows /dll /pdb:"..\..\..\bin\dot_osgFXd.pdb" /debug /machine:IX86 /out:"..\..\..\bin\osgdb_osgFXd.dll" /implib:"../../../lib/osgdb_osgFXd.lib" /pdbtype:sept
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /pdb:"..\..\..\bin\dot_osgFXd.pdb" /debug /machine:IX86 /out:"..\..\..\bin\osgdb_osgFXd.dll" /implib:"../../../lib/osgdb_osgFXd.lib" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "osgPlugin osgFX - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "../../../bin"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../bin"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
F90=df.exe
# ADD BASE CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "DOT_OSGNV_EXPORTS" /D "_MBCS" /GF /c
# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "DOT_OSGNV_EXPORTS" /D "_MBCS" /GF /c
# ADD BASE MTL /nologo /win32
# ADD MTL /nologo /win32
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib osg.lib osgDB.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\..\bin\osgdb_osgFX.dll" /implib:"../../../lib/osgdb_osgFX.lib" /pdbtype:sept /opt:ref /opt:icf
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\..\bin\osgdb_osgFX.dll" /implib:"../../../lib/osgdb_osgFX.lib" /pdbtype:sept /opt:ref /opt:icf
!ENDIF
# Begin Target
# Name "osgPlugin osgFX - Win32 Debug"
# Name "osgPlugin osgFX - Win32 Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;def;odl;idl;hpj;bat;asm"
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\osgFX\IO_AnisotropicLighting.cpp
DEP_CPP_IO_AN=\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\Include\Osg\Texture"\
"..\..\..\Include\Osg\Texture2D"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DotOsgWrapper"\
"..\..\..\Include\osgDB\DynamicLibrary"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\Field"\
"..\..\..\Include\osgDB\FieldReader"\
"..\..\..\Include\osgDB\FieldReaderIterator"\
"..\..\..\Include\osgDB\Input"\
"..\..\..\Include\osgDB\Output"\
"..\..\..\include\osgDB\ReaderWriter"\
"..\..\..\Include\osgDB\Registry"\
"..\..\..\include\osgFX\AnisotropicLighting"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\osgFX\IO_Cartoon.cpp
DEP_CPP_IO_CA=\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\Include\Osg\LineWidth"\
"..\..\..\Include\Osg\Material"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DotOsgWrapper"\
"..\..\..\Include\osgDB\DynamicLibrary"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\Field"\
"..\..\..\Include\osgDB\FieldReader"\
"..\..\..\Include\osgDB\FieldReaderIterator"\
"..\..\..\Include\osgDB\Input"\
"..\..\..\Include\osgDB\Output"\
"..\..\..\include\osgDB\ReaderWriter"\
"..\..\..\Include\osgDB\Registry"\
"..\..\..\include\osgFX\Cartoon"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\osgFX\IO_Effect.cpp
DEP_CPP_IO_EF=\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DotOsgWrapper"\
"..\..\..\Include\osgDB\DynamicLibrary"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\Field"\
"..\..\..\Include\osgDB\FieldReader"\
"..\..\..\Include\osgDB\FieldReaderIterator"\
"..\..\..\Include\osgDB\Input"\
"..\..\..\Include\osgDB\Output"\
"..\..\..\include\osgDB\ReaderWriter"\
"..\..\..\Include\osgDB\Registry"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\osgFX\IO_Scribe.cpp
DEP_CPP_IO_SC=\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\Include\Osg\LineWidth"\
"..\..\..\Include\Osg\Material"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DotOsgWrapper"\
"..\..\..\Include\osgDB\DynamicLibrary"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\Field"\
"..\..\..\Include\osgDB\FieldReader"\
"..\..\..\Include\osgDB\FieldReaderIterator"\
"..\..\..\Include\osgDB\Input"\
"..\..\..\Include\osgDB\Output"\
"..\..\..\include\osgDB\ReaderWriter"\
"..\..\..\Include\osgDB\Registry"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\Scribe"\
"..\..\..\include\osgFX\Technique"\
# End Source File
# Begin Source File
SOURCE=..\..\..\src\osgPlugins\osgFX\IO_SpecularHighlights.cpp
DEP_CPP_IO_SP=\
"..\..\..\Include\osg\ArgumentParser"\
"..\..\..\Include\Osg\Array"\
"..\..\..\Include\Osg\BoundingBox"\
"..\..\..\Include\Osg\BoundingSphere"\
"..\..\..\include\osg\buffered_value"\
"..\..\..\Include\Osg\ConvexPlanarOccluder"\
"..\..\..\Include\Osg\ConvexPlanarPolygon"\
"..\..\..\Include\Osg\CopyOp"\
"..\..\..\include\osg\DisplaySettings"\
"..\..\..\Include\Osg\Drawable"\
"..\..\..\Include\Osg\Export"\
"..\..\..\include\osg\fast_back_stack"\
"..\..\..\include\osg\FrameStamp"\
"..\..\..\Include\Osg\Geode"\
"..\..\..\Include\Osg\Gl"\
"..\..\..\Include\Osg\Group"\
"..\..\..\Include\Osg\Image"\
"..\..\..\include\osg\Math"\
"..\..\..\Include\Osg\Matrix"\
"..\..\..\Include\Osg\Node"\
"..\..\..\include\osg\NodeCallback"\
"..\..\..\Include\Osg\NodeVisitor"\
"..\..\..\Include\Osg\Object"\
"..\..\..\Include\Osg\OccluderNode"\
"..\..\..\Include\Osg\Plane"\
"..\..\..\Include\Osg\Polytope"\
"..\..\..\Include\Osg\Quat"\
"..\..\..\include\osg\ref_ptr"\
"..\..\..\Include\Osg\Referenced"\
"..\..\..\Include\Osg\Shape"\
"..\..\..\Include\Osg\State"\
"..\..\..\Include\Osg\StateAttribute"\
"..\..\..\Include\Osg\StateSet"\
"..\..\..\include\osg\UByte4"\
"..\..\..\Include\Osg\Vec2"\
"..\..\..\Include\Osg\Vec3"\
"..\..\..\Include\Osg\Vec4"\
"..\..\..\include\osg\Viewport"\
"..\..\..\Include\osgDB\DotOsgWrapper"\
"..\..\..\Include\osgDB\DynamicLibrary"\
"..\..\..\Include\osgDB\Export"\
"..\..\..\Include\osgDB\Field"\
"..\..\..\Include\osgDB\FieldReader"\
"..\..\..\Include\osgDB\FieldReaderIterator"\
"..\..\..\Include\osgDB\Input"\
"..\..\..\Include\osgDB\Output"\
"..\..\..\include\osgDB\ReaderWriter"\
"..\..\..\Include\osgDB\Registry"\
"..\..\..\include\osgFX\Effect"\
"..\..\..\include\osgFX\Export"\
"..\..\..\include\osgFX\SpecularHighlights"\
"..\..\..\include\osgFX\Technique"\
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;inc"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,95 @@
#include "Frame.h"
#include <osgText/Text>
Frame::Frame()
: osg::Geode(),
bgcolor_(0.5f, 0.5f, 0.5f, 1.0f),
rect_(0, 0, 100, 100),
caption_("Frame")
{
}
Frame::Frame(const Frame &copy, const osg::CopyOp &copyop)
: osg::Geode(copy, copyop),
bgcolor_(copy.bgcolor_),
rect_(copy.rect_),
caption_(copy.caption_)
{
}
void Frame::rebuild()
{
removeDrawable(0, getNumDrawables());
addDrawable(build_quad(rect_, bgcolor_));
addDrawable(build_quad(Rect(rect_.x0 + 4, rect_.y1 - 24, rect_.x1 - 4, rect_.y1 - 4), osg::Vec4(0, 0, 0, bgcolor_.w()), false, 0.1f));
osg::ref_ptr<osgText::Text> caption_text = new osgText::Text;
caption_text->setText(caption_);
caption_text->setColor(osg::Vec4(1, 1, 1, 1));
caption_text->setAlignment(osgText::Text::CENTER_CENTER);
caption_text->setFont("arial.ttf");
caption_text->setCharacterSize(16);
caption_text->setFontResolution(16, 16);
caption_text->setPosition(osg::Vec3((rect_.x0 + rect_.x1) / 2, rect_.y1 - 15, 0.2f));
addDrawable(caption_text.get());
rebuild_client_area(Rect(rect_.x0 + 4, rect_.y0 + 4, rect_.x1 - 4, rect_.y1 - 28));
}
osg::Geometry *Frame::build_quad(const Rect &rect, const osg::Vec4 &color, bool shadow, float z)
{
const float shadow_space = 8;
const float shadow_size = 10;
osg::ref_ptr<osg::Geometry> geo = new osg::Geometry;
osg::ref_ptr<osg::Vec3Array> vx = new osg::Vec3Array;
vx->push_back(osg::Vec3(rect.x0, rect.y0, z));
vx->push_back(osg::Vec3(rect.x1, rect.y0, z));
vx->push_back(osg::Vec3(rect.x1, rect.y1, z));
vx->push_back(osg::Vec3(rect.x0, rect.y1, z));
if (shadow) {
vx->push_back(osg::Vec3(rect.x0+shadow_space, rect.y0-shadow_size, z));
vx->push_back(osg::Vec3(rect.x1+shadow_size, rect.y0-shadow_size, z));
vx->push_back(osg::Vec3(rect.x1, rect.y0, z));
vx->push_back(osg::Vec3(rect.x0+shadow_space, rect.y0, z));
vx->push_back(osg::Vec3(rect.x1, rect.y1-shadow_space, z));
vx->push_back(osg::Vec3(rect.x1, rect.y0, z));
vx->push_back(osg::Vec3(rect.x1+shadow_size, rect.y0-shadow_size, z));
vx->push_back(osg::Vec3(rect.x1+shadow_size, rect.y1-shadow_space, z));
}
geo->setVertexArray(vx.get());
osg::ref_ptr<osg::Vec4Array> clr = new osg::Vec4Array;
clr->push_back(color);
clr->push_back(color);
clr->push_back(color);
clr->push_back(color);
if (shadow) {
float alpha = color.w() * 0.5f;
const osg::Vec3 black(0, 0, 0);
clr->push_back(osg::Vec4(black, 0));
clr->push_back(osg::Vec4(black, 0));
clr->push_back(osg::Vec4(black, alpha));
clr->push_back(osg::Vec4(black, alpha));
clr->push_back(osg::Vec4(black, alpha));
clr->push_back(osg::Vec4(black, alpha));
clr->push_back(osg::Vec4(black, 0));
clr->push_back(osg::Vec4(black, 0));
}
geo->setColorArray(clr.get());
geo->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
geo->addPrimitiveSet(new osg::DrawArrays(GL_QUADS, 0, shadow? 12: 4));
return geo.take();
}

View File

@@ -0,0 +1,47 @@
#ifndef FRAME_H_
#define FRAME_H_
#include <osg/Geode>
#include <osg/Geometry>
struct Rect {
float x0, y0, x1, y1;
Rect() {}
Rect(float x0_, float y0_, float x1_, float y1_): x0(x0_), y0(y0_), x1(x1_), y1(y1_) {}
inline float width() const { return x1 - x0; }
inline float height() const { return y0 - y1; }
};
class Frame: public osg::Geode {
public:
Frame();
Frame(const Frame &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY);
META_Node(osgfxbrowser, Frame);
inline const std::string &getCaption() const { return caption_; }
inline void setCaption(const std::string &caption) { caption_ = caption; }
inline const osg::Vec4 &getBackgroundColor() const { return bgcolor_; }
inline void setBackgroundColor(const osg::Vec4 &bgcolor) { bgcolor_ = bgcolor; }
inline const Rect &getRect() const { return rect_; }
inline void setRect(const Rect &rect) { rect_ = rect; }
static osg::Geometry *build_quad(const Rect &rect, const osg::Vec4 &color, bool shadow = true, float z = 0);
virtual void rebuild();
protected:
virtual ~Frame() {}
Frame &operator()(const Frame &) { return *this; }
virtual void rebuild_client_area(const Rect & /*client_rect*/) {}
private:
osg::Vec4 bgcolor_;
Rect rect_;
std::string caption_;
};
#endif

View File

@@ -0,0 +1,18 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgfxbrowser.cpp\
Frame.cpp\
LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg -losgFX $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\
GNUmakefile.inst=GNUmakefile
EXEC = osgfxbrowser
INC += $(X_INC)
include $(TOPDIR)/Make/makerules

View File

@@ -0,0 +1,15 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgfxbrowser.cpp\
Frame.cpp\
LIBS += -losgProducer -lProducer -losgText -losgDB -losgText -losgUtil -losg -losgFX $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
EXEC = osgfxbrowser
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@@ -0,0 +1,376 @@
#include <osg/Group>
#include <osg/Geometry>
#include <osg/Geode>
#include <osg/Projection>
#include <osg/MatrixTransform>
#include <osg/BlendFunc>
#include <osg/LightSource>
#include <osgProducer/Viewer>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgText/Text>
#include <osgUtil/Optimizer>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
#include <osgFX/Registry>
#include <osgFX/Effect>
#include "Frame.h"
#include <vector>
#include <string>
class RotateCallback: public osg::NodeCallback {
public:
RotateCallback(): osg::NodeCallback(), enabled_(true) {}
void operator()(osg::Node *node, osg::NodeVisitor *nv)
{
osg::MatrixTransform *xform = dynamic_cast<osg::MatrixTransform *>(node);
if (xform && enabled_) {
double t = nv->getFrameStamp()->getReferenceTime();
xform->setMatrix(osg::Matrix::rotate(t, osg::Vec3(0, 0, 1)));
}
traverse(node, nv);
}
bool enabled_;
};
// yes, I know global variables are not good things in C++
// but in this case it is useful... :-P
RotateCallback *rotate_cb;
class EffectPanel: public Frame {
public:
class KeyboardHandler: public osgGA::GUIEventHandler {
public:
KeyboardHandler(EffectPanel *ep): ep_(ep) {}
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
{
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN) {
if (ea.getKey() == osgGA::GUIEventAdapter::KEY_Right) {
ep_->setEffectIndex(ep_->getEffectIndex()+1);
return true;
}
if (ea.getKey() == osgGA::GUIEventAdapter::KEY_Left) {
ep_->setEffectIndex(ep_->getEffectIndex()-1);
return true;
}
if (ea.getKey() == osgGA::GUIEventAdapter::KEY_Return) {
ep_->setNodeMask(0xffffffff - ep_->getNodeMask());
return true;
}
if (ea.getKey() == osgGA::GUIEventAdapter::KEY_Delete) {
ep_->setEffectsEnabled(!ep_->getEffectsEnabled());
return true;
}
if (ea.getKey() == 'x') {
osgDB::writeNodeFile(*ep_->getRoot(), "osgfx_model.osg");
std::cout << "written nodes to \"osgfx_model.osg\"\n";
return true;
}
if (ea.getKey() == 'r') {
rotate_cb->enabled_ = !rotate_cb->enabled_;
return true;
}
}
return false;
}
private:
osg::ref_ptr<EffectPanel> ep_;
};
EffectPanel()
: Frame(),
selected_fx_(-1),
fxen_(true),
root_(new osg::Group),
hints_color_(0.75f, 0.75f, 0.75f, 1.0f),
name_color_(1, 1, 1, 1),
desc_color_(1, 1, 0.7f, 1)
{
setBackgroundColor(osg::Vec4(0.3f, 0.1f, 0.15f, 0.75f));
std::cout << "INFO: available osgFX effects:\n";
osgFX::Registry::Effect_map emap = osgFX::Registry::instance()->getEffectMap();
for (osgFX::Registry::Effect_map::const_iterator i=emap.begin(); i!=emap.end(); ++i) {
std::cout << "INFO: \t" << i->first << "\n";
osg::ref_ptr<osgFX::Effect> effect = static_cast<osgFX::Effect *>(i->second->cloneType());
effects_.push_back(effect.get());
}
std::cout << "INFO: " << emap.size() << " effect(s) ready.\n";
if (!effects_.empty()) {
selected_fx_ = 0;
}
}
inline osg::Group *getRoot() { return root_.get(); }
inline void setRoot(osg::Group *node) { root_ = node; }
inline osg::Node *getScene() { return scene_.get(); }
inline void setScene(osg::Node *node) { scene_ = node; }
inline bool getEffectsEnabled() const { return fxen_; }
inline void setEffectsEnabled(bool v)
{
fxen_ = v;
if (getSelectedEffect()) {
getSelectedEffect()->setEnabled(fxen_);
}
}
inline int getEffectIndex() const { return selected_fx_; }
inline void setEffectIndex(int i)
{
if (i >= static_cast<int>(effects_.size())) i = 0;
if (i < 0) i = static_cast<int>(effects_.size()-1);
selected_fx_ = i;
rebuild();
}
inline osgFX::Effect *getSelectedEffect()
{
if (selected_fx_ >= 0 && selected_fx_ < static_cast<int>(effects_.size())) {
return effects_[selected_fx_].get();
}
return 0;
}
protected:
void rebuild_client_area(const Rect &client_rect)
{
osg::ref_ptr<osgText::Font> arial = osgText::readFontFile("fonts/arial.ttf");
osg::ref_ptr<osgText::Text> hints = new osgText::Text;
hints->setFont(arial.get());
hints->setColor(hints_color_);
hints->setAlignment(osgText::Text::CENTER_BOTTOM);
hints->setCharacterSize(13);
hints->setFontResolution(13, 13);
hints->setPosition(osg::Vec3((client_rect.x0+client_rect.x1)/2, client_rect.y0 + 4, 0.1f));
hints->setText("<RETURN> show/hide this panel <LEFT> previous effect <RIGHT> next effect <DEL> enable/disable effects 'x' save to file 'r' rotate/stop");
addDrawable(hints.get());
std::string effect_name = "No Effect Selected";
std::string effect_description = "";
if (selected_fx_ >= 0 && selected_fx_ < static_cast<int>(effects_.size())) {
effect_name = effects_[selected_fx_]->effectName();
std::string author_name = effects_[selected_fx_]->effectAuthor();
if (!author_name.empty()) {
effect_description = author_name = "AUTHOR: " + std::string(effects_[selected_fx_]->effectAuthor()) + std::string("\n\n");
}
effect_description += "DESCRIPTION:\n" + std::string(effects_[selected_fx_]->effectDescription());
if (scene_.valid() && root_.valid()) {
root_->removeChild(0, root_->getNumChildren());
osg::ref_ptr<osgFX::Effect> effect = effects_[selected_fx_].get();
effect->setEnabled(fxen_);
effect->setChild(scene_.get());
effect->setUpDemo();
root_->addChild(effect.get());
}
}
osg::ref_ptr<osgText::Text> ename = new osgText::Text;
ename->setFont(arial.get());
ename->setColor(name_color_);
ename->setAlignment(osgText::Text::CENTER_TOP);
ename->setCharacterSize(32);
ename->setFontResolution(32, 32);
ename->setPosition(osg::Vec3((client_rect.x0 + client_rect.x1) / 2, client_rect.y1 - 22, 0.1f));
ename->setText(effect_name);
addDrawable(ename.get());
osg::ref_ptr<osgText::Text> edesc = new osgText::Text;
edesc->setMaximumWidth(client_rect.width() - 16);
edesc->setFont(arial.get());
edesc->setColor(desc_color_);
edesc->setAlignment(osgText::Text::LEFT_TOP);
edesc->setCharacterSize(16);
edesc->setFontResolution(16, 16);
edesc->setPosition(osg::Vec3(client_rect.x0 + 8, client_rect.y1 - 60, 0.1f));
edesc->setText(effect_description);
addDrawable(edesc.get());
}
private:
int selected_fx_;
typedef std::vector<osg::ref_ptr<osgFX::Effect> > Effect_list;
Effect_list effects_;
bool fxen_;
osg::ref_ptr<osg::Group> root_;
osg::ref_ptr<osg::Node> scene_;
osg::Vec4 hints_color_;
osg::Vec4 name_color_;
osg::Vec4 desc_color_;
};
osg::Group *build_hud_base(osg::Group *root)
{
osg::ref_ptr<osg::Projection> proj = new osg::Projection(osg::Matrix::ortho2D(0, 1024, 0, 768));
proj->setCullingActive(false);
root->addChild(proj.get());
osg::ref_ptr<osg::MatrixTransform> xform = new osg::MatrixTransform(osg::Matrix::identity());
xform->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE);
proj->addChild(xform.get());
osg::StateSet *ss = xform->getOrCreateStateSet();
ss->setRenderBinDetails(100, "RenderBin");
ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
ss->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
osg::ref_ptr<osg::BlendFunc> bf = new osg::BlendFunc;
ss->setAttributeAndModes(bf.get());
return xform.take();
}
EffectPanel *build_gui(osg::Group *root)
{
osg::ref_ptr<osg::Group> hud = build_hud_base(root);
osg::ref_ptr<EffectPanel> effect_panel = new EffectPanel;
effect_panel->setCaption("osgFX Effect Browser");
effect_panel->setRect(Rect(20, 20, 1000, 280));
hud->addChild(effect_panel.get());
return effect_panel.take();
}
void build_world(osg::Group *root, osg::Node *scene, osgProducer::Viewer &viewer)
{
osg::ref_ptr<EffectPanel> effect_panel = build_gui(root);
effect_panel->setScene(scene);
effect_panel->rebuild();
viewer.getEventHandlerList().push_front(new EffectPanel::KeyboardHandler(effect_panel.get()));
root->addChild(effect_panel->getRoot());
}
int main(int argc, char *argv[])
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc, argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName() + " is a simple browser that allows you to apply osgFX effects to models interactively.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName() + " [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help", "Display this information");
arguments.getApplicationUsage()->addKeyboardMouseBinding("Left", "Apply previous effect");
arguments.getApplicationUsage()->addKeyboardMouseBinding("Right", "Apply next effect");
arguments.getApplicationUsage()->addKeyboardMouseBinding("Del", "Enable or disable osgFX");
arguments.getApplicationUsage()->addKeyboardMouseBinding("Return", "Show or hide the effect information panel");
arguments.getApplicationUsage()->addKeyboardMouseBinding("x", "Save the scene graph with current effect applied");
// construct the viewer.
osgProducer::Viewer viewer(arguments);
// set up the value with sensible default event handlers.
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
// get details on keyboard and mouse bindings used by the viewer.
viewer.getUsage(*arguments.getApplicationUsage());
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help")) {
arguments.getApplicationUsage()->write(std::cout);
return 1;
}
// any option left unread are converted into errors to write out later.
arguments.reportRemainingOptionsAsUnrecognized();
// report any errors if they have occured when parsing the program aguments.
if (arguments.errors()) {
arguments.writeErrorMessages(std::cout);
return 1;
}
if (arguments.argc() <= 1) {
arguments.getApplicationUsage()->write(std::cout, osg::ApplicationUsage::COMMAND_LINE_OPTION);
return 1;
}
osg::Timer timer;
osg::Timer_t start_tick = timer.tick();
// read the scene from the list of file specified commandline args.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
// if no model has been successfully loaded report failure.
if (!loadedModel) {
std::cout << arguments.getApplicationName() << ": No data loaded" << std::endl;
return 1;
}
osg::Timer_t end_tick = timer.tick();
std::cout << "Time to load = " << timer.delta_s(start_tick,end_tick) << std::endl;
// optimize the scene graph, remove rendundent nodes and state etc.
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get());
// set up a transform to rotate the model
osg::ref_ptr<osg::MatrixTransform> xform = new osg::MatrixTransform;
rotate_cb = new RotateCallback;
xform->setUpdateCallback(rotate_cb);
xform->addChild(loadedModel.get());
osg::ref_ptr<osg::Light> light = new osg::Light;
light->setLightNum(0);
light->setDiffuse(osg::Vec4(1, 1, 1, 1));
light->setPosition(osg::Vec4(1, -1, 1, 0));
osg::ref_ptr<osg::LightSource> root = new osg::LightSource;
root->setLight(light.get());
root->setLocalStateSetModes();
build_world(root.get(), xform.get(), viewer);
// set the scene to render
viewer.setSceneData(root.get());
// create the windows and run the threads.
viewer.realize();
while(!viewer.done())
{
// wait for all cull and draw threads to complete.
viewer.sync();
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
viewer.update();
// fire off the cull and draw traversals of the scene.
viewer.frame();
}
// wait for all cull and draw threads to complete before exit.
viewer.sync();
return 0;
}

View File

@@ -13,7 +13,557 @@
#include <osgUtil/Optimizer>
#include <osgProducer/Viewer>
// main viewer code at bottom of file.
// experimental templated rendering code, please ignore...
// will move to osg::Geometry once complete.
// Robert Osfield, August 2003.
#if 0
struct DrawArrays
{
virtual void draw() const = 0;
};
struct DrawVertex
{
inline void operator () (const osg::Vec2* v) const { glVertex2fv(v->ptr()); }
inline void operator () (const osg::Vec3* v) const { glVertex3fv(v->ptr()); }
inline void operator () (const osg::Vec4* v) const { glVertex4fv(v->ptr()); }
};
struct DrawNormal
{
inline void operator () (const osg::Vec3* v) const { glNormal3fv(v->ptr()); }
};
struct DrawColor
{
inline void operator () (const osg::Vec4* v) const { glColor4fv(v->ptr()); }
};
struct DrawTexCoord
{
inline void operator () (const osg::Vec2* v) const { glTexCoord2fv(v->ptr()); }
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template< class F1, class T1>
struct DrawFunctor_T : public DrawArrays
{
inline DrawFunctor_T(T1* begin1, T1* end1): _begin1(begin1),_end1(end1) {}
virtual void draw() const
{
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1)
{
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
};
template< class F1, class T1, class I1>
struct DrawFunctor_TI : public DrawArrays
{
inline DrawFunctor_TI(T1* begin1, I1* ibegin1, I1* iend1): _begin1(begin1),_ibegin1(ibegin1),_iend1(end1) {}
virtual void draw() const
{
for(I1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1)
{
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template< class F1, class T1, class F2, class T2>
struct DrawFunctor_TT : public DrawArrays
{
inline DrawFunctor_TT(T1* begin1, T1* end1, T2* begin2): _begin1(begin1),_end1(end1),_begin2(begin2) {}
virtual void draw() const
{
T2* ptr2=_begin2;
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1,++ptr2)
{
F2(ptr2);
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
T2* _begin2;
};
template< class F1, class T1, class I1, class F2, class T2>
struct DrawFunctor_TIT : public DrawArrays
{
inline DrawFunctor_TIT(T1* begin1, I1* ibegin1, I1* iend1, T2* begin2): _begin1(begin1),_ibegin1(ibegin1),_iend1(end1) {}
virtual void draw() const
{
T2* ptr2=_begin2;
for(I1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1,++ptr2)
{
F2(_ptr2);
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
T2* _begin2;
};
template< class F1, class T1, class F2, class T2, class I2>
struct DrawFunctor_TTI : public DrawArrays
{
inline DrawFunctor_TTI(T1* begin1, T1* end1, T2* begin2, I2* ibegin2): _begin1(begin1),_end1(end1),_begin2(begin2),_ibegin2(ibegin2) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1,++iptr2)
{
F2(_begin2[*iptr2]);
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
T2* _begin2;
I2* _ibegin2;
};
template< class F1, class T1, class F2, class I1, class T2, class I2>
struct DrawFunctor_TITI : public DrawArrays
{
inline DrawFunctor_TITI(T1* begin1, I1* ibegin1, I2* iend1, T2* begin2, I2* ibegin2): _begin1(begin1),_ibegin1(ibegin1), _iend1(end1),_begin2(begin2),_ibegin2(ibegin2) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
for(T1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1,++iptr2)
{
F2(_begin2[*iptr2]);
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
T2* _begin2;
I2* _ibegin2;
};
template< class F1, class T1, class F2, class T2, class I>
struct DrawFunctor_TT_I : public DrawArrays
{
inline DrawFunctor_TT_I(T1* begin1, T2* begin2, I* ibegin, I* iend): _begin1(begin1),_begin2(begin2),_ibegin(ibegin),_iend(iend) {}
virtual void draw() const
{
I index;
for(I* iptr=_ibegin;
iptr!=_iend;
++iptr)
{
index = *iptr;
F2(_begin2[index]);
F1(_begin1[index]);
}
}
T1* _begin1;
T2* _begin2;
I* _ibegin;
I* _iend;
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template< class F1, class T1, class F2, class T2, class F3, class T3>
struct DrawFunctor_TTT : public DrawArrays
{
inline DrawFunctor_TTT(T1* begin1, T1* end1, T2* begin2, T3* begin): _begin1(begin1),_end1(end1),_begin2(begin2),_begin3(begin3) {}
virtual void draw() const
{
T2* ptr2=_begin2;
T3* ptr3=_begin3;
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1,++ptr2,++ptr3)
{
F3(ptr3);
F2(ptr2);
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
T2* _begin2;
T3* _begin3;
};
template< class F1, class T1, class I1, class F2, class T2, class F3, class T3>
struct DrawFunctor_TITT : public DrawArrays
{
inline DrawFunctor_TITT(T1* begin1, I1* ibegin1, I1* iend1, T2* begin2, T3* begin): _begin1(begin1),_ibegin1(ibegin1),_iend1(end1),_begin3(begin3) {}
virtual void draw() const
{
T2* ptr2=_begin2;
T3* ptr3=_begin3;
for(I1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1,++ptr2,++ptr3)
{
F3(_ptr3);
F2(_ptr2);
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
T2* _begin2;
T3* _begin3;
};
template< class F1, class T1, class F2, class T2, class I2, class F3, class T3>
struct DrawFunctor_TTIT : public DrawArrays
{
inline DrawFunctor_TTIT(T1* begin1, T1* end1, T2* begin2, I2* ibegin2, T3* begin): _begin1(begin1),_end1(end1),_begin2(begin2),_ibegin2(ibegin2),_begin3(begin3) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
T3* ptr3 = _begin3;
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1,++iptr2,++ptr3)
{
F3(ptr3);
F2(_begin2[*iptr2]);
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
T2* _begin2;
I2* _ibegin2;
T3* _begin3;
};
template< class F1, class T1, class F2, class I1, class T2, class I2, class F3, class T3>
struct DrawFunctor_TITIT : public DrawArrays
{
inline DrawFunctor_TITIT(T1* begin1, I1* ibegin1, I2* iend1, T2* begin2, I2* ibegin2, T3* begin3): _begin1(begin1),_ibegin1(ibegin1), _iend1(end1),_begin2(begin2),_ibegin2(ibegin2),_begin3(begin3) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
T3* ptr3 = _begin3;
for(I1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1,++iptr2,++ptr3)
{
F3(ptr3);
F2(_begin2[*iptr2]);
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
T2* _begin2;
I2* _ibegin2;
T3* _begin3;
};
template< class F1, class T1, class F2, class T2, class I2, class F3, class T3, class I3>
struct DrawFunctor_TTITI : public DrawArrays
{
inline DrawFunctor_TTITI(T1* begin1, T1* end1, T2* begin2, I2* ibegin2, T3* begin3, I3* ibegin3): _begin1(begin1),_end1(end1),_begin2(begin2),_ibegin2(ibegin2),_begin3(begin3),_ibegin3(begin3) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
I3* iptr3 = _ibegin3;
for(T1* ptr1=_begin1;
ptr1!=_end1;
++ptr1,++iptr2,++iptr3)
{
F3(_begin3[*iptr3]);
F2(_begin2[*iptr2]);
F1(ptr1);
}
}
T1* _begin1;
T1* _end1;
T2* _begin2;
I2* _ibegin2;
T3* _begin3;
I3* _ibegin3;
};
template< class F1, class T1, class I1, class F2, class T2, class I2, class F3, class T3, class I3>
struct DrawFunctor_TITITI : public DrawArrays
{
inline DrawFunctor_TITITI(T1* begin1, I1* ibegin1, I2* iend1, T2* begin2, I2* ibegin2, T3* begin3, I3* ibegin3): _begin1(begin1),_ibegin1(ibegin1), _iend1(end1),_begin2(begin2),_ibegin2(ibegin2),_begin3(begin3),_ibegin3(begin3) {}
virtual void draw() const
{
I2* iptr2 = _ibegin2;
I3* iptr3 = _ibegin3;
for(I1* iptr1=_ibegin1;
iptr1!=_iend1;
++iptr1,++iptr2,++iptr3)
{
F3(_begin3[*iptr3]);
F2(_begin2[*iptr2]);
F1(_begin1[*iptr1]);
}
}
T1* _begin1;
I1* _ibegin1;
I1* _iend1;
T2* _begin2;
I2* _ibegin2;
T3* _begin3;
I3* _ibegin3;
};
template< class F1, class T1, class F2, class T2, class F3, class T3, class I>
struct DrawFunctor_TTT_I : public DrawArrays
{
inline DrawFunctor_TTT_I(T1* begin1, T2* begin2, T3* begin3, I* ibegin, I* iend): _begin1(begin1),_begin2(begin2),_begin3(begin3),_ibegin(ibegin),_iend(iend) {}
virtual void draw() const
{
I index;
for(I* iptr=_ibegin;
iptr!=_iend;
++iptr)
{
index = *iptr;
F3(_begin3[index]);
F2(_begin2[index]);
F1(_begin1[index]);
}
}
T1* _begin1;
T2* _begin2;
T3* _begin3;
I* _ibegin;
I* _iend;
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// single vertex attribute
typedef DrawFunctor_T<DrawVertex,osg::Vec3> V3;
typedef DrawFunctor_TI<DrawVertex,osg::Vec3,unsigned short> V3i;
// two attributes - vertex + one other attribute
typedef DrawFunctor_TT<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3> V3N3;
typedef DrawFunctor_TT<DrawVertex,osg::Vec3,DrawColor,osg::Vec4> V3C4;
typedef DrawFunctor_TT<DrawVertex,osg::Vec3,DrawTexCoord,osg::Vec2> V3T2;
typedef DrawFunctor_TIT<DrawVertex,osg::Vec3,unsigned short,DrawNormal,osg::Vec3> V3iN3;
typedef DrawFunctor_TIT<DrawVertex,osg::Vec3,unsigned short,DrawColor,osg::Vec4> V3iC4;
typedef DrawFunctor_TIT<DrawVertex,osg::Vec3,unsigned short,DrawTexCoord,osg::Vec2> V3iT2;
typedef DrawFunctor_TTI<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short> V3N3i;
typedef DrawFunctor_TTI<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,unsigned short> V3C4i;
typedef DrawFunctor_TTI<DrawVertex,osg::Vec3,DrawTexCoord,osg::Vec2,unsigned short> V3T2i;
typedef DrawFunctor_TT_I<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short> V3N3_i;
typedef DrawFunctor_TT_I<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,unsigned short> V3C4_i;
typedef DrawFunctor_TT_I<DrawVertex,osg::Vec3,DrawTexCoord,osg::Vec2,unsigned short> V3T2_i;
// three attributes - vertex + two other attributes.
typedef DrawFunctor_TTT<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,DrawColor,osg::Vec4> V3N3C4;
typedef DrawFunctor_TTT<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,DrawTexCoord,osg::Vec2> V3N3T2;
typedef DrawFunctor_TTT<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,DrawTexCoord,osg::Vec2> V3C4T2;
typedef DrawFunctor_TITT<DrawVertex,osg::Vec3,unsigned short,DrawNormal,osg::Vec3,DrawColor,osg::Vec4> V3iN3C4;
typedef DrawFunctor_TITT<DrawVertex,osg::Vec3,unsigned short,DrawNormal,osg::Vec3,DrawTexCoord,osg::Vec2> V3iN3T2;
typedef DrawFunctor_TITT<DrawVertex,osg::Vec3,unsigned short,DrawColor,osg::Vec4,DrawTexCoord,osg::Vec2> V3iC4T2;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short,DrawColor,osg::Vec4> V3N3iC4;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short,DrawTexCoord,osg::Vec2> V3N3iT2;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,unsigned short,DrawNormal,osg::Vec3> V3C4iN3;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,unsigned short,DrawTexCoord,osg::Vec2> V3C4iT2;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawTexCoord,osg::Vec2,unsigned short,DrawColor,osg::Vec4> V3T2iC4;
typedef DrawFunctor_TTIT<DrawVertex,osg::Vec3,DrawTexCoord,osg::Vec2,unsigned short,DrawNormal,osg::Vec3> V3T2iN3;
typedef DrawFunctor_TTITI<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short,DrawColor,osg::Vec4,unsigned short> V3N3iC4i;
typedef DrawFunctor_TTITI<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,unsigned short,DrawTexCoord,osg::Vec2,unsigned short> V3N3iT2i;
typedef DrawFunctor_TTITI<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,unsigned short,DrawTexCoord,osg::Vec2,unsigned short> V3C4iT2i;
typedef DrawFunctor_TTT_I<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,DrawColor,osg::Vec4,unsigned short> V3N3C4_i;
typedef DrawFunctor_TTT_I<DrawVertex,osg::Vec3,DrawNormal,osg::Vec3,DrawTexCoord,osg::Vec2,unsigned short> V3N3T2_i;
typedef DrawFunctor_TTT_I<DrawVertex,osg::Vec3,DrawColor,osg::Vec4,DrawTexCoord,osg::Vec2,unsigned short> V3C4T2_i;
class MyDrawable : public osg::Drawable
{
public:
MyDrawable();
virtual void drawImplementation(osg::State& state);
virtual bool computeBound() const;
enum RenderingMode
{
v,
vI,// 2
vn,
vIn,
vnI,
vInI,
vn_sI, // 5
vc,
vIc,
vnc,
vInc,
vnIc,
vInIc,
vcI,
vIcI,
vncI,
vIncI,
vnIcI,
vInIcI,
vnc_sI, // 13
vt,
vIt,
vnt,
vInt,
vnIt,
vInIt,
vct,
vIct,
vnct,
vInct,
vnIct,
vInIct,
vcIt,
vIcIt,
vncIt,
vIncIt,
vnIcIt,
vInIcIt,
vtI,
vItI,
vntI,
vIntI,
vnItI,
vInItI,
vctI,
vIctI,
vnctI,
vInctI,
vnIctI,
vInIctI,
vcItI,
vIcItI,
vncItI,
vIncItI,
vnIcItI,
vInIcItI
vnct_sI // 37
}; // 57 combinations.
GLenum _primitiveType;
ref_ptr<Vec3Array> _vertices;
ref_ptr<UShortArray> _vertexIndices;
ref_ptr<Vec3Array> _normals;
ref_ptr<UShortArray> _normalIndices;
ref_ptr<Vec4Array> _colors;
ref_ptr<UShortArray> _colorIndices;
ref_ptr<Vec2Array> _texcoords;
ref_ptr<UShortArray> _texcoordIndices;
}
#endif
int main( int argc, char **argv )
{

View File

@@ -4,6 +4,9 @@ osgversion
echo osglogo
osglogo
echo osgfxbrowser dumptruck.osg
osgfxbrowser dumptruck.osg
echo slideshow3D -a introduction.xml
slideshow3D introduction.xml

View File

@@ -0,0 +1,236 @@
#include <osgFX/AnisotropicLighting>
#include <osgFX/Registry>
#include <osg/VertexProgram>
#include <osg/Texture2D>
#include <osg/TexEnv>
#include <osgDB/ReadFile>
#include <sstream>
using namespace osgFX;
namespace
{
class ViewMatrixExtractor: public osg::StateAttribute {
public:
ViewMatrixExtractor()
: osg::StateAttribute(),
vp_(0),
param_(0)
{
}
ViewMatrixExtractor(const ViewMatrixExtractor &copy, const osg::CopyOp &copyop)
: osg::StateAttribute(copy, copyop),
vp_(static_cast<osg::VertexProgram *>(copyop(copy.vp_.get()))),
param_(copy.param_)
{
}
ViewMatrixExtractor(osg::VertexProgram *vp, int param)
: osg::StateAttribute(),
vp_(vp),
param_(param)
{
}
META_StateAttribute(osgFX, ViewMatrixExtractor, 0x564d4548);
int compare(const osg::StateAttribute &sa) const
{
COMPARE_StateAttribute_Types(ViewMatrixExtractor, sa);
if (vp_.get() != rhs.vp_.get()) return -1;
if (param_ < rhs.param_) return -1;
if (param_ > rhs.param_) return 1;
return 0;
}
void apply(osg::State &state) const
{
if (vp_.valid()) {
osg::Matrix M = state.getInitialInverseViewMatrix();
for (int i=0; i<4; ++i) {
vp_->setProgramLocalParameter(param_+i, osg::Vec4(M(0, i), M(1, i), M(2, i), M(3, i)));
}
}
}
private:
mutable osg::ref_ptr<osg::VertexProgram> vp_;
int param_;
};
}
namespace
{
osg::Image *create_default_image()
{
const int texture_size = 16;
osg::ref_ptr<osg::Image> image = new osg::Image;
image->setImage(texture_size, texture_size, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, new unsigned char[3*texture_size*texture_size], osg::Image::USE_NEW_DELETE);
for (int i=0; i<texture_size; ++i) {
for (int j=0; j<texture_size; ++j) {
float s = static_cast<float>(j) / (texture_size-1);
float t = static_cast<float>(i) / (texture_size-1);
float lum = t * 0.75f;
float red = lum + 0.2f * powf(cosf(s*10), 3.0f);
float green = lum;
float blue = lum + 0.2f * powf(sinf(s*10), 3.0f);
if (red > 1) red = 1;
if (red < 0) red = 0;
if (blue > 1) blue = 1;
if (blue < 0) blue = 0;
*(image->data(j, i)+0) = static_cast<unsigned char>(red * 255);
*(image->data(j, i)+1) = static_cast<unsigned char>(green * 255);
*(image->data(j, i)+2) = static_cast<unsigned char>(blue * 255);
}
}
return image.take();
}
}
namespace
{
Registry::Proxy proxy(new AnisotropicLighting);
class DefaultTechnique: public Technique {
public:
DefaultTechnique(int lightnum, osg::Texture2D *texture)
: Technique(),
lightnum_(lightnum),
texture_(texture)
{
}
void getRequiredExtensions(std::vector<std::string> &extensions) const
{
extensions.push_back("GL_ARB_vertex_program");
}
protected:
void define_passes()
{
std::ostringstream vp_oss;
vp_oss <<
"!!ARBvp1.0\n"
"PARAM c5 = { 0, 0, 0, 1 };"
"PARAM c4 = { 0, 0, 0, 0 };"
"TEMP R0, R1, R2, R3, R4, R5, R6, R7, R8, R9;"
"ATTRIB v18 = vertex.normal;"
"ATTRIB v16 = vertex.position;"
"PARAM s259[4] = { state.matrix.mvp };"
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s223[4] = { state.matrix.modelview[0] };"
"PARAM c0[4] = { program.local[0..3] };"
" DP4 result.position.x, s259[0], v16;"
" DP4 result.position.y, s259[1], v16;"
" DP4 result.position.z, s259[2], v16;"
" DP4 result.position.w, s259[3], v16;"
" MOV R9, c0[0];"
" MUL R0, R9.y, s223[1];"
" MAD R0, R9.x, s223[0], R0;"
" MAD R0, R9.z, s223[2], R0;"
" MAD R8, R9.w, s223[3], R0;"
" DP4 R0.x, R8, v16;"
" MOV R7, c0[1];"
" MUL R1, R7.y, s223[1];"
" MAD R1, R7.x, s223[0], R1;"
" MAD R1, R7.z, s223[2], R1;"
" MAD R6, R7.w, s223[3], R1;"
" DP4 R0.y, R6, v16;"
" MOV R5, c0[2];"
" MUL R1, R5.y, s223[1];"
" MAD R1, R5.x, s223[0], R1;"
" MAD R1, R5.z, s223[2], R1;"
" MAD R4, R5.w, s223[3], R1;"
" DP4 R0.z, R4, v16;"
" MOV R3, c0[3];"
" MUL R1, R3.y, s223[1];"
" MAD R1, R3.x, s223[0], R1;"
" MAD R1, R3.z, s223[2], R1;"
" MAD R1, R3.w, s223[3], R1;"
" DP4 R0.w, R1, v16;"
" MOV R1.x, R9.w;"
" MOV R1.y, R7.w;"
" MOV R1.z, R5.w;"
" MOV R1.w, R3.w;"
" ADD R2, R1, -R0;"
" DP4 R0.x, R2, R2;"
" RSQ R1.x, R0.x;"
" DP4 R0.x, R9, s18;"
" DP4 R0.y, R7, s18;"
" DP4 R0.z, R5, s18;"
" DP4 R0.w, R3, s18;"
" DP4 R1.y, R0, R0;"
" RSQ R1.y, R1.y;"
" MUL R3, R1.y, R0;"
" MAD R2, R1.x, R2, R3;"
" DP4 R1.x, R2, R2;"
" RSQ R1.x, R1.x;"
" MUL R1, R1.x, R2;"
" DP3 R2.x, R8.xyzx, v18.xyzx;"
" DP3 R2.y, R6.xyzx, v18.xyzx;"
" DP3 R2.z, R4.xyzx, v18.xyzx;"
" MOV R2.w, c4.x;"
" DP4 R1.x, R1, R2;"
" MAX result.texcoord[0].x, R1.x, c4.x;"
" DP4 R0.x, R0, R2;"
" MAX result.texcoord[0].y, R0.x, c4.x;"
"END\n";
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
osg::ref_ptr<osg::VertexProgram> vp = new osg::VertexProgram;
vp->setVertexProgram(vp_oss.str());
ss->setAttributeAndModes(vp.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setAttributeAndModes(new ViewMatrixExtractor(vp.get(), 0), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setTextureAttributeAndModes(0, texture_.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osg::TexEnv> texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::DECAL);
ss->setTextureAttributeAndModes(0, texenv.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
addPass(ss.get());
}
private:
int lightnum_;
osg::ref_ptr<osg::Texture2D> texture_;
};
}
AnisotropicLighting::AnisotropicLighting()
: Effect(),
lightnum_(0),
texture_(new osg::Texture2D)
{
texture_->setImage(create_default_image());
texture_->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP);
texture_->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP);
}
AnisotropicLighting::AnisotropicLighting(const AnisotropicLighting &copy, const osg::CopyOp &copyop)
: Effect(copy, copyop),
lightnum_(copy.lightnum_),
texture_(static_cast<osg::Texture2D *>(copyop(copy.texture_.get())))
{
}
bool AnisotropicLighting::define_techniques()
{
addTechnique(new DefaultTechnique(lightnum_, texture_.get()));
return true;
}

171
src/osgFX/Cartoon.cpp Normal file
View File

@@ -0,0 +1,171 @@
#include <osgFX/Cartoon>
#include <osgFX/Registry>
#include <osg/PolygonOffset>
#include <osg/Texture1D>
#include <osg/VertexProgram>
#include <osg/PolygonMode>
#include <osg/CullFace>
#include <osg/Image>
#include <osg/TexEnv>
#include <osg/LineWidth>
#include <osg/Material>
#include <sstream>
using namespace osgFX;
namespace
{
osg::Image *create_sharp_lighting_map(int levels = 4, int texture_size = 16)
{
osg::ref_ptr<osg::Image> image = new osg::Image;
image->setImage(texture_size, 1, 1, 4, GL_RGBA, GL_UNSIGNED_BYTE, new unsigned char[4*texture_size], osg::Image::USE_NEW_DELETE);
for (int i=0; i<texture_size; ++i) {
float c = i/static_cast<float>(texture_size);
c = (1+static_cast<int>(sqrtf(c) * (levels))) / static_cast<float>(levels+1);
*(image->data(i, 0)+0) = static_cast<unsigned char>(c*255);
*(image->data(i, 0)+1) = static_cast<unsigned char>(c*255);
*(image->data(i, 0)+2) = static_cast<unsigned char>(c*255);
*(image->data(i, 0)+3) = 255;
}
return image.take();
}
}
namespace
{
// register a prototype for this effect
Registry::Proxy proxy(new Cartoon);
// default technique class
class DefaultTechnique: public Technique {
public:
DefaultTechnique(osg::Material *wf_mat, osg::LineWidth *wf_lw, int lightnum)
: Technique(), wf_mat_(wf_mat), wf_lw_(wf_lw), lightnum_(lightnum) {}
void getRequiredExtensions(std::vector<std::string> &extensions) const
{
extensions.push_back("GL_ARB_vertex_program");
}
protected:
void define_passes()
{
// implement pass #1 (solid surfaces)
{
std::ostringstream vp_oss;
vp_oss <<
"!!ARBvp1.0\n"
"OPTION ARB_position_invariant;"
"PARAM c0 = { 0, 0, 0, 0 };"
"TEMP R0, R1;"
"ATTRIB v18 = vertex.normal;"
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s16 = state.light[" << lightnum_ << "].diffuse;"
"PARAM s1 = state.material.diffuse;"
"PARAM s631[4] = { state.matrix.modelview[0].invtrans };"
"MOV R0, s1;"
"MUL result.color.front.primary, R0, s16;"
"DP4 R0.x, s18, s18;"
"RSQ R0.x, R0.x;"
"MUL R1, R0.x, s18;"
"DP4 R0.x, s631[0], v18;"
"DP4 R0.y, s631[1], v18;"
"DP4 R0.z, s631[2], v18;"
"DP4 R0.w, s631[3], v18;"
"DP4 R0.x, R1, R0;"
"MAX result.texcoord[0].x, c0.x, R0.x;"
"END";
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
osg::ref_ptr<osg::PolygonOffset> polyoffset = new osg::PolygonOffset;
polyoffset->setFactor(1.0f);
polyoffset->setUnits(1.0f);
ss->setAttributeAndModes(polyoffset.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osg::VertexProgram> vp = new osg::VertexProgram;
vp->setVertexProgram(vp_oss.str());
ss->setAttributeAndModes(vp.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
ss->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF);
osg::ref_ptr<osg::Texture1D> texture = new osg::Texture1D;
texture->setImage(create_sharp_lighting_map());
texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::NEAREST);
texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::NEAREST);
ss->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
osg::ref_ptr<osg::TexEnv> texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::MODULATE);
ss->setTextureAttributeAndModes(0, texenv.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
addPass(ss.get());
}
// implement pass #2 (outlines)
{
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
osg::ref_ptr<osg::PolygonMode> polymode = new osg::PolygonMode;
polymode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE);
ss->setAttributeAndModes(polymode.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osg::CullFace> cf = new osg::CullFace;
cf->setMode(osg::CullFace::FRONT);
ss->setAttributeAndModes(cf.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
wf_lw_->setWidth(2);
ss->setAttributeAndModes(wf_lw_.get(), osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);
wf_mat_->setColorMode(osg::Material::OFF);
wf_mat_->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
ss->setAttributeAndModes(wf_mat_.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setMode(GL_LIGHTING, osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setTextureMode(0, GL_TEXTURE_1D, osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
ss->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
addPass(ss.get());
}
}
private:
osg::ref_ptr<osg::Material> wf_mat_;
osg::ref_ptr<osg::LineWidth> wf_lw_;
int lightnum_;
};
}
Cartoon::Cartoon()
: Effect(),
wf_mat_(new osg::Material),
wf_lw_(new osg::LineWidth),
lightnum_(0)
{
}
Cartoon::Cartoon(const Cartoon &copy, const osg::CopyOp &copyop)
: Effect(copy, copyop),
wf_mat_(static_cast<osg::Material *>(copyop(copy.wf_mat_.get()))),
wf_lw_(static_cast<osg::LineWidth *>(copyop(copy.wf_lw_.get()))),
lightnum_(copy.lightnum_)
{
}
bool Cartoon::define_techniques()
{
addTechnique(new DefaultTechnique(wf_mat_.get(), wf_lw_.get(), lightnum_));
return true;
}

124
src/osgFX/Effect.cpp Normal file
View File

@@ -0,0 +1,124 @@
#include <osgFX/Effect>
#include <osgFX/Validator>
#include <osg/Group>
#include <osg/Notify>
#include <osg/StateAttribute>
#include <osg/Geometry>
using namespace osgFX;
Effect::Effect()
: osg::Node(),
enabled_(true),
global_sel_tech_(AUTO_DETECT),
techs_defined_(false)
{
build_dummy_node();
}
Effect::Effect(const Effect &copy, const osg::CopyOp &copyop)
: osg::Node(copy, copyop),
enabled_(copy.enabled_),
global_sel_tech_(copy.global_sel_tech_),
techs_defined_(false),
child_(static_cast<osg::Node *>(copyop(copy.child_.get())))
{
build_dummy_node();
}
bool Effect::computeBound() const
{
_bsphere.init();
_bsphere_computed = true;
if (child_.valid()) {
_bsphere.expandBy(child_->getBound());
}
return _bsphere.valid();
}
void Effect::traverse(osg::NodeVisitor &nv)
{
typedef osg::Node Inherited;
if (!child_.valid()) return;
// we are not a Group, so children will not notify us when their
// bounding box has changed. We need to recompute it at each traversal... :(
dirtyBound();
if (!enabled_) {
child_->accept(nv);
Inherited::traverse(nv);
return;
}
if (!techs_defined_) {
// clear existing techniques if necessary
techs_.clear();
sel_tech_.clear();
tech_selected_.clear();
// define new techniques
techs_defined_ = define_techniques();
if (!techs_defined_) {
osg::notify(osg::WARN) << "Warning: osgFX::Effect: could not define techniques for effect " << className() << std::endl;
return;
}
if (techs_.empty()) {
osg::notify(osg::WARN) << "Warning: osgFX::Effect: no techniques defined for effect " << className() << std::endl;
return;
}
}
Technique *tech = 0;
if (global_sel_tech_ == AUTO_DETECT) {
bool none_selected = true;
for (unsigned i=0; i<tech_selected_.size(); ++i) {
if (tech_selected_[i] != 0) {
none_selected = false;
break;
}
}
if (none_selected) {
dummy_for_validation_->accept(nv);
}
int max_index = -1;
for (unsigned j=0; j<sel_tech_.size(); ++j) {
if (tech_selected_[j] != 0) {
if (sel_tech_[j] > max_index) {
max_index = sel_tech_[j];
}
}
}
if (max_index >= 0) {
tech = techs_[max_index].get();
}
} else {
tech = techs_[global_sel_tech_].get();
}
if (tech) {
tech->accept(nv, child_.get());
} else {
child_->accept(nv);
}
Inherited::traverse(nv);
}
void Effect::build_dummy_node()
{
dummy_for_validation_ = new osg::Geode;
osg::ref_ptr<osg::Geometry> geo = new osg::Geometry;
dummy_for_validation_->addDrawable(geo.get());
dummy_for_validation_->getOrCreateStateSet()->setAttribute(new Validator(this));
}

21
src/osgFX/GNUmakefile Normal file
View File

@@ -0,0 +1,21 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
AnisotropicLighting.cpp\
Cartoon.cpp\
Effect.cpp\
Registry.cpp\
Scribe.cpp\
SpecularHighlights.cpp\
Technique.cpp\
Validator.cpp\
LIBS += -losg -losgDB -losgUtil $(GL_LIBS) $(OTHER_LIBS) $(DYNAMICLIBRARYLIB)
DEF += -DOSGFX_LIBRARY
TARGET_BASENAME = osgFX
LIB = $(LIB_PREFIX)$(TARGET_BASENAME).$(LIB_EXT)
include $(TOPDIR)/Make/makerules

9
src/osgFX/Registry.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include <osgFX/Registry>
using namespace osgFX;
Registry *Registry::instance_ = 0;
Registry::Registry()
{
}

99
src/osgFX/Scribe.cpp Normal file
View File

@@ -0,0 +1,99 @@
#include <osgFX/Scribe>
#include <osgFX/Registry>
#include <osg/GL>
#include <osg/PolygonOffset>
#include <osg/Material>
#include <osg/LineWidth>
#include <osg/PolygonMode>
#include <string.h>
using namespace osgFX;
namespace
{
// register a prototype for this effect
Registry::Proxy proxy(new Scribe);
// default technique class
class DefaultTechnique: public Technique {
public:
DefaultTechnique(osg::Material *wf_mat, osg::LineWidth *wf_lw)
: Technique(), wf_mat_(wf_mat), wf_lw_(wf_lw) {}
bool validate(osg::State &) const
{
return strncmp((const char*)glGetString(GL_VERSION), "1.1", 3) >= 0;
}
protected:
void define_passes()
{
// implement pass #1
{
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
osg::ref_ptr<osg::PolygonOffset> polyoffset = new osg::PolygonOffset;
polyoffset->setFactor(1.0f);
polyoffset->setUnits(1.0f);
ss->setAttributeAndModes(polyoffset.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
addPass(ss.get());
}
// implement pass #2
{
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
osg::ref_ptr<osg::PolygonMode> polymode = new osg::PolygonMode;
polymode->setMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE);
ss->setAttributeAndModes(polymode.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
wf_lw_->setWidth(1);
ss->setAttributeAndModes(wf_lw_.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
wf_mat_->setColorMode(osg::Material::OFF);
wf_mat_->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(0, 0, 0, 1));
wf_mat_->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
ss->setAttributeAndModes(wf_mat_.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setMode(GL_LIGHTING, osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
ss->setTextureMode(0, GL_TEXTURE_1D, osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
ss->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
addPass(ss.get());
}
}
private:
osg::ref_ptr<osg::Material> wf_mat_;
osg::ref_ptr<osg::LineWidth> wf_lw_;
};
}
Scribe::Scribe()
: Effect(),
wf_mat_(new osg::Material),
wf_lw_(new osg::LineWidth)
{
}
Scribe::Scribe(const Scribe &copy, const osg::CopyOp &copyop)
: Effect(copy, copyop),
wf_mat_(static_cast<osg::Material *>(copyop(copy.wf_mat_.get()))),
wf_lw_(static_cast<osg::LineWidth *>(copyop(copy.wf_lw_.get())))
{
}
bool Scribe::define_techniques()
{
addTechnique(new DefaultTechnique(wf_mat_.get(), wf_lw_.get()));
return true;
}

View File

@@ -0,0 +1,186 @@
#include <osgFX/SpecularHighlights>
#include <osgFX/Registry>
#include <osg/TextureCubeMap>
#include <osg/TexGen>
#include <osg/TexEnv>
#include <osg/ColorMatrix>
#include <osgUtil/HighlightMapGenerator>
using namespace osgFX;
namespace
{
class AutoTextureMatrix: public osg::StateAttribute {
public:
AutoTextureMatrix()
: osg::StateAttribute(),
lightnum_(0),
active_(false)
{
}
AutoTextureMatrix(const AutoTextureMatrix &copy, const osg::CopyOp &copyop)
: osg::StateAttribute(copy, copyop),
lightnum_(copy.lightnum_),
active_(copy.active_)
{
}
AutoTextureMatrix(int lightnum, bool active = true)
: osg::StateAttribute(),
lightnum_(lightnum),
active_(active)
{
}
META_StateAttribute(osgFX, AutoTextureMatrix, osg::StateAttribute::TEXMAT);
virtual bool isTextureAttribute() const { return true; }
int compare(const osg::StateAttribute &sa) const
{
COMPARE_StateAttribute_Types(AutoTextureMatrix, sa);
if (lightnum_ < rhs.lightnum_) return -1;
if (lightnum_ > rhs.lightnum_) return 1;
return 0;
}
void apply(osg::State &state) const
{
glMatrixMode(GL_TEXTURE);
if (active_) {
osg::Matrix M = state.getInitialViewMatrix();
M(3, 0) = 0; M(3, 1) = 0; M(3, 2) = 0;
M(3, 3) = 1; M(0, 3) = 0; M(1, 3) = 0;
M(2, 3) = 0;
osg::Vec4 lightvec;
glGetLightfv(GL_LIGHT0+lightnum_, GL_POSITION, lightvec._v);
osg::Vec3 eye_light_ref = osg::Vec3(0, 0, 1) * M;
osg::Matrix LM = osg::Matrix::rotate(
osg::Vec3(lightvec.x(), lightvec.y(), lightvec.z()),
eye_light_ref);
glLoadMatrixf((LM * osg::Matrix::inverse(M)).ptr());
} else {
glLoadIdentity();
}
glMatrixMode(GL_MODELVIEW);
}
private:
int lightnum_;
bool active_;
};
}
namespace
{
Registry::Proxy proxy(new SpecularHighlights);
class DefaultTechnique: public Technique {
public:
DefaultTechnique(int lightnum, int unit, const osg::Vec4 &color, float sexp)
: Technique(),
lightnum_(lightnum),
unit_(unit),
color_(color),
sexp_(sexp)
{
}
void getRequiredExtensions(std::vector<std::string> &extensions)
{
extensions.push_back("GL_ARB_texture_env_add");
}
bool validate(osg::State &state) const
{
if (!Technique::validate(state)) return false;
osg::TextureCubeMap::Extensions *ext =
osg::TextureCubeMap::getExtensions(state.getContextID(), true);
if (ext) {
return ext->isCubeMapSupported();
}
return false;
}
protected:
void define_passes()
{
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
ss->setTextureAttributeAndModes(unit_, new AutoTextureMatrix(lightnum_), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osgUtil::HighlightMapGenerator> hmg = new osgUtil::HighlightMapGenerator(osg::Vec3(0, 0, -1), color_, sexp_);
hmg->generateMap(false);
osg::ref_ptr<osg::TextureCubeMap> texture = new osg::TextureCubeMap;
texture->setImage(osg::TextureCubeMap::POSITIVE_X, hmg->getImage(osg::TextureCubeMap::POSITIVE_X));
texture->setImage(osg::TextureCubeMap::POSITIVE_Y, hmg->getImage(osg::TextureCubeMap::POSITIVE_Y));
texture->setImage(osg::TextureCubeMap::POSITIVE_Z, hmg->getImage(osg::TextureCubeMap::POSITIVE_Z));
texture->setImage(osg::TextureCubeMap::NEGATIVE_X, hmg->getImage(osg::TextureCubeMap::NEGATIVE_X));
texture->setImage(osg::TextureCubeMap::NEGATIVE_Y, hmg->getImage(osg::TextureCubeMap::NEGATIVE_Y));
texture->setImage(osg::TextureCubeMap::NEGATIVE_Z, hmg->getImage(osg::TextureCubeMap::NEGATIVE_Z));
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
texture->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE);
ss->setTextureAttributeAndModes(unit_, texture.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osg::TexGen> texgen = new osg::TexGen;
texgen->setMode(osg::TexGen::REFLECTION_MAP);
ss->setTextureAttributeAndModes(unit_, texgen.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
osg::ref_ptr<osg::TexEnv> texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::ADD);
ss->setTextureAttributeAndModes(unit_, texenv.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
addPass(ss.get());
}
private:
int lightnum_;
int unit_;
osg::Vec4 color_;
float sexp_;
};
}
SpecularHighlights::SpecularHighlights()
: Effect(),
lightnum_(0),
unit_(0),
color_(1, 1, 1, 1),
sexp_(16)
{
}
SpecularHighlights::SpecularHighlights(const SpecularHighlights &copy, const osg::CopyOp &copyop)
: Effect(copy, copyop),
lightnum_(copy.lightnum_),
unit_(copy.unit_),
color_(copy.color_),
sexp_(copy.sexp_)
{
}
bool SpecularHighlights::define_techniques()
{
addTechnique(new DefaultTechnique(lightnum_, unit_, color_, sexp_));
return true;
}

79
src/osgFX/Technique.cpp Normal file
View File

@@ -0,0 +1,79 @@
#include <osgFX/Technique>
#include <osg/GLExtensions>
using namespace osgFX;
Technique::Technique()
: osg::Referenced(),
passes_defined_(false),
control_node_(new osg::Group)
{
}
void Technique::addPass(osg::StateSet *ss)
{
osg::ref_ptr<osg::Group> pass = new osg::Group;
control_node_->addChild(pass.get());
if (ss) {
ss->setRenderBinDetails(static_cast<int>(control_node_->getNumChildren()), "RenderBin");
pass->setStateSet(ss);
}
}
void Technique::addPass(osg::Group *pass)
{
control_node_->addChild(pass);
}
bool Technique::validate(osg::State &) const
{
typedef std::vector<std::string> String_list;
String_list extensions;
getRequiredExtensions(extensions);
for (String_list::const_iterator i=extensions.begin(); i!=extensions.end(); ++i) {
if (!osg::isGLExtensionSupported(i->c_str())) return false;
}
return true;
}
void Technique::accept(osg::NodeVisitor &nv, osg::Node *child)
{
// define passes if necessary
if (!passes_defined_) {
// clear existing pass nodes
if (control_node_->getNumChildren() > 0) {
control_node_->removeChild(0, control_node_->getNumChildren());
}
define_passes();
passes_defined_ = true;
}
// update pass children if necessary
if (child != prev_child_.get()) {
for (unsigned i=0; i<control_node_->getNumChildren(); ++i) {
osg::Group *pass = dynamic_cast<osg::Group *>(control_node_->getChild(i));
if (pass) {
if (pass->getNumChildren() > 0) {
pass->removeChild(0, pass->getNumChildren());
}
osg::Node *oc = getOverrideChild(i);
if (oc) {
pass->addChild(oc);
} else {
pass->addChild(child);
}
}
}
prev_child_ = child;
}
// traverse the control node
control_node_->accept(nv);
}

41
src/osgFX/Validator.cpp Normal file
View File

@@ -0,0 +1,41 @@
#include <osgFX/Validator>
#include <osgFX/Effect>
#include <osg/Notify>
using namespace osgFX;
Validator::Validator()
: osg::StateAttribute()
{
}
Validator::Validator(Effect *effect)
: osg::StateAttribute(),
effect_(effect)
{
}
Validator::Validator(const Validator &copy, const osg::CopyOp &copyop)
: osg::StateAttribute(copy, copyop),
effect_(static_cast<Effect *>(copyop(copy.effect_.get())))
{
}
void Validator::apply(osg::State &state) const
{
if (!effect_.valid()) return;
if (effect_->tech_selected_[state.getContextID()] == 0) {
Effect::Technique_list::iterator i;
int j = 0;
for (i=effect_->techs_.begin(); i!=effect_->techs_.end(); ++i, ++j) {
if ((*i)->validate(state)) {
effect_->sel_tech_[state.getContextID()] = j;
effect_->tech_selected_[state.getContextID()] = 1;
return;
}
}
osg::notify(osg::WARN) << "Warning: osgFX::Validator: could not find any techniques compatible with the current OpenGL context" << std::endl;
}
}