From b121c9686f60544088b254914b0244c1adb1f45f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 11 Jan 2007 15:19:59 +0000 Subject: [PATCH] Ported following examples to osgViewer: osgteapot osgtessellate osgtext osgtexture1D osgtexture2D osgtexture3D osgtexturerectangle osgvertexprogram osgvolume osgwindows osgsimple osgkeyboardmouse --- VisualStudio/OpenSceneGraph.dsw | 23 +- .../osgkeyboardmouse/osgkeyboardmouse.dsp | 8 +- .../examples/osgpagedlod/osgpagedlod.dsp | 8 +- VisualStudio/examples/osgsimple/osgsimple.dsp | 8 +- .../examples/osgtessellate/osgtessellate.dsp | 8 +- VisualStudio/examples/osgtext/osgtextdemo.dsp | 8 +- .../examples/osgtexture1D/osgtexture1D.dsp | 8 +- .../examples/osgtexture2D/osgtexture2D.dsp | 8 +- .../examples/osgtexture3D/osgtexture3D.dsp | 8 +- .../osgtexturerectangle.dsp | 8 +- .../osgvertexprogram/osgvertexprogram.dsp | 8 +- VisualStudio/examples/osgvolume/osgvolume.dsp | 8 +- .../examples/osgwindows/osgwindows.dsp | 8 +- examples/osgcamera/GNUmakefile.inst | 5 +- examples/osgcatch/GNUmakefile | 2 +- examples/osgcatch/GNUmakefile.inst | 6 +- examples/osgcatch/osgcatch.cpp | 148 --------- examples/osgcluster/osgcluster.cpp | 2 +- examples/osgimpostor/GNUmakefile.inst | 5 +- examples/osgkeyboardmouse/GNUmakefile | 13 +- examples/osgkeyboardmouse/GNUmakefile.inst | 5 +- .../osgkeyboardmouse/osgkeyboardmouse.cpp | 180 +++++------ examples/osgsimple/GNUmakefile | 13 +- examples/osgsimple/GNUmakefile.inst | 5 +- examples/osgsimple/osgsimple.cpp | 85 +++++- examples/osgsimplifier/GNUmakefile.inst | 2 +- examples/osgslice/osgslice.cpp | 2 +- examples/osgteapot/GNUmakefile | 2 +- examples/osgteapot/GNUmakefile.inst | 9 +- examples/osgteapot/osgteapot.cpp | 63 +--- examples/osgtessellate/GNUmakefile | 2 +- examples/osgtessellate/GNUmakefile.inst | 2 +- examples/osgtessellate/osgtessellate.cpp | 82 +---- examples/osgtext/GNUmakefile | 2 +- examples/osgtext/GNUmakefile.inst | 5 +- examples/osgtext/osgtext.cpp | 117 +------ examples/osgtexture1D/GNUmakefile | 2 +- examples/osgtexture1D/GNUmakefile.inst | 5 +- examples/osgtexture1D/osgtexture1D.cpp | 105 ++----- examples/osgtexture2D/GNUmakefile | 2 +- examples/osgtexture2D/GNUmakefile.inst | 5 +- examples/osgtexture2D/osgtexture2D.cpp | 73 +---- examples/osgtexture3D/GNUmakefile | 2 +- examples/osgtexture3D/GNUmakefile.inst | 5 +- examples/osgtexture3D/osgtexture3D.cpp | 286 +++++++----------- examples/osgtexturerectangle/GNUmakefile | 2 +- examples/osgtexturerectangle/GNUmakefile.inst | 5 +- .../osgtexturerectangle.cpp | 59 +--- examples/osgunittests/GNUmakefile | 2 +- examples/osgunittests/GNUmakefile.inst | 2 +- examples/osgvertexprogram/GNUmakefile | 2 +- examples/osgvertexprogram/GNUmakefile.inst | 5 +- .../osgvertexprogram/osgvertexprogram.cpp | 68 +---- examples/osgvolume/GNUmakefile | 2 +- examples/osgvolume/GNUmakefile.inst | 5 +- examples/osgvolume/osgvolume.cpp | 39 +-- examples/osgwindows/GNUmakefile | 2 +- examples/osgwindows/GNUmakefile.inst | 5 +- examples/osgwindows/osgwindows.cpp | 186 ++++-------- 59 files changed, 460 insertions(+), 1285 deletions(-) diff --git a/VisualStudio/OpenSceneGraph.dsw b/VisualStudio/OpenSceneGraph.dsw index 681401df8..26b5b233a 100644 --- a/VisualStudio/OpenSceneGraph.dsw +++ b/VisualStudio/OpenSceneGraph.dsw @@ -1425,9 +1425,6 @@ Package=<4> 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 }}} @@ -2451,7 +2448,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2508,7 +2505,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2538,7 +2535,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2568,7 +2565,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2595,7 +2592,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2625,7 +2622,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2652,7 +2649,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2703,7 +2700,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2814,7 +2811,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil @@ -2841,7 +2838,7 @@ Package=<4> Project_Dep_Name Core osgGA End Project Dependency Begin Project Dependency - Project_Dep_Name Core osgProducer + Project_Dep_Name Core osgViewer End Project Dependency Begin Project Dependency Project_Dep_Name Core osgUtil diff --git a/VisualStudio/examples/osgkeyboardmouse/osgkeyboardmouse.dsp b/VisualStudio/examples/osgkeyboardmouse/osgkeyboardmouse.dsp index 36669021a..61851000a 100644 --- a/VisualStudio/examples/osgkeyboardmouse/osgkeyboardmouse.dsp +++ b/VisualStudio/examples/osgkeyboardmouse/osgkeyboardmouse.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib opengl32.lib Producer.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgkeyboardmouse.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgkeyboardmouse.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgkeyboardmouse - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib Producerd.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgkeyboardmoused.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgkeyboardmoused.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgpagedlod/osgpagedlod.dsp b/VisualStudio/examples/osgpagedlod/osgpagedlod.dsp index 7fff5cddd..fda960c19 100644 --- a/VisualStudio/examples/osgpagedlod/osgpagedlod.dsp +++ b/VisualStudio/examples/osgpagedlod/osgpagedlod.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgpagedlod.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgpagedlod.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgpagedlod - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib glu32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgpagedlodd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib glu32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgpagedlodd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgsimple/osgsimple.dsp b/VisualStudio/examples/osgsimple/osgsimple.dsp index 4bfafda6a..a5d5435fb 100644 --- a/VisualStudio/examples/osgsimple/osgsimple.dsp +++ b/VisualStudio/examples/osgsimple/osgsimple.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib opengl32.lib Producer.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgsimple.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgsimple.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgsimple - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib Producerd.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgsimpled.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgsimpled.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtessellate/osgtessellate.dsp b/VisualStudio/examples/osgtessellate/osgtessellate.dsp index c4d24d86a..6190581a7 100644 --- a/VisualStudio/examples/osgtessellate/osgtessellate.dsp +++ b/VisualStudio/examples/osgtessellate/osgtessellate.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtessellate.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtessellate.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtessellate - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtessellated.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtessellated.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtext/osgtextdemo.dsp b/VisualStudio/examples/osgtext/osgtextdemo.dsp index 2d67e745d..d2ed70b97 100644 --- a/VisualStudio/examples/osgtext/osgtextdemo.dsp +++ b/VisualStudio/examples/osgtext/osgtextdemo.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtext.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtext.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtext - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib glu32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtextd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib glu32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtextd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtexture1D/osgtexture1D.dsp b/VisualStudio/examples/osgtexture1D/osgtexture1D.dsp index af47367b1..f7d5120f5 100644 --- a/VisualStudio/examples/osgtexture1D/osgtexture1D.dsp +++ b/VisualStudio/examples/osgtexture1D/osgtexture1D.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture1D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture1D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtexture1D - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture1Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture1Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtexture2D/osgtexture2D.dsp b/VisualStudio/examples/osgtexture2D/osgtexture2D.dsp index b2ab2c540..dae3f6be8 100644 --- a/VisualStudio/examples/osgtexture2D/osgtexture2D.dsp +++ b/VisualStudio/examples/osgtexture2D/osgtexture2D.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture2D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture2D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtexture2D - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture2Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture2Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtexture3D/osgtexture3D.dsp b/VisualStudio/examples/osgtexture3D/osgtexture3D.dsp index 8afaae3da..9b514abdd 100644 --- a/VisualStudio/examples/osgtexture3D/osgtexture3D.dsp +++ b/VisualStudio/examples/osgtexture3D/osgtexture3D.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture3D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexture3D.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtexture3D - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture3Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexture3Dd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgtexturerectangle/osgtexturerectangle.dsp b/VisualStudio/examples/osgtexturerectangle/osgtexturerectangle.dsp index b32fdb777..3504f4851 100644 --- a/VisualStudio/examples/osgtexturerectangle/osgtexturerectangle.dsp +++ b/VisualStudio/examples/osgtexturerectangle/osgtexturerectangle.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexturerectangle.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgtexturerectangle.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgtexturerectangle - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexturerectangled.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgtexturerectangled.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgvertexprogram/osgvertexprogram.dsp b/VisualStudio/examples/osgvertexprogram/osgvertexprogram.dsp index f7d624d74..1f07cc204 100755 --- a/VisualStudio/examples/osgvertexprogram/osgvertexprogram.dsp +++ b/VisualStudio/examples/osgvertexprogram/osgvertexprogram.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgvertexprogram.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgvertexprogram.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgvertexprogram - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgvertexprogramd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgvertexprogramd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgvolume/osgvolume.dsp b/VisualStudio/examples/osgvolume/osgvolume.dsp index 553ab8bcb..2600ede69 100644 --- a/VisualStudio/examples/osgvolume/osgvolume.dsp +++ b/VisualStudio/examples/osgvolume/osgvolume.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgvolume.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgvolume.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgvolume - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgvolumed.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgvolumed.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/VisualStudio/examples/osgwindows/osgwindows.dsp b/VisualStudio/examples/osgwindows/osgwindows.dsp index e46138f1c..8bfd83617 100644 --- a/VisualStudio/examples/osgwindows/osgwindows.dsp +++ b/VisualStudio/examples/osgwindows/osgwindows.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" BSC32=bscmake.exe @@ -51,7 +51,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32.lib producer.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgwindows.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /opt:ref /opt:icf /out:"$(OutDir)/osgwindows.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" !ELSEIF "$(CFG)" == "Example osgwindows - Win32 Debug" @@ -68,7 +68,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" BSC32=bscmake.exe @@ -76,7 +76,7 @@ BSC32=bscmake.exe # 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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 OpenThreadsWin32d.lib producerd.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgwindowsd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" +# ADD LINK32 OpenThreadsWin32d.lib opengl32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmt" /out:"$(OutDir)/osgwindowsd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib" # SUBTRACT LINK32 /incremental:no !ENDIF diff --git a/examples/osgcamera/GNUmakefile.inst b/examples/osgcamera/GNUmakefile.inst index 223881046..d1a97a6b5 100644 --- a/examples/osgcamera/GNUmakefile.inst +++ b/examples/osgcamera/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgcamera.cpp\ -LIBS += -lProducer -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgcamera -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgcatch/GNUmakefile b/examples/osgcatch/GNUmakefile index 98d1da7bc..5cbe28d91 100644 --- a/examples/osgcatch/GNUmakefile +++ b/examples/osgcatch/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgcatch.cpp\ -LIBS += -losgViewer -losgParticle -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgParticle -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgcatch/GNUmakefile.inst b/examples/osgcatch/GNUmakefile.inst index 795ddf736..e44f05be3 100644 --- a/examples/osgcatch/GNUmakefile.inst +++ b/examples/osgcatch/GNUmakefile.inst @@ -4,12 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgcatch.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgcatch -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - - include $(TOPDIR)/Make/makerules diff --git a/examples/osgcatch/osgcatch.cpp b/examples/osgcatch/osgcatch.cpp index 1ac42d9fa..2123e28f9 100644 --- a/examples/osgcatch/osgcatch.cpp +++ b/examples/osgcatch/osgcatch.cpp @@ -1353,152 +1353,6 @@ void GameEventHandler::createNewCatchable() -#if 0 - -#include - -class CompileStateCallback : public osgProducer::OsgCameraGroup::RealizeCallback -{ - public: - CompileStateCallback(GameEventHandler* eh):_gameEventHandler(eh) {} - - virtual void operator()( osgProducer::OsgCameraGroup&, osgProducer::OsgSceneHandler& sh, const Producer::RenderSurface& ) - { - // now safe to construct - sh.init(); - - { - OpenThreads::ScopedLock lock(_mutex); - - if (_gameEventHandler) - { - _gameEventHandler->compileGLObjects(*(sh.getSceneView()->getState())); - } - } - } - - - OpenThreads::Mutex _mutex; - GameEventHandler* _gameEventHandler; - -}; - -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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use node masks to create stereo images."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] image_file_left_eye image_file_right_eye"); - arguments.getApplicationUsage()->addCommandLineOption("-d ","Time delay in sceonds between the display of successive image pairs when in auto advance mode."); - arguments.getApplicationUsage()->addCommandLineOption("-a","Enter auto advance of image pairs on start up."); - arguments.getApplicationUsage()->addCommandLineOption("-x ","Horizontal offset of left and right images."); - arguments.getApplicationUsage()->addCommandLineOption("-y ","Vertical offset of left and right images."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - - - // construct the viewer. - osgProducer::Viewer viewer(arguments); - - // set up the value with sensible default event handlers. - viewer.setUpViewer(osgProducer::Viewer::ESCAPE_SETS_DONE); - - // register the handler to add keyboard and mosue handling. - GameEventHandler* seh = new GameEventHandler(); - viewer.getEventHandlerList().push_front(seh); - - while (arguments.read("--boy")) seh->addPlayer(GameEventHandler::PLAYER_BOY); - while (arguments.read("--girl")) seh->addPlayer(GameEventHandler::PLAYER_GIRL); - - - - // 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; - } - - // now the windows have been realized we switch off the cursor to prevent it - // distracting the people seeing the stereo images. - float fovy = 1.0f; - for( unsigned int i = 0; i < viewer.getNumberOfCameras(); i++ ) - { - Producer::Camera* cam = viewer.getCamera(i); - Producer::RenderSurface* rs = cam->getRenderSurface(); - rs->useCursor(false); - fovy = osg::DegreesToRadians(cam->getLensVerticalFov()); - } - - seh->setFOVY(fovy); - - // enable the image cache so we don't need to keep loading the particle files - osgDB::ReaderWriter::Options* options = new osgDB::ReaderWriter::Options; - options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_IMAGES); - osgDB::Registry::instance()->setOptions(options); - - - // creat the scene from the file list. - osg::ref_ptr rootNode = seh->createScene(); - - //osgDB::writeNodeFile(*rootNode,"test.osg"); - - // set the scene to render - viewer.setSceneData(rootNode.get()); - - viewer.setRealizeCallback(new CompileStateCallback(seh)); - - // create the windows and run the threads, note has to be single threaded - // due to use osgParticle - viewer.realize(Producer::CameraGroup::SingleThreaded); - - viewer.requestWarpPointer(0.5f,0.5f); - - - 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(); - - viewer.setView(seh->getCameraPosition()); - - // fire off the cull and draw traversals of the scene. - viewer.frame(); - - } - - // wait for all cull and draw threads to complete. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - return 0; -} -#else - #include #include @@ -1598,5 +1452,3 @@ int main( int argc, char **argv ) return 0; } - -#endif diff --git a/examples/osgcluster/osgcluster.cpp b/examples/osgcluster/osgcluster.cpp index e02660bb3..83089c8fa 100644 --- a/examples/osgcluster/osgcluster.cpp +++ b/examples/osgcluster/osgcluster.cpp @@ -413,7 +413,7 @@ int main( int argc, char **argv ) osg::ArgumentParser arguments(&argc,argv); // set up the usage document, in case we need to print out how to use this program. - arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates how to approach implementation of clustering. Note, cluster support will soon be encompassed in Producer itself."); + arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates how to approach implementation of clustering."); arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets."); diff --git a/examples/osgimpostor/GNUmakefile.inst b/examples/osgimpostor/GNUmakefile.inst index 121b270c6..aad17615d 100644 --- a/examples/osgimpostor/GNUmakefile.inst +++ b/examples/osgimpostor/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgimpostor.cpp\ -LIBS += -losgProducer -lProducer -losgSim -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgSim -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgimpostor -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgkeyboardmouse/GNUmakefile b/examples/osgkeyboardmouse/GNUmakefile index 731307174..bc9ab0db8 100644 --- a/examples/osgkeyboardmouse/GNUmakefile +++ b/examples/osgkeyboardmouse/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgkeyboardmouse.cpp\ -LIBS += -lProducer -losgFX -losgViewer -losgGA -losgDB -losgUtil -losg $(X_LIBS) $(OTHER_LIBS) -lOpenThreads +LIBS += -losgViewer -losgFX -losgViewer -losgGA -losgDB -losgUtil -losg $(X_LIBS) $(OTHER_LIBS) -lOpenThreads INSTFILES = \ $(CXXFILES)\ @@ -12,16 +12,5 @@ INSTFILES = \ EXEC = osgkeyboardmouse -INC += $(X_INC) -LDFLAGS += -L/usr/X11R6/lib - - -ifeq ($(USE_OPEN_THREAD),1) - DEF += -D_USE_OPEN_THREAD - INC += $(INC_OPEN_THREAD) - LDFLAGS += $(LIB_OPEN_THREAD) - LIBS += -lOpenThread -endif - include $(TOPDIR)/Make/makerules diff --git a/examples/osgkeyboardmouse/GNUmakefile.inst b/examples/osgkeyboardmouse/GNUmakefile.inst index 1e28e44c9..30c982c03 100644 --- a/examples/osgkeyboardmouse/GNUmakefile.inst +++ b/examples/osgkeyboardmouse/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgkeyboardmouse.cpp\ -LIBS += -lProducer -losgFX -losgViewer -losgGA -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgFX -losgViewer -losgGA -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgkeyboardmouse -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgkeyboardmouse/osgkeyboardmouse.cpp b/examples/osgkeyboardmouse/osgkeyboardmouse.cpp index 1a0c48e72..2b7315bec 100644 --- a/examples/osgkeyboardmouse/osgkeyboardmouse.cpp +++ b/examples/osgkeyboardmouse/osgkeyboardmouse.cpp @@ -3,10 +3,6 @@ // Simple example of use of Producer::RenderSurface + KeyboardMouseCallback + SimpleViewer // example that provides the user with control over view position with basic picking. -#include -#include -#include - #include #include #include @@ -22,87 +18,11 @@ #include #include +#include #include -// ----------- Begining of glue classes to adapter Producer's keyboard mouse events to osgGA's abstraction events. -class MyKeyboardMouseCallback : public Producer::KeyboardMouseCallback -{ -public: - - MyKeyboardMouseCallback(osgGA::EventQueue* eventQueue) : - _done(false), - _eventQueue(eventQueue) - { - } - - virtual void shutdown() - { - _done = true; - } - - virtual void specialKeyPress( Producer::KeyCharacter key ) - { - if (key==Producer::KeyChar_Escape) - shutdown(); - - _eventQueue->keyPress( (osgGA::GUIEventAdapter::KeySymbol) key ); - } - - virtual void specialKeyRelease( Producer::KeyCharacter key ) - { - _eventQueue->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) key ); - } - - virtual void keyPress( Producer::KeyCharacter key) - { - _eventQueue->keyPress( (osgGA::GUIEventAdapter::KeySymbol) key ); - } - - virtual void keyRelease( Producer::KeyCharacter key) - { - _eventQueue->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) key ); - } - - virtual void mouseMotion( float mx, float my ) - { - _eventQueue->mouseMotion( mx, my ); - } - - virtual void buttonPress( float mx, float my, unsigned int mbutton ) - { - _eventQueue->mouseButtonPress(mx, my, mbutton); - } - - virtual void buttonRelease( float mx, float my, unsigned int mbutton ) - { - _eventQueue->mouseButtonRelease(mx, my, mbutton); - } - - bool done() { return _done; } - -private: - - bool _done; - osg::ref_ptr _eventQueue; -}; - -class MyActionAdapter : public osgGA::GUIActionAdapter, public osg::Referenced -{ -public: - // Override from GUIActionAdapter - virtual void requestRedraw() {} - - // Override from GUIActionAdapter - virtual void requestContinuousUpdate(bool =true) {} - - // Override from GUIActionAdapter - virtual void requestWarpPointer(float ,float ) {} - -}; - -// ----------- End of glue classes to adapter Producer's keyboard mouse events to osgGA's abstraction events. - +#include class CreateModelToSaveVisitor : public osg::NodeVisitor { @@ -135,8 +55,46 @@ public: bool _addToModel; }; +class ExitHandler : public osgGA::GUIEventHandler +{ +public: + + ExitHandler(): + _done(false) {} + + bool done() const { return _done; } + + bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&) + { + switch(ea.getEventType()) + { + case(osgGA::GUIEventAdapter::KEYUP): + { + if (ea.getKey()==osgGA::GUIEventAdapter::KEY_Escape) + { + _done = true; + } + return false; + } + case(osgGA::GUIEventAdapter::CLOSE_WINDOW): + case(osgGA::GUIEventAdapter::QUIT_APPLICATION): + { + _done = true; + } + default: break; + } + + return false; + } + + bool _done; +}; + + + // class to handle events with a pick -class PickHandler : public osgGA::GUIEventHandler { +class PickHandler : public osgGA::GUIEventHandler +{ public: PickHandler(): @@ -330,22 +288,32 @@ int main( int argc, char **argv ) } // create the window to draw to. - osg::ref_ptr renderSurface = new Producer::RenderSurface; - renderSurface->setWindowName("osgkeyboardmouse"); - renderSurface->setWindowRectangle(100,100,800,600); - renderSurface->useBorder(true); - renderSurface->realize(); - + osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->x = 200; + traits->y = 200; + traits->width = 800; + traits->height = 600; + traits->windowDecoration = true; + traits->doubleBuffer = true; + traits->sharedContext = 0; + + osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); + osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); + if (!gw) + { + osg::notify(osg::NOTICE)<<"Error: unable to create graphics window."<realize(); + gw->makeCurrent(); // create the view of the scene. osgViewer::SimpleViewer viewer; viewer.setSceneData(loadedModel.get()); - // set up a KeyboardMouse to manage the events comming in from the RenderSurface - osg::ref_ptr kbm = new Producer::KeyboardMouse(renderSurface.get()); - - // create a KeyboardMouseCallback to handle the mouse events within this applications - osg::ref_ptr kbmcb = new MyKeyboardMouseCallback(viewer.getEventQueue()); + viewer.setEventQueue(gw->getEventQueue()); + viewer.getEventQueue()->windowResize(traits->x,traits->y,traits->width,traits->height); // create a tracball manipulator to move the camera around in response to keyboard/mouse events viewer.setCameraManipulator( new osgGA::TrackballManipulator ); @@ -356,35 +324,23 @@ int main( int argc, char **argv ) // add the pick handler viewer.addEventHandler(new PickHandler()); - - // set the window dimensions - viewer.getEventQueue()->getCurrentEventState()->setWindowRectangle(100,100,800,600); - // set the mouse input range. - // Producer defaults to using non-dimensional units, so we pass this onto osgGA, most windowing toolkits use pixel coords so use the window size instead. - viewer.getEventQueue()->setUseFixedMouseInputRange(true); - viewer.getEventQueue()->setMouseInputRange(-1.0, -1.0, 1.0, 1.0); - // Producer has the y axis increase upwards, like OpenGL, and contary to most Windowing toolkits. - // we need to construct the event queue so that it knows about this convention. - viewer.getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS); - + // add the exit handler' + ExitHandler* exitHandler = new ExitHandler; + viewer.addEventHandler(exitHandler); viewer.init(); // main loop (note, window toolkits which take control over the main loop will require a window redraw callback containing the code below.) - while( renderSurface->isRealized() && !kbmcb->done()) + while( gw->isRealized() && !exitHandler->done()) { - // update the window dimensions, in case the window has been resized. - viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight()); - - // pass any keyboard mouse events onto the local keyboard mouse callback. - kbm->update( *kbmcb ); + gw->checkEvents(); viewer.frame(); // Swap Buffers - renderSurface->swapBuffers(); + gw->swapBuffers(); } return 0; diff --git a/examples/osgsimple/GNUmakefile b/examples/osgsimple/GNUmakefile index 9ee231af5..e78f83051 100644 --- a/examples/osgsimple/GNUmakefile +++ b/examples/osgsimple/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgsimple.cpp\ -LIBS += -lProducer -losgViewer -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads +LIBS += -losgViewer -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads INSTFILES = \ $(CXXFILES)\ @@ -12,16 +12,5 @@ INSTFILES = \ EXEC = osgsimple -INC += $(X_INC) -LDFLAGS += -L/usr/X11R6/lib - - -ifeq ($(USE_OPEN_THREAD),1) - DEF += -D_USE_OPEN_THREAD - INC += $(INC_OPEN_THREAD) - LDFLAGS += $(LIB_OPEN_THREAD) - LIBS += -lOpenThread -endif - include $(TOPDIR)/Make/makerules diff --git a/examples/osgsimple/GNUmakefile.inst b/examples/osgsimple/GNUmakefile.inst index ad7e6353d..00d361233 100644 --- a/examples/osgsimple/GNUmakefile.inst +++ b/examples/osgsimple/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgsimple.cpp\ -LIBS += -lProducer -losgViewer -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgsimple -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgsimple/osgsimple.cpp b/examples/osgsimple/osgsimple.cpp index 589fceba6..94dcbea1c 100644 --- a/examples/osgsimple/osgsimple.cpp +++ b/examples/osgsimple/osgsimple.cpp @@ -3,12 +3,46 @@ // Simple example of use of Producer::RenderSurface to create an OpenGL // graphics window, and OSG for rendering. -#include - #include #include #include +#include +#include +class ExitHandler : public osgGA::GUIEventHandler +{ +public: + + ExitHandler(): + _done(false) {} + + bool done() const { return _done; } + + bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&) + { + switch(ea.getEventType()) + { + case(osgGA::GUIEventAdapter::KEYUP): + { + if (ea.getKey()==osgGA::GUIEventAdapter::KEY_Escape) + { + _done = true; + } + return false; + } + case(osgGA::GUIEventAdapter::CLOSE_WINDOW): + case(osgGA::GUIEventAdapter::QUIT_APPLICATION): + { + _done = true; + } + default: break; + } + + return false; + } + + bool _done; +}; int main( int argc, char **argv ) { @@ -26,27 +60,48 @@ int main( int argc, char **argv ) return 1; } - // create the window to draw to. - osg::ref_ptr renderSurface = new Producer::RenderSurface; - renderSurface->setWindowName("osgsimple"); - renderSurface->setWindowRectangle(100,100,800,600); - renderSurface->useBorder(true); - renderSurface->realize(); - - osgViewer::SimpleViewer viewer; + + osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->x = 200; + traits->y = 200; + traits->width = 800; + traits->height = 600; + traits->windowDecoration = true; + traits->doubleBuffer = true; + traits->sharedContext = 0; + + osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); + osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); + if (!gw) + { + osg::notify(osg::NOTICE)<<"Error: unable to create graphics window."<getEventQueue()); + viewer.getEventQueue()->windowResize(traits->x,traits->y,traits->width,traits->height); + + gc->realize(); + gc->makeCurrent(); + + viewer.setSceneData(loadedModel.get()); + // add the exit handler' + ExitHandler* exitHandler = new ExitHandler; + viewer.addEventHandler(exitHandler); + // initialize the view to look at the center of the scene graph const osg::BoundingSphere& bs = loadedModel->getBound(); osg::Matrix viewMatrix; viewMatrix.makeLookAt(bs.center()-osg::Vec3(0.0,2.0f*bs.radius(),0.0),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); + // main loop (note, window toolkits which take control over the main loop will require a window redraw callback containing the code below.) - while( renderSurface->isRealized() ) - { - // update the window dimensions, in case the window has been resized. - viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight()); + while( gw->isRealized() && !exitHandler->done() ) + { + // check the window evnts + gw->checkEvents(); // set the view viewer.getCamera()->setViewMatrix(viewMatrix); @@ -55,7 +110,7 @@ int main( int argc, char **argv ) viewer.frame(); // Swap Buffers - renderSurface->swapBuffers(); + gw->swapBuffers(); } return 0; diff --git a/examples/osgsimplifier/GNUmakefile.inst b/examples/osgsimplifier/GNUmakefile.inst index 2cf967bf6..0cfb7e5c5 100644 --- a/examples/osgsimplifier/GNUmakefile.inst +++ b/examples/osgsimplifier/GNUmakefile.inst @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgsimplifier.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgsimplifier diff --git a/examples/osgslice/osgslice.cpp b/examples/osgslice/osgslice.cpp index 609ad6b77..81a789ada 100644 --- a/examples/osgslice/osgslice.cpp +++ b/examples/osgslice/osgslice.cpp @@ -1,6 +1,6 @@ // C++ source file - (C) 2003 Robert Osfield, released under the OSGPL. // -// Simple example of use of Producer::RenderSurface to create an OpenGL +// Simple example of use of osg::GraphicContext to create an OpenGL // graphics window, and OSG for rendering. #include diff --git a/examples/osgteapot/GNUmakefile b/examples/osgteapot/GNUmakefile index e90dae34a..ab6640a6f 100644 --- a/examples/osgteapot/GNUmakefile +++ b/examples/osgteapot/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgteapot.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgteapot/GNUmakefile.inst b/examples/osgteapot/GNUmakefile.inst index 43e197256..e836ff053 100644 --- a/examples/osgteapot/GNUmakefile.inst +++ b/examples/osgteapot/GNUmakefile.inst @@ -2,13 +2,10 @@ TOPDIR = ../.. include $(TOPDIR)/Make/makedefs CXXFILES =\ - osgcube.cpp\ + osgteapot.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -EXEC = osgcube - -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) +EXEC = osgteapot include $(TOPDIR)/Make/makerules diff --git a/examples/osgteapot/osgteapot.cpp b/examples/osgteapot/osgteapot.cpp index b9ded5c91..18af9e412 100644 --- a/examples/osgteapot/osgteapot.cpp +++ b/examples/osgteapot/osgteapot.cpp @@ -4,7 +4,7 @@ #include -#include +#include // The classic OpenGL teapot... taken form glut-3.7/lib/glut/glut_teapot.c @@ -314,69 +314,12 @@ osg::Geode* createTeapot() 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates how to encpsulate OpenGL rendering code via sublcassing of osg::Drawable.."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - // 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; - } + osgViewer::Viewer viewer; // add model to viewer. viewer.setSceneData( createTeapot() ); // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - return 0; + return viewer.run(); } diff --git a/examples/osgtessellate/GNUmakefile b/examples/osgtessellate/GNUmakefile index 9e4911943..e61fc7f6a 100644 --- a/examples/osgtessellate/GNUmakefile +++ b/examples/osgtessellate/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtessellate.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtessellate/GNUmakefile.inst b/examples/osgtessellate/GNUmakefile.inst index 0712d8c62..f8c78d017 100644 --- a/examples/osgtessellate/GNUmakefile.inst +++ b/examples/osgtessellate/GNUmakefile.inst @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtessellate.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtessellate diff --git a/examples/osgtessellate/osgtessellate.cpp b/examples/osgtessellate/osgtessellate.cpp index 88564989c..7740bfa5f 100644 --- a/examples/osgtessellate/osgtessellate.cpp +++ b/examples/osgtessellate/osgtessellate.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -740,42 +740,11 @@ public: 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 provides an example of doing tesseleation.."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - // 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; - } - - // report any errors if they have occured when parsing the program aguments. - if (arguments.errors()) - { - arguments.writeErrorMessages(std::cout); - return 1; - } - - osg::Timer timer; - osg::Timer_t start_tick = timer.tick(); + osgViewer::Viewer viewer; // read the scene from the list of file specified commandline args. osg::ref_ptr loadedModel = osgDB::readNodeFiles(arguments); @@ -784,30 +753,19 @@ int main( int argc, char **argv ) if (!loadedModel) { loadedModel=makeTessellateExample(); + } else { // if there is a loaded model: + // tessellate by searching for geode called tessellate & tessellate it setTessellateVisitor tsv; loadedModel->accept(tsv); + } // create the hud. osg::Group *gload= dynamic_cast (loadedModel.get()); gload->addChild(createHUD()); - - // 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); - } - - osg::Timer_t end_tick = timer.tick(); - - std::cout << "Time to load = "< #include -#include +#include #include #include @@ -469,75 +469,19 @@ osg::Group* create3DText(const osg::Vec3& center,float radius) return rootNode; } -int main( int argc, char **argv ) +int main(int , char **) { - // 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of text."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] [filename] ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - - // 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; - } - - - // read the scene from the list of file specified commandline args. - osg::ref_ptr rootNode = osgDB::readNodeFiles(arguments); + osgViewer::Viewer viewer; // prepare scene. { - osg::Vec3 center(0.0f,0.0f,0.0f); float radius = 1.0f; - if (rootNode.valid()) - { - // optimize the scene graph, remove rendundent nodes and state etc. - osgUtil::Optimizer optimizer; - optimizer.optimize(rootNode.get()); - - const osg::BoundingSphere& bs = rootNode->getBound(); - center = bs.center(); - radius = bs.radius(); - } - // make sure the root node is group so we can add extra nodes to it. - osg::Group* group = dynamic_cast(rootNode.get()); - if (!group) - { - group = new osg::Group; - - if (rootNode.valid()) group->addChild(rootNode.get()); - - rootNode = group; - } - + osg::Group* group = new osg::Group; + { // create the hud. osg::Camera* camera = new osg::Camera; @@ -553,55 +497,10 @@ int main( int argc, char **argv ) group->addChild(create3DText(center,radius)); + // set the scene to render + viewer.setSceneData(group); } - // set the scene to render - viewer.setSceneData(rootNode.get()); - - - // create the windows and run the threads. - viewer.realize(); - -#if 0 - // this optional compile block is done as a test against graphics - // drivers that claim support for generate mip map, but the actual - // implementation is flacky. It is not compiled by default. - - // go through each graphics context and switch off the generate mip map extension. - // note, this must be done after the realize so that init of texture state and as - // result extension structures have been iniatilized. - for(unsigned int contextID = 0; - contextIDgetMaxNumberOfGraphicsContexts(); - ++contextID) - { - osg::Texture::Extensions* textureExt = osg::Texture::getExtensions(contextID,false); - if (textureExt) textureExt->setGenerateMipMapSupported(false); - } -#endif - - 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - return 0; + return viewer.run(); } diff --git a/examples/osgtexture1D/GNUmakefile b/examples/osgtexture1D/GNUmakefile index 0c234409f..57ae3dc9b 100644 --- a/examples/osgtexture1D/GNUmakefile +++ b/examples/osgtexture1D/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture1D.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtexture1D/GNUmakefile.inst b/examples/osgtexture1D/GNUmakefile.inst index 79b316520..a329747d9 100644 --- a/examples/osgtexture1D/GNUmakefile.inst +++ b/examples/osgtexture1D/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture1D.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtexture1D -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture1D/osgtexture1D.cpp b/examples/osgtexture1D/osgtexture1D.cpp index 632709d76..c01dc3162 100644 --- a/examples/osgtexture1D/osgtexture1D.cpp +++ b/examples/osgtexture1D/osgtexture1D.cpp @@ -6,8 +6,9 @@ #include #include -#include +#include +#include // Creates a stateset which contains a 1D texture which is populated by contour banded color // this is then used in conjunction with TexGen to create contoured models, either in @@ -142,98 +143,32 @@ 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of 1D textures."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); // 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; - } + osgViewer::Viewer viewer; // load the images specified on command line osg::Node* loadedModel = osgDB::readNodeFiles(arguments); - - if (loadedModel) - { - - osg::StateSet* stateset = create1DTextureStateToDecorate(loadedModel); - if (!stateset) - { - std::cout<<"Error: failed to create 1D texture state."<setStateSet(stateset); - loadedModel->setUpdateCallback(new AnimateStateCallback()); - - // add model to viewer. - viewer.setSceneData( loadedModel ); - - // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - } - else + if (!loadedModel) { osg::notify(osg::NOTICE)<getCommandLineUsage()<setStateSet(stateset); + loadedModel->setUpdateCallback(new AnimateStateCallback()); + + // add model to viewer. + viewer.setSceneData( loadedModel ); + + return viewer.run(); } diff --git a/examples/osgtexture2D/GNUmakefile b/examples/osgtexture2D/GNUmakefile index cac3fe897..1688ee3e1 100644 --- a/examples/osgtexture2D/GNUmakefile +++ b/examples/osgtexture2D/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture2D.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtexture2D/GNUmakefile.inst b/examples/osgtexture2D/GNUmakefile.inst index e23695966..2f129ba80 100644 --- a/examples/osgtexture2D/GNUmakefile.inst +++ b/examples/osgtexture2D/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture2D.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtexture2D -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture2D/osgtexture2D.cpp b/examples/osgtexture2D/osgtexture2D.cpp index e751e7d56..fe597d7df 100644 --- a/examples/osgtexture2D/osgtexture2D.cpp +++ b/examples/osgtexture2D/osgtexture2D.cpp @@ -12,7 +12,7 @@ #include -#include +#include /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -680,76 +680,13 @@ osg::Node* createModel() return root; } -int main( int argc, char **argv ) +int main(int , char **) { - - // 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of 2D textures."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - // 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; - } - - // create a model from the images. - osg::Node* rootNode = createModel(); + osgViewer::Viewer viewer; // add model to viewer. - viewer.setSceneData( rootNode ); + viewer.setSceneData( createModel() ); - // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - - - return 0; + return viewer.run(); } diff --git a/examples/osgtexture3D/GNUmakefile b/examples/osgtexture3D/GNUmakefile index f11e26d22..af1d838ab 100644 --- a/examples/osgtexture3D/GNUmakefile +++ b/examples/osgtexture3D/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture3D.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtexture3D/GNUmakefile.inst b/examples/osgtexture3D/GNUmakefile.inst index 1f2a80cbf..40a973b9b 100644 --- a/examples/osgtexture3D/GNUmakefile.inst +++ b/examples/osgtexture3D/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexture3D.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtexture3D -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexture3D/osgtexture3D.cpp b/examples/osgtexture3D/osgtexture3D.cpp index 04cbfcb22..a5001b828 100644 --- a/examples/osgtexture3D/osgtexture3D.cpp +++ b/examples/osgtexture3D/osgtexture3D.cpp @@ -8,8 +8,9 @@ #include #include -#include +#include +#include // // A simple demo demonstrating different texturing modes, @@ -20,115 +21,124 @@ typedef std::vector< osg::ref_ptr > ImageList; -class ConstructStateCallback : public osgProducer::OsgCameraGroup::RealizeCallback -{ +class MyGraphicsContext { public: - ConstructStateCallback(osg::Node* node):_node(node),_initialized(false) {} - - osg::StateSet* constructState() + MyGraphicsContext() { - - // read 4 2d images - osg::ref_ptr image_0 = osgDB::readImageFile("Images/lz.rgb"); - osg::ref_ptr image_1 = osgDB::readImageFile("Images/reflect.rgb"); - osg::ref_ptr image_2 = osgDB::readImageFile("Images/tank.rgb"); - osg::ref_ptr image_3 = osgDB::readImageFile("Images/skymap.jpg"); + osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->x = 0; + traits->y = 0; + traits->width = 1; + traits->height = 1; + traits->windowDecoration = false; + traits->doubleBuffer = false; + traits->sharedContext = 0; + traits->pbuffer = true; - if (!image_0 || !image_1 || !image_2 || !image_3) + _gc = osg::GraphicsContext::createGraphicsContext(traits.get()); + + if (!_gc) { - std::cout << "Warning: could not open files."<pbuffer = false; + _gc = osg::GraphicsContext::createGraphicsContext(traits.get()); } - if (image_0->getPixelFormat()!=image_1->getPixelFormat() || image_0->getPixelFormat()!=image_2->getPixelFormat() || image_0->getPixelFormat()!=image_3->getPixelFormat()) + if (_gc.valid()) { - std::cout << "Warning: image pixel formats not compatible."<realize(); + _gc->makeCurrent(); } - - // get max 3D texture size - GLint textureSize = osg::Texture3D::getExtensions(0,true)->maxTexture3DSize(); - if (textureSize > 256) - textureSize = 256; - - // scale them all to the same size. - image_0->scaleImage(textureSize,textureSize,1); - image_1->scaleImage(textureSize,textureSize,1); - image_2->scaleImage(textureSize,textureSize,1); - image_3->scaleImage(textureSize,textureSize,1); - - - // then allocated a 3d image to use for texturing. - osg::Image* image_3d = new osg::Image; - image_3d->allocateImage(textureSize,textureSize,4, - image_0->getPixelFormat(),image_0->getDataType()); - - // copy the 2d images into the 3d image. - image_3d->copySubImage(0,0,0,image_0.get()); - image_3d->copySubImage(0,0,1,image_1.get()); - image_3d->copySubImage(0,0,2,image_2.get()); - image_3d->copySubImage(0,0,3,image_3.get()); - - image_3d->setInternalTextureFormat(image_0->getInternalTextureFormat()); - - // set up the 3d texture itself, - // note, well set the filtering up so that mip mapping is disabled, - // gluBuild3DMipsmaps doesn't do a very good job of handled the - // inbalanced dimensions of the 256x256x4 texture. - osg::Texture3D* texture3D = new osg::Texture3D; - texture3D->setFilter(osg::Texture3D::MIN_FILTER,osg::Texture3D::LINEAR); - texture3D->setFilter(osg::Texture3D::MAG_FILTER,osg::Texture3D::LINEAR); - texture3D->setWrap(osg::Texture3D::WRAP_R,osg::Texture3D::REPEAT); - texture3D->setImage(image_3d); - - - // create a texgen to generate a R texture coordinate, the geometry - // itself will supply the S & T texture coordinates. - // in the animateStateSet callback well alter this R value to - // move the texture through the 3d texture, 3d texture filtering - // will do the blending for us. - osg::TexGen* texgen = new osg::TexGen; - texgen->setMode(osg::TexGen::OBJECT_LINEAR); - texgen->setPlane(osg::TexGen::R, osg::Plane(0.0f,0.0f,0.0f,0.2f)); - - // create the StateSet to store the texture data - osg::StateSet* stateset = new osg::StateSet; - stateset->setTextureMode(0,GL_TEXTURE_GEN_R,osg::StateAttribute::ON); - stateset->setTextureAttribute(0,texgen); - stateset->setTextureAttributeAndModes(0,texture3D,osg::StateAttribute::ON); - - return stateset; - } - - virtual void operator()( osgProducer::OsgCameraGroup&, osgProducer::OsgSceneHandler& sh, const Producer::RenderSurface& ) - { - { - OpenThreads::ScopedLock lock(_mutex); - - if (!_initialized) - { - - // only initialize state once, only need for cases where multiple graphics contexts are - // if which case this callback can get called multiple times. - _initialized = true; - - if (_node) _node->setStateSet(constructState()); - } - - } - - // now safe to con - sh.init(); - } + bool valid() const { return _gc.valid() && _gc->isRealized(); } - OpenThreads::Mutex _mutex; - osg::Node* _node; - bool _initialized; - + private: + osg::ref_ptr _gc; }; + +osg::StateSet* createState() +{ + MyGraphicsContext gc; + if (!gc.valid()) + { + osg::notify(osg::NOTICE)<<"Unable to create the graphics context required to build 3d image."< image_0 = osgDB::readImageFile("Images/lz.rgb"); + osg::ref_ptr image_1 = osgDB::readImageFile("Images/reflect.rgb"); + osg::ref_ptr image_2 = osgDB::readImageFile("Images/tank.rgb"); + osg::ref_ptr image_3 = osgDB::readImageFile("Images/skymap.jpg"); + + if (!image_0 || !image_1 || !image_2 || !image_3) + { + std::cout << "Warning: could not open files."<getPixelFormat()!=image_1->getPixelFormat() || image_0->getPixelFormat()!=image_2->getPixelFormat() || image_0->getPixelFormat()!=image_3->getPixelFormat()) + { + std::cout << "Warning: image pixel formats not compatible."<maxTexture3DSize(); + if (textureSize > 256) + textureSize = 256; + + // scale them all to the same size. + image_0->scaleImage(textureSize,textureSize,1); + image_1->scaleImage(textureSize,textureSize,1); + image_2->scaleImage(textureSize,textureSize,1); + image_3->scaleImage(textureSize,textureSize,1); + + + // then allocated a 3d image to use for texturing. + osg::Image* image_3d = new osg::Image; + image_3d->allocateImage(textureSize,textureSize,4, + image_0->getPixelFormat(),image_0->getDataType()); + + // copy the 2d images into the 3d image. + image_3d->copySubImage(0,0,0,image_0.get()); + image_3d->copySubImage(0,0,1,image_1.get()); + image_3d->copySubImage(0,0,2,image_2.get()); + image_3d->copySubImage(0,0,3,image_3.get()); + + image_3d->setInternalTextureFormat(image_0->getInternalTextureFormat()); + + // set up the 3d texture itself, + // note, well set the filtering up so that mip mapping is disabled, + // gluBuild3DMipsmaps doesn't do a very good job of handled the + // inbalanced dimensions of the 256x256x4 texture. + osg::Texture3D* texture3D = new osg::Texture3D; + texture3D->setFilter(osg::Texture3D::MIN_FILTER,osg::Texture3D::LINEAR); + texture3D->setFilter(osg::Texture3D::MAG_FILTER,osg::Texture3D::LINEAR); + texture3D->setWrap(osg::Texture3D::WRAP_R,osg::Texture3D::REPEAT); + texture3D->setImage(image_3d); + + + // create a texgen to generate a R texture coordinate, the geometry + // itself will supply the S & T texture coordinates. + // in the animateStateSet callback well alter this R value to + // move the texture through the 3d texture, 3d texture filtering + // will do the blending for us. + osg::TexGen* texgen = new osg::TexGen; + texgen->setMode(osg::TexGen::OBJECT_LINEAR); + texgen->setPlane(osg::TexGen::R, osg::Plane(0.0f,0.0f,0.0f,0.2f)); + + // create the StateSet to store the texture data + osg::StateSet* stateset = new osg::StateSet; + stateset->setTextureMode(0,GL_TEXTURE_GEN_R,osg::StateAttribute::ON); + stateset->setTextureAttribute(0,texgen); + stateset->setTextureAttributeAndModes(0,texture3D,osg::StateAttribute::ON); + + return stateset; +} + + class UpdateStateCallback : public osg::NodeCallback { public: @@ -213,90 +223,20 @@ osg::Node* createModel() // osg::Image::copySubImage() without using GLU which will get round // this current limitation. geode->setUpdateCallback(new UpdateStateCallback()); + geode->setStateSet(createState()); return geode; } -int main( int argc, char **argv ) +int main(int , char **) { - - // 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use of 3D textures."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - - // construct the viewer. - osgProducer::Viewer viewer(arguments); + osgViewer::Viewer viewer; - // set up the value with sensible default event handlers. - viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); + // create a model from the images and pass it to the viewer. + viewer.setSceneData(createModel()); - // 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; - } - - // create a model from the images. - osg::Node* rootNode = createModel(); - - if (rootNode) - { - - // set the scene to render - viewer.setSceneData(rootNode); - - // the construct state uses gl commands to resize images so we are forced - // to only call it once a valid graphics context has been established, - // for that we use a realize callback. - viewer.setRealizeCallback(new ConstructStateCallback(rootNode)); - - // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - } - - return 0; + return viewer.run(); } diff --git a/examples/osgtexturerectangle/GNUmakefile b/examples/osgtexturerectangle/GNUmakefile index f8bd146d5..aa5104570 100644 --- a/examples/osgtexturerectangle/GNUmakefile +++ b/examples/osgtexturerectangle/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexturerectangle.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgtexturerectangle/GNUmakefile.inst b/examples/osgtexturerectangle/GNUmakefile.inst index 7265fd332..c196d4557 100644 --- a/examples/osgtexturerectangle/GNUmakefile.inst +++ b/examples/osgtexturerectangle/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgtexturerectangle.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgtexturerectangle -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgtexturerectangle/osgtexturerectangle.cpp b/examples/osgtexturerectangle/osgtexturerectangle.cpp index 8f6b79d11..8d7024bef 100644 --- a/examples/osgtexturerectangle/osgtexturerectangle.cpp +++ b/examples/osgtexturerectangle/osgtexturerectangle.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include /********************************************************************** @@ -238,67 +238,14 @@ 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()->setDescription(arguments.getApplicationName()+" is a demo which demonstrates use of osg::TextureRectangle."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - // 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; - } + osgViewer::Viewer viewer; // create a model from the images. osg::Node* rootNode = createModel((arguments.argc() > 1 ? arguments[1] : "Images/lz.rgb")); // add model to viewer. viewer.setSceneData(rootNode); - - // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - return 0; + return viewer.run(); } diff --git a/examples/osgunittests/GNUmakefile b/examples/osgunittests/GNUmakefile index 11e66d30b..b1b36951d 100644 --- a/examples/osgunittests/GNUmakefile +++ b/examples/osgunittests/GNUmakefile @@ -7,7 +7,7 @@ CXXFILES =\ UnitTests_osg.cpp\ osgunittests.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgunittests/GNUmakefile.inst b/examples/osgunittests/GNUmakefile.inst index 58b05cf6f..46e563355 100644 --- a/examples/osgunittests/GNUmakefile.inst +++ b/examples/osgunittests/GNUmakefile.inst @@ -7,7 +7,7 @@ CXXFILES =\ UnitTests_osg.cpp\ osgunittests.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgunittests diff --git a/examples/osgvertexprogram/GNUmakefile b/examples/osgvertexprogram/GNUmakefile index 5bc584dca..31df9fd4f 100644 --- a/examples/osgvertexprogram/GNUmakefile +++ b/examples/osgvertexprogram/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgvertexprogram.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgvertexprogram/GNUmakefile.inst b/examples/osgvertexprogram/GNUmakefile.inst index 5fd75ba89..2263fbcc9 100644 --- a/examples/osgvertexprogram/GNUmakefile.inst +++ b/examples/osgvertexprogram/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgvertexprogram.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgvertexprogram -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgvertexprogram/osgvertexprogram.cpp b/examples/osgvertexprogram/osgvertexprogram.cpp index 6e8ef2727..aef95ed4e 100644 --- a/examples/osgvertexprogram/osgvertexprogram.cpp +++ b/examples/osgvertexprogram/osgvertexprogram.cpp @@ -23,7 +23,9 @@ #include #include -#include +#include + +#include float refract = 1.02; // ratio of indicies of refraction @@ -344,36 +346,8 @@ 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()->setDescription(arguments.getApplicationName()+" is the example which demonstrate support for ARB_vertex_program."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - // 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; - } + osgViewer::Viewer viewer; osg::Group* rootnode = new osg::Group; @@ -406,10 +380,13 @@ int main(int argc, char *argv[]) viewer.realize(); // now check to see if vertex program is supported. - for(unsigned int contextID = 0; - contextIDgetMaxNumberOfGraphicsContexts(); - ++contextID) + osgViewer::Viewer::Windows windows; + viewer.getWindows(windows); + for(osgViewer::Viewer::Windows::iterator itr = windows.begin(); + itr != windows.end(); + ++itr) { + unsigned int contextID = (*itr)->getState()->getContextID(); osg::VertexProgram::Extensions* vpExt = osg::VertexProgram::getExtensions(contextID,false); if (vpExt) { @@ -421,28 +398,5 @@ int main(int argc, char *argv[]) } } - 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - return 0; + return viewer.run(); } diff --git a/examples/osgvolume/GNUmakefile b/examples/osgvolume/GNUmakefile index 6246af801..a71cd99b5 100644 --- a/examples/osgvolume/GNUmakefile +++ b/examples/osgvolume/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgvolume.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgvolume/GNUmakefile.inst b/examples/osgvolume/GNUmakefile.inst index d9f13a8c4..0ce57bb31 100644 --- a/examples/osgvolume/GNUmakefile.inst +++ b/examples/osgvolume/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgvolume.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgvolume -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index 72f7fa6fd..a59909e67 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -25,7 +25,9 @@ #include -#include +#include + +#include typedef std::vector< osg::ref_ptr > ImageList; @@ -1437,13 +1439,7 @@ int main( int argc, char **argv ) // arguments.getApplicationUsage()->addCommandLineOption("--raw ","read a raw image data"); // 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()); + osgViewer::Viewer viewer; // if user request help write it out to cout. if (arguments.read("-h") || arguments.read("--help")) @@ -1638,31 +1634,8 @@ int main( int argc, char **argv ) // set the scene to render viewer.setSceneData(rootNode); - // 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. - viewer.sync(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); + // the the viewers main frame loop + viewer.run(); } return 0; diff --git a/examples/osgwindows/GNUmakefile b/examples/osgwindows/GNUmakefile index 2b3f7b8d7..bec98c341 100644 --- a/examples/osgwindows/GNUmakefile +++ b/examples/osgwindows/GNUmakefile @@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgwindows.cpp\ -LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ diff --git a/examples/osgwindows/GNUmakefile.inst b/examples/osgwindows/GNUmakefile.inst index a62f3d391..dece9236b 100644 --- a/examples/osgwindows/GNUmakefile.inst +++ b/examples/osgwindows/GNUmakefile.inst @@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs CXXFILES =\ osgwindows.cpp\ -LIBS += -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) EXEC = osgwindows -INC += $(PRODUCER_INCLUDE_DIR) $(X_INC) -LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/examples/osgwindows/osgwindows.cpp b/examples/osgwindows/osgwindows.cpp index 7ca4017b4..0bcb4ee19 100644 --- a/examples/osgwindows/osgwindows.cpp +++ b/examples/osgwindows/osgwindows.cpp @@ -11,117 +11,12 @@ #include #include -#include - -#include - -static Producer::CameraConfig *BuildConfig(void) -{ -#define TWO_SEPERATE_WINDOWS - -#ifdef TWO_SEPERATE_WINDOWS - Producer::RenderSurface *rs1 = new Producer::RenderSurface; - rs1->setScreenNum(0); - rs1->setWindowName("osgwindows"); - //rs1->useBorder(false); - rs1->setWindowRectangle(0,0,640,480); - Producer::Camera *camera1 = new Producer::Camera; - camera1->setRenderSurface(rs1); - camera1->setOffset( 1.0, 0.0 ); - - Producer::RenderSurface *rs2 = new Producer::RenderSurface; - rs2->setScreenNum(0); - rs2->setWindowName("osgwindows"); - //rs2->useBorder(false); - rs2->setWindowRectangle(640,0,640,480); - Producer::Camera *camera2 = new Producer::Camera; - camera2->setRenderSurface(rs2); - camera2->setOffset( -1.0, 0.0 ); - - rs1->setInputRectangle( Producer::RenderSurface::InputRectangle(0.0,0.5,0.0,1.0)); - rs2->setInputRectangle( Producer::RenderSurface::InputRectangle(0.5,1.0,0.0,1.0)); - - Producer::InputArea *ia = new Producer::InputArea; - ia->addRenderSurface(rs1); - ia->addRenderSurface(rs2); - - Producer::CameraConfig *cfg = new Producer::CameraConfig; - cfg->addCamera("Camera 1",camera1); - cfg->addCamera("Camera 2", camera2); - cfg->setInputArea(ia); - return cfg; - -#else - // one window with four camera's. - Producer::Camera* pcam1 = new Producer::Camera (); - pcam1->setProjectionRectangle (0.0f, 0.5f, 0.5f, 1.0f); - - Producer::Camera* pcam2 = new Producer::Camera (); - pcam2->setRenderSurface (pcam1->getRenderSurface ()); - pcam2->setProjectionRectangle (0.5f, 1.0f, 0.5f, 1.0f); - - Producer::Camera* pcam3 = new Producer::Camera (); - pcam3->setRenderSurface (pcam1->getRenderSurface ()); - pcam3->setProjectionRectangle (0.0f, 0.5f, 0.0f, 0.5f); - - Producer::Camera* pcam4 = new Producer::Camera (); - pcam4->setRenderSurface (pcam1->getRenderSurface ()); - pcam4->setProjectionRectangle (0.5f, 1.0f, 0.0f, 0.5f); - - Producer::CameraConfig *cfg = new Producer::CameraConfig; - cfg->addCamera("Camera 1",pcam1); - cfg->addCamera("Camera 2",pcam2); - cfg->addCamera("Camera 3",pcam3); - cfg->addCamera("Camera 4",pcam4); - - return cfg; -#endif -} +#include 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 the example which demonstrate hows to set up programitically a Producer::CameraConfig and use it to set up multiple window views."); - arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ..."); - arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); - - - // construct the viewer. - osgProducer::Viewer viewer(BuildConfig()); - - // 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; - } // read the scene from the list of file specified commandline args. osg::ref_ptr loadedModel = osgDB::readNodeFiles(arguments); @@ -133,6 +28,57 @@ int main( int argc, char **argv ) return 1; } + // construct the viewer. + osgViewer::Viewer viewer; + + // left window + left slave camera + { + osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->x = 0; + traits->y = 0; + traits->width = 640; + traits->height = 480; + traits->windowDecoration = true; + traits->doubleBuffer = true; + traits->sharedContext = 0; + + osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); + + osg::ref_ptr camera = new osg::Camera; + camera->setGraphicsContext(gc.get()); + camera->setViewport(new osg::Viewport(0,0, traits->width, traits->height)); + GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT; + camera->setDrawBuffer(buffer); + camera->setReadBuffer(buffer); + + // add this slave camra to the viewer, with a shift left of the projection matrix + viewer.addSlave(camera.get(), osg::Matrixd::translate(1.0,0.0,0.0), osg::Matrixd()); + } + + // left window + left slave camera + { + osg::ref_ptr traits = new osg::GraphicsContext::Traits; + traits->x = 640; + traits->y = 0; + traits->width = 640; + traits->height = 480; + traits->windowDecoration = true; + traits->doubleBuffer = true; + traits->sharedContext = 0; + + osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); + + osg::ref_ptr camera = new osg::Camera; + camera->setGraphicsContext(gc.get()); + camera->setViewport(new osg::Viewport(0,0, traits->width, traits->height)); + GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT; + camera->setDrawBuffer(buffer); + camera->setReadBuffer(buffer); + + // add this slave camra to the viewer, with a shift right of the projection matrix + viewer.addSlave(camera.get(), osg::Matrixd::translate(-1.0,0.0,0.0), osg::Matrixd()); + } + // optimize the scene graph, remove rendundent nodes and state etc. osgUtil::Optimizer optimizer; @@ -141,32 +87,6 @@ int main( int argc, char **argv ) // set the scene to render viewer.setSceneData(loadedModel.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(); - - // run a clean up frame to delete all OpenGL objects. - viewer.cleanup_frame(); - - // wait for all the clean up frame to complete. - viewer.sync(); - - return 0; + return viewer.run(); }