Ported following examples to osgViewer:

osgteapot
osgtessellate
osgtext
osgtexture1D
osgtexture2D
osgtexture3D
osgtexturerectangle
osgvertexprogram
osgvolume
osgwindows
osgsimple
osgkeyboardmouse
This commit is contained in:
Robert Osfield 2007-01-11 15:19:59 +00:00
parent ab2d9520a6
commit b121c9686f
59 changed files with 460 additions and 1285 deletions

View File

@ -1425,9 +1425,6 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
End Project Dependency End Project Dependency
}}} }}}
@ -2451,7 +2448,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2508,7 +2505,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2538,7 +2535,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2568,7 +2565,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2595,7 +2592,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2625,7 +2622,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2652,7 +2649,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2703,7 +2700,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2814,7 +2811,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil
@ -2841,7 +2838,7 @@ Package=<4>
Project_Dep_Name Core osgGA Project_Dep_Name Core osgGA
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgProducer Project_Dep_Name Core osgViewer
End Project Dependency End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name Core osgUtil Project_Dep_Name Core osgUtil

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgkeyboardmouse - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgpagedlod - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgsimple - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtessellate - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtext - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtexture1D - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtexture2D - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtexture3D - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgtexturerectangle - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgvertexprogram - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgvolume - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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" !ELSEIF "$(CFG)" == "Example osgwindows - Win32 Debug"
@ -68,7 +68,7 @@ LINK32=link.exe
# PROP Target_Dir "" # PROP Target_Dir ""
MTL=midl.exe MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -76,7 +76,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe 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 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 # SUBTRACT LINK32 /incremental:no
!ENDIF !ENDIF

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgcamera.cpp\ 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 EXEC = osgcamera
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgcatch.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,12 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgcatch.cpp\ 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 EXEC = osgcatch
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -1353,152 +1353,6 @@ void GameEventHandler::createNewCatchable()
#if 0
#include <osgProducer/Viewer>
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<OpenThreads::Mutex> 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 <float>","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 <float>","Horizontal offset of left and right images.");
arguments.getApplicationUsage()->addCommandLineOption("-y <float>","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<osg::Node> 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 <osgViewer/Viewer> #include <osgViewer/Viewer>
#include <iostream> #include <iostream>
@ -1598,5 +1452,3 @@ int main( int argc, char **argv )
return 0; return 0;
} }
#endif

View File

@ -413,7 +413,7 @@ int main( int argc, char **argv )
osg::ArgumentParser arguments(&argc,argv); osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program. // 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()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets."); arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets.");

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgimpostor.cpp\ 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 EXEC = osgimpostor
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgkeyboardmouse.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\
@ -12,16 +12,5 @@ INSTFILES = \
EXEC = osgkeyboardmouse 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 include $(TOPDIR)/Make/makerules

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgkeyboardmouse.cpp\ 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 EXEC = osgkeyboardmouse
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -3,10 +3,6 @@
// Simple example of use of Producer::RenderSurface + KeyboardMouseCallback + SimpleViewer // Simple example of use of Producer::RenderSurface + KeyboardMouseCallback + SimpleViewer
// example that provides the user with control over view position with basic picking. // example that provides the user with control over view position with basic picking.
#include <Producer/RenderSurface>
#include <Producer/KeyboardMouse>
#include <Producer/Trackball>
#include <osg/Timer> #include <osg/Timer>
#include <osg/io_utils> #include <osg/io_utils>
#include <osg/observer_ptr> #include <osg/observer_ptr>
@ -22,87 +18,11 @@
#include <osgGA/StateSetManipulator> #include <osgGA/StateSetManipulator>
#include <osgViewer/SimpleViewer> #include <osgViewer/SimpleViewer>
#include <osgViewer/GraphicsWindow>
#include <osgFX/Scribe> #include <osgFX/Scribe>
// ----------- Begining of glue classes to adapter Producer's keyboard mouse events to osgGA's abstraction events. #include <iostream>
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<osgGA::EventQueue> _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.
class CreateModelToSaveVisitor : public osg::NodeVisitor class CreateModelToSaveVisitor : public osg::NodeVisitor
{ {
@ -135,8 +55,46 @@ public:
bool _addToModel; 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 to handle events with a pick
class PickHandler : public osgGA::GUIEventHandler { class PickHandler : public osgGA::GUIEventHandler
{
public: public:
PickHandler(): PickHandler():
@ -330,22 +288,32 @@ int main( int argc, char **argv )
} }
// create the window to draw to. // create the window to draw to.
osg::ref_ptr<Producer::RenderSurface> renderSurface = new Producer::RenderSurface; osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
renderSurface->setWindowName("osgkeyboardmouse"); traits->x = 200;
renderSurface->setWindowRectangle(100,100,800,600); traits->y = 200;
renderSurface->useBorder(true); traits->width = 800;
renderSurface->realize(); traits->height = 600;
traits->windowDecoration = true;
traits->doubleBuffer = true;
traits->sharedContext = 0;
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (!gw)
{
osg::notify(osg::NOTICE)<<"Error: unable to create graphics window."<<std::endl;
return 1;
}
gw->realize();
gw->makeCurrent();
// create the view of the scene. // create the view of the scene.
osgViewer::SimpleViewer viewer; osgViewer::SimpleViewer viewer;
viewer.setSceneData(loadedModel.get()); viewer.setSceneData(loadedModel.get());
// set up a KeyboardMouse to manage the events comming in from the RenderSurface viewer.setEventQueue(gw->getEventQueue());
osg::ref_ptr<Producer::KeyboardMouse> kbm = new Producer::KeyboardMouse(renderSurface.get()); viewer.getEventQueue()->windowResize(traits->x,traits->y,traits->width,traits->height);
// create a KeyboardMouseCallback to handle the mouse events within this applications
osg::ref_ptr<MyKeyboardMouseCallback> kbmcb = new MyKeyboardMouseCallback(viewer.getEventQueue());
// create a tracball manipulator to move the camera around in response to keyboard/mouse events // create a tracball manipulator to move the camera around in response to keyboard/mouse events
viewer.setCameraManipulator( new osgGA::TrackballManipulator ); viewer.setCameraManipulator( new osgGA::TrackballManipulator );
@ -356,35 +324,23 @@ int main( int argc, char **argv )
// add the pick handler // add the pick handler
viewer.addEventHandler(new PickHandler()); 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. // add the exit handler'
// we need to construct the event queue so that it knows about this convention. ExitHandler* exitHandler = new ExitHandler;
viewer.getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS); viewer.addEventHandler(exitHandler);
viewer.init(); viewer.init();
// main loop (note, window toolkits which take control over the main loop will require a window redraw callback containing the code below.) // 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. gw->checkEvents();
viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight());
// pass any keyboard mouse events onto the local keyboard mouse callback.
kbm->update( *kbmcb );
viewer.frame(); viewer.frame();
// Swap Buffers // Swap Buffers
renderSurface->swapBuffers(); gw->swapBuffers();
} }
return 0; return 0;

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgsimple.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\
@ -12,16 +12,5 @@ INSTFILES = \
EXEC = osgsimple 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 include $(TOPDIR)/Make/makerules

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgsimple.cpp\ 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 EXEC = osgsimple
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -3,12 +3,46 @@
// Simple example of use of Producer::RenderSurface to create an OpenGL // Simple example of use of Producer::RenderSurface to create an OpenGL
// graphics window, and OSG for rendering. // graphics window, and OSG for rendering.
#include <Producer/RenderSurface>
#include <osgUtil/SceneView> #include <osgUtil/SceneView>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgViewer/SimpleViewer> #include <osgViewer/SimpleViewer>
#include <osgViewer/GraphicsWindow>
#include <iostream>
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 ) int main( int argc, char **argv )
{ {
@ -26,27 +60,48 @@ int main( int argc, char **argv )
return 1; return 1;
} }
// create the window to draw to.
osg::ref_ptr<Producer::RenderSurface> renderSurface = new Producer::RenderSurface;
renderSurface->setWindowName("osgsimple");
renderSurface->setWindowRectangle(100,100,800,600);
renderSurface->useBorder(true);
renderSurface->realize();
osgViewer::SimpleViewer viewer; osgViewer::SimpleViewer viewer;
osg::ref_ptr<osg::GraphicsContext::Traits> 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<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (!gw)
{
osg::notify(osg::NOTICE)<<"Error: unable to create graphics window."<<std::endl;
}
viewer.setEventQueue(gw->getEventQueue());
viewer.getEventQueue()->windowResize(traits->x,traits->y,traits->width,traits->height);
gc->realize();
gc->makeCurrent();
viewer.setSceneData(loadedModel.get()); 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 // initialize the view to look at the center of the scene graph
const osg::BoundingSphere& bs = loadedModel->getBound(); const osg::BoundingSphere& bs = loadedModel->getBound();
osg::Matrix viewMatrix; 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)); 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.) // 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() ) while( gw->isRealized() && !exitHandler->done() )
{ {
// update the window dimensions, in case the window has been resized. // check the window evnts
viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight()); gw->checkEvents();
// set the view // set the view
viewer.getCamera()->setViewMatrix(viewMatrix); viewer.getCamera()->setViewMatrix(viewMatrix);
@ -55,7 +110,7 @@ int main( int argc, char **argv )
viewer.frame(); viewer.frame();
// Swap Buffers // Swap Buffers
renderSurface->swapBuffers(); gw->swapBuffers();
} }
return 0; return 0;

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgsimplifier.cpp\ 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 EXEC = osgsimplifier

View File

@ -1,6 +1,6 @@
// C++ source file - (C) 2003 Robert Osfield, released under the OSGPL. // 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. // graphics window, and OSG for rendering.
#include <osg/Timer> #include <osg/Timer>

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgteapot.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -2,13 +2,10 @@ TOPDIR = ../..
include $(TOPDIR)/Make/makedefs include $(TOPDIR)/Make/makedefs
CXXFILES =\ 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 EXEC = osgteapot
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -4,7 +4,7 @@
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
// The classic OpenGL teapot... taken form glut-3.7/lib/glut/glut_teapot.c // 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 ) 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. // 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);
// 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;
}
// add model to viewer. // add model to viewer.
viewer.setSceneData( createTeapot() ); viewer.setSceneData( createTeapot() );
// create the windows and run the threads. // create the windows and run the threads.
viewer.realize(); return viewer.run();
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;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtessellate.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtessellate.cpp\ 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 EXEC = osgtessellate

View File

@ -22,7 +22,7 @@
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgUtil/Optimizer> #include <osgUtil/Optimizer>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <osg/Projection> #include <osg/Projection>
#include <osg/MatrixTransform> #include <osg/MatrixTransform>
@ -740,42 +740,11 @@ public:
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
// use an ArgumentParser object to manage the program arguments. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,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()->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. // 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);
// 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();
// read the scene from the list of file specified commandline args. // read the scene from the list of file specified commandline args.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments); osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
@ -784,30 +753,19 @@ int main( int argc, char **argv )
if (!loadedModel) if (!loadedModel)
{ {
loadedModel=makeTessellateExample(); loadedModel=makeTessellateExample();
} else { // if there is a loaded model: } else { // if there is a loaded model:
// tessellate by searching for geode called tessellate & tessellate it // tessellate by searching for geode called tessellate & tessellate it
setTessellateVisitor tsv; setTessellateVisitor tsv;
loadedModel->accept(tsv); loadedModel->accept(tsv);
} }
// create the hud. // create the hud.
osg::Group *gload= dynamic_cast<osg::Group *> (loadedModel.get()); osg::Group *gload= dynamic_cast<osg::Group *> (loadedModel.get());
gload->addChild(createHUD()); 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 = "<<timer.delta_s(start_tick,end_tick)<<std::endl;
osgUtil::Optimizer optimizer; osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get() ); optimizer.optimize(loadedModel.get() );
@ -816,34 +774,8 @@ int main( int argc, char **argv )
viewer.setSceneData(loadedModel.get()); viewer.setSceneData(loadedModel.get());
// add event handler for keyboard 'n' to retessellate // add event handler for keyboard 'n' to retessellate
viewer.getEventHandlerList().push_front(new KeyboardEventHandler(loadedModel.get())); viewer.addEventHandler(new KeyboardEventHandler(loadedModel.get()));
// create the windows and run the threads. return viewer.run();
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();
// do OpenGL clean up
viewer.cleanup_frame();
// wait for all cull and draw threads to complete before exit.
viewer.sync();
return 0;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtext.cpp\ osgtext.cpp\
LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) LIBS += -losgViewer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtext.cpp\ osgtext.cpp\
LIBS += -losgProducer -lProducer -losgText -losgProducer -lProducer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) LIBS += -losgViewer -losgText -losgViewer -losgDB -losgText -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
EXEC = osgtext EXEC = osgtext
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -17,7 +17,7 @@
#include <osgDB/WriteFile> #include <osgDB/WriteFile>
#include <osgDB/Registry> #include <osgDB/Registry>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <osg/Geode> #include <osg/Geode>
#include <osg/Camera> #include <osg/Camera>
@ -469,75 +469,19 @@ osg::Group* create3DText(const osg::Vec3& center,float radius)
return rootNode; 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. // 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);
// 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<osg::Node> rootNode = osgDB::readNodeFiles(arguments);
// prepare scene. // prepare scene.
{ {
osg::Vec3 center(0.0f,0.0f,0.0f); osg::Vec3 center(0.0f,0.0f,0.0f);
float radius = 1.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. // make sure the root node is group so we can add extra nodes to it.
osg::Group* group = dynamic_cast<osg::Group*>(rootNode.get()); osg::Group* group = new osg::Group;
if (!group)
{
group = new osg::Group;
if (rootNode.valid()) group->addChild(rootNode.get());
rootNode = group;
}
{ {
// create the hud. // create the hud.
osg::Camera* camera = new osg::Camera; osg::Camera* camera = new osg::Camera;
@ -553,55 +497,10 @@ int main( int argc, char **argv )
group->addChild(create3DText(center,radius)); group->addChild(create3DText(center,radius));
// set the scene to render
viewer.setSceneData(group);
} }
// set the scene to render return viewer.run();
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;
contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts();
++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;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture1D.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture1D.cpp\ 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 EXEC = osgtexture1D
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -6,8 +6,9 @@
#include <osgDB/Registry> #include <osgDB/Registry>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <iostream>
// Creates a stateset which contains a 1D texture which is populated by contour banded color // 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 // 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. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,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 use of 1D textures.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
// construct the viewer. // 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);
// 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;
}
// load the images specified on command line // load the images specified on command line
osg::Node* loadedModel = osgDB::readNodeFiles(arguments); osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
if (loadedModel) if (!loadedModel)
{
osg::StateSet* stateset = create1DTextureStateToDecorate(loadedModel);
if (!stateset)
{
std::cout<<"Error: failed to create 1D texture state."<<std::endl;
return 1;
}
loadedModel->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
{ {
osg::notify(osg::NOTICE)<<arguments.getApplicationUsage()->getCommandLineUsage()<<std::endl; osg::notify(osg::NOTICE)<<arguments.getApplicationUsage()->getCommandLineUsage()<<std::endl;
return 0; return 0;
} }
osg::StateSet* stateset = create1DTextureStateToDecorate(loadedModel);
if (!stateset)
return 0; {
std::cout<<"Error: failed to create 1D texture state."<<std::endl;
return 1;
}
loadedModel->setStateSet(stateset);
loadedModel->setUpdateCallback(new AnimateStateCallback());
// add model to viewer.
viewer.setSceneData( loadedModel );
return viewer.run();
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture2D.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture2D.cpp\ 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 EXEC = osgtexture2D
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -12,7 +12,7 @@
#include <osgText/Text> #include <osgText/Text>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// //
@ -680,76 +680,13 @@ osg::Node* createModel()
return root; 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. // 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);
// 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();
// add model to viewer. // add model to viewer.
viewer.setSceneData( rootNode ); viewer.setSceneData( createModel() );
// create the windows and run the threads. return viewer.run();
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;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture3D.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexture3D.cpp\ 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 EXEC = osgtexture3D
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -8,8 +8,9 @@
#include <osgDB/Registry> #include <osgDB/Registry>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <iostream>
// //
// A simple demo demonstrating different texturing modes, // A simple demo demonstrating different texturing modes,
@ -20,115 +21,124 @@
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList; typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
class ConstructStateCallback : public osgProducer::OsgCameraGroup::RealizeCallback class MyGraphicsContext {
{
public: public:
ConstructStateCallback(osg::Node* node):_node(node),_initialized(false) {} MyGraphicsContext()
osg::StateSet* constructState()
{ {
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
// read 4 2d images traits->x = 0;
osg::ref_ptr<osg::Image> image_0 = osgDB::readImageFile("Images/lz.rgb"); traits->y = 0;
osg::ref_ptr<osg::Image> image_1 = osgDB::readImageFile("Images/reflect.rgb"); traits->width = 1;
osg::ref_ptr<osg::Image> image_2 = osgDB::readImageFile("Images/tank.rgb"); traits->height = 1;
osg::ref_ptr<osg::Image> image_3 = osgDB::readImageFile("Images/skymap.jpg"); 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."<<std::endl; traits->pbuffer = false;
return new osg::StateSet; _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."<<std::endl; _gc->realize();
return new osg::StateSet; _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<OpenThreads::Mutex> 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; private:
osg::Node* _node; osg::ref_ptr<osg::GraphicsContext> _gc;
bool _initialized;
}; };
osg::StateSet* createState()
{
MyGraphicsContext gc;
if (!gc.valid())
{
osg::notify(osg::NOTICE)<<"Unable to create the graphics context required to build 3d image."<<std::endl;
return 0;
}
// read 4 2d images
osg::ref_ptr<osg::Image> image_0 = osgDB::readImageFile("Images/lz.rgb");
osg::ref_ptr<osg::Image> image_1 = osgDB::readImageFile("Images/reflect.rgb");
osg::ref_ptr<osg::Image> image_2 = osgDB::readImageFile("Images/tank.rgb");
osg::ref_ptr<osg::Image> image_3 = osgDB::readImageFile("Images/skymap.jpg");
if (!image_0 || !image_1 || !image_2 || !image_3)
{
std::cout << "Warning: could not open files."<<std::endl;
return new osg::StateSet;
}
if (image_0->getPixelFormat()!=image_1->getPixelFormat() || image_0->getPixelFormat()!=image_2->getPixelFormat() || image_0->getPixelFormat()!=image_3->getPixelFormat())
{
std::cout << "Warning: image pixel formats not compatible."<<std::endl;
return new osg::StateSet;
}
// 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;
}
class UpdateStateCallback : public osg::NodeCallback class UpdateStateCallback : public osg::NodeCallback
{ {
public: public:
@ -213,90 +223,20 @@ osg::Node* createModel()
// osg::Image::copySubImage() without using GLU which will get round // osg::Image::copySubImage() without using GLU which will get round
// this current limitation. // this current limitation.
geode->setUpdateCallback(new UpdateStateCallback()); geode->setUpdateCallback(new UpdateStateCallback());
geode->setStateSet(createState());
return geode; 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. // construct the viewer.
osgProducer::Viewer viewer(arguments); osgViewer::Viewer viewer;
// set up the value with sensible default event handlers. // create a model from the images and pass it to the viewer.
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); viewer.setSceneData(createModel());
// get details on keyboard and mouse bindings used by the viewer. return viewer.run();
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;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexturerectangle.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgtexturerectangle.cpp\ 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 EXEC = osgtexturerectangle
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -29,7 +29,7 @@
#include <osgDB/Registry> #include <osgDB/Registry>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
/********************************************************************** /**********************************************************************
@ -238,67 +238,14 @@ int main(int argc, char** argv)
// use an ArgumentParser object to manage the program arguments. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,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 a demo which demonstrates use of osg::TextureRectangle.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] <image> ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
// construct the viewer. // 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);
// 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. // create a model from the images.
osg::Node* rootNode = createModel((arguments.argc() > 1 ? arguments[1] : "Images/lz.rgb")); osg::Node* rootNode = createModel((arguments.argc() > 1 ? arguments[1] : "Images/lz.rgb"));
// add model to viewer. // add model to viewer.
viewer.setSceneData(rootNode); 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();
} }

View File

@ -7,7 +7,7 @@ CXXFILES =\
UnitTests_osg.cpp\ UnitTests_osg.cpp\
osgunittests.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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -7,7 +7,7 @@ CXXFILES =\
UnitTests_osg.cpp\ UnitTests_osg.cpp\
osgunittests.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 EXEC = osgunittests

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgvertexprogram.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgvertexprogram.cpp\ 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 EXEC = osgvertexprogram
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -23,7 +23,9 @@
#include <osgUtil/SmoothingVisitor> #include <osgUtil/SmoothingVisitor>
#include <osgUtil/Optimizer> #include <osgUtil/Optimizer>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <iostream>
float refract = 1.02; // ratio of indicies of refraction 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. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,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 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. // 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);
// 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;
}
osg::Group* rootnode = new osg::Group; osg::Group* rootnode = new osg::Group;
@ -406,10 +380,13 @@ int main(int argc, char *argv[])
viewer.realize(); viewer.realize();
// now check to see if vertex program is supported. // now check to see if vertex program is supported.
for(unsigned int contextID = 0; osgViewer::Viewer::Windows windows;
contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts(); viewer.getWindows(windows);
++contextID) 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); osg::VertexProgram::Extensions* vpExt = osg::VertexProgram::getExtensions(contextID,false);
if (vpExt) if (vpExt)
{ {
@ -421,28 +398,5 @@ int main(int argc, char *argv[])
} }
} }
while( !viewer.done() ) return viewer.run();
{
// 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;
} }

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgvolume.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgvolume.cpp\ 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 EXEC = osgvolume
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -25,7 +25,9 @@
#include <osgUtil/CullVisitor> #include <osgUtil/CullVisitor>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <iostream>
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList; typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
@ -1437,13 +1439,7 @@ int main( int argc, char **argv )
// arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data"); // arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data");
// construct the viewer. // 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);
// 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 user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help")) if (arguments.read("-h") || arguments.read("--help"))
@ -1638,31 +1634,8 @@ int main( int argc, char **argv )
// set the scene to render // set the scene to render
viewer.setSceneData(rootNode); viewer.setSceneData(rootNode);
// create the windows and run the threads. // the the viewers main frame loop
viewer.realize(); viewer.run();
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 0;

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgwindows.cpp\ 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 = \ INSTFILES = \
$(CXXFILES)\ $(CXXFILES)\

View File

@ -4,11 +4,8 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\ CXXFILES =\
osgwindows.cpp\ 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 EXEC = osgwindows
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules include $(TOPDIR)/Make/makerules

View File

@ -11,117 +11,12 @@
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgUtil/Optimizer> #include <osgUtil/Optimizer>
#include <osgProducer/Viewer> #include <osgViewer/Viewer>
#include <Producer/CameraConfig>
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
}
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
// use an ArgumentParser object to manage the program arguments. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,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()->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. // read the scene from the list of file specified commandline args.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments); osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
@ -133,6 +28,57 @@ int main( int argc, char **argv )
return 1; return 1;
} }
// construct the viewer.
osgViewer::Viewer viewer;
// left window + left slave camera
{
osg::ref_ptr<osg::GraphicsContext::Traits> 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<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
osg::ref_ptr<osg::Camera> 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<osg::GraphicsContext::Traits> 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<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
osg::ref_ptr<osg::Camera> 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. // optimize the scene graph, remove rendundent nodes and state etc.
osgUtil::Optimizer optimizer; osgUtil::Optimizer optimizer;
@ -141,32 +87,6 @@ int main( int argc, char **argv )
// set the scene to render // set the scene to render
viewer.setSceneData(loadedModel.get()); viewer.setSceneData(loadedModel.get());
// create the windows and run the threads. return viewer.run();
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;
} }