Removed examples:

osgcameragroup
  osgsimpleviewerProducer
  osgsimplepager
This commit is contained in:
Robert Osfield 2007-01-11 15:48:44 +00:00
parent b121c9686f
commit 190a0bb01a
16 changed files with 4 additions and 1221 deletions

View File

@ -208,7 +208,6 @@ ifeq ($(PRODUCER_INSTALLED),yes)
osgblendequation \ osgblendequation \
osgcallback \ osgcallback \
osgcamera \ osgcamera \
osgcameragroup \
osgcatch \ osgcatch \
osgclip \ osgclip \
osgcluster \ osgcluster \
@ -259,7 +258,6 @@ ifeq ($(PRODUCER_INSTALLED),yes)
osgshadowtexture \ osgshadowtexture \
osgshape \ osgshape \
osgsimple \ osgsimple \
osgsimplepager \
osgsimplifier \ osgsimplifier \
osgslice \ osgslice \
osgspacewarp \ osgspacewarp \
@ -312,7 +310,3 @@ endif
ifeq ($(FLTK_INSTALLED),yes) ifeq ($(FLTK_INSTALLED),yes)
EXAMPLE_DIRS += osgsimpleviewerFLTK EXAMPLE_DIRS += osgsimpleviewerFLTK
endif endif
ifeq ($(PRODUCER_INSTALLED),yes)
EXAMPLE_DIRS += osgsimpleviewerProducer
endif

View File

@ -567,33 +567,6 @@ Package=<4>
############################################################################### ###############################################################################
Project: "Example osgcameragroup"=.\examples\osgcameragroup\osgcameragroup.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgProducer
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
}}}
###############################################################################
Project: "Example osgcatch"=.\examples\osgcatch\osgcatch.dsp - Package Owner=<4> Project: "Example osgcatch"=.\examples\osgcatch\osgcatch.dsp - Package Owner=<4>
Package=<5> Package=<5>
@ -1566,7 +1539,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
@ -1677,7 +1650,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
@ -2133,33 +2106,6 @@ Package=<4>
############################################################################### ###############################################################################
Project: "Example osgsimple"=.\examples\osgsimpleviewerProducer\osgsimpleviewerProducer.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgGA
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgViewer
End Project Dependency
}}}
###############################################################################
Project: "Example osgsimple"=.\examples\osgsimpleviewerSDL\osgsimpleviewerSDL.dsp - Package Owner=<4> Project: "Example osgsimple"=.\examples\osgsimpleviewerSDL\osgsimpleviewerSDL.dsp - Package Owner=<4>
Package=<5> Package=<5>
@ -2241,30 +2187,6 @@ Package=<4>
############################################################################### ###############################################################################
Project: "Example osgsimplepager"=.\examples\osgsimplepager\osgsimplepager.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Core osg
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgDB
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgUtil
End Project Dependency
Begin Project Dependency
Project_Dep_Name Core osgFX
End Project Dependency
}}}
###############################################################################
Project: "Example osgsimplifier"=.\examples\osgsimplifier\osgsimplifier.dsp - Package Owner=<4> Project: "Example osgsimplifier"=.\examples\osgsimplifier\osgsimplifier.dsp - Package Owner=<4>
Package=<5> Package=<5>

View File

@ -1,101 +0,0 @@
# Microsoft Developer Studio Project File - Name="Example osgcameragroup" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=Example osgcameragroup - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "osgcameragroup.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "osgcameragroup.mak" CFG="Example osgcameragroup - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Example osgcameragroup - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Example osgcameragroup - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Example osgcameragroup - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgcameragroup.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
!ELSEIF "$(CFG)" == "Example osgcameragroup - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgcameragroupd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
# SUBTRACT LINK32 /incremental:no
!ENDIF
# Begin Target
# Name "Example osgcameragroup - Win32 Release"
# Name "Example osgcameragroup - Win32 Debug"
# Begin Source File
SOURCE=..\..\..\examples\osgcameragroup\osgcameragroup.cpp
# End Source File
# Begin Source File
SOURCE=..\..\icons\osg_icon.rc
# End Source File
# End Target
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Project

View File

@ -1,101 +0,0 @@
# Microsoft Developer Studio Project File - Name="Example osgsimplepager" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=Example osgsimplepager - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "osgsimplepager.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "osgsimplepager.mak" CFG="Example osgsimplepager - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Example osgsimplepager - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Example osgsimplepager - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Example osgsimplepager - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgsimplepager.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
!ELSEIF "$(CFG)" == "Example osgsimplepager - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgsimplepagerd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
# SUBTRACT LINK32 /incremental:no
!ENDIF
# Begin Target
# Name "Example osgsimplepager - Win32 Release"
# Name "Example osgsimplepager - Win32 Debug"
# Begin Source File
SOURCE=..\..\..\examples\osgsimplepager\osgsimplepager.cpp
# End Source File
# Begin Source File
SOURCE=..\..\icons\osg_icon.rc
# End Source File
# End Target
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Project

View File

@ -1,101 +0,0 @@
# Microsoft Developer Studio Project File - Name="Example osgsimpleviewerProducer" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=Example osgsimpleviewerProducer - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "osgsimpleviewerProducer.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "osgsimpleviewerProducer.mak" CFG="Example osgsimpleviewerProducer - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Example osgsimpleviewerProducer - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Example osgsimpleviewerProducer - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Example osgsimpleviewerProducer - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_DEPRECATE" /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgsimpleviewerProducer.exe" /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
!ELSEIF "$(CFG)" == "Example osgsimpleviewerProducer - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../../bin/$(PlatformName)"
# PROP Intermediate_Dir "$(PlatformName)/$(ConfigurationName)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I "../../../include" /I "../../../../OpenThreads/include" /I "../../../../Producer/include" /I "../../../../3rdParty/include" /D "_CONSOLE" /D "_MBCS" /D "FL_DLL" /D "WIN32" /D "_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /FR /YX /FD /Zm200 /c
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /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)/osgsimpleviewerProducerd.exe" /pdbtype:sept /libpath:"../../../lib/$(PlatformName)" /libpath:"../../../../OpenThreads/lib/$(PlatformName)" /libpath:"../../../../Producer/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib/$(PlatformName)" /libpath:"../../../../3rdParty/lib"
# SUBTRACT LINK32 /incremental:no
!ENDIF
# Begin Target
# Name "Example osgsimpleviewerProducer - Win32 Release"
# Name "Example osgsimpleviewerProducer - Win32 Debug"
# Begin Source File
SOURCE=..\..\..\examples\osgsimpleviewerProducer\osgsimpleviewerProducer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\icons\osg_icon.rc
# End Source File
# End Target
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Project

View File

@ -1,27 +0,0 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgcameragroup.cpp\
LIBS += -losgProducer -lProducer -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
INSTFILES = \
$(CXXFILES)\
GNUmakefile.inst=GNUmakefile
EXEC = osgcameragroup
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

View File

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

View File

@ -1,185 +0,0 @@
//C++ source file - Open Producer - Copyright (C) 2002 Don Burns
//Distributed under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE (LGPL)
//as published by the Free Software Foundation.
// Simple example of use of Producer::RenderSurface
// The myGraphics class is a simple sample of how one would implement
// graphics drawing with Producer::RenderSurface
#include <stdio.h>
#include <Producer/Camera>
#include <Producer/CameraConfig>
#include <Producer/InputArea>
#include <Producer/KeyboardMouse>
#include <Producer/Trackball>
#include <osg/Timer>
#include <osgUtil/Optimizer>
#include <osgUtil/UpdateVisitor>
#include <osgDB/ReadFile>
#include <osgProducer/OsgCameraGroup>
#include <osgProducer/OsgSceneHandler>
class MyKeyboardMouseCallback : public Producer::KeyboardMouseCallback
{
public:
MyKeyboardMouseCallback() :
Producer::KeyboardMouseCallback(),
_mx(0.0f),_my(0.0f),_mbutton(0),
_done(false)
{}
virtual void specialKeyPress( Producer::KeyCharacter key )
{
if (key==Producer::KeyChar_Escape)
shutdown();
}
virtual void shutdown()
{
_done = true;
}
virtual void keyPress( Producer::KeyCharacter )
{
}
virtual void mouseMotion( float mx, float my )
{
_mx = mx;
_my = my;
}
virtual void buttonPress( float mx, float my, unsigned int mbutton )
{
_mx = mx;
_my = my;
_mbutton |= (1<<(mbutton-1));
}
virtual void buttonRelease( float mx, float my, unsigned int mbutton )
{
_mx = mx;
_my = my;
_mbutton &= ~(1<<(mbutton-1));
}
bool done() { return _done; }
float mx() { return _mx; }
float my() { return _my; }
unsigned int mbutton() { return _mbutton; }
private:
float _mx, _my;
unsigned int _mbutton;
bool _done;
};
int main( int argc, char **argv )
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard example of using osgProducer::CameraGroup.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
// create the camera group.
osgProducer::OsgCameraGroup cg(arguments);
// 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.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
if (!loadedModel)
{
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
return 1;
}
osgUtil::Optimizer optimizer;
optimizer.optimize(loadedModel.get());
// set up the keyboard and mouse handling.
Producer::InputArea *ia = cg.getCameraConfig()->getInputArea();
Producer::KeyboardMouse *kbm = ia ?
(new Producer::KeyboardMouse(ia)) :
(new Producer::KeyboardMouse(cg.getCamera(0)->getRenderSurface()));
osg::ref_ptr<MyKeyboardMouseCallback> kbmcb = new MyKeyboardMouseCallback;
// register the callback with the keyboard mouse manger.
kbm->setCallback( kbmcb.get() );
kbm->startThread();
// set the scene to render
cg.setSceneData(loadedModel.get());
const osg::BoundingSphere& bs = loadedModel->getBound();
osg::ref_ptr<Producer::Trackball> tb = new Producer::Trackball;
tb->setOrientation( Producer::Trackball::Z_UP );
tb->setDistance(bs.radius()*3.0f);
tb->translate(-bs.center().x(),-bs.center().y(),-bs.center().z());
// create the windows and run the threads.
cg.realize();
osgUtil::UpdateVisitor update;
while( !kbmcb->done() )
{
// syncronize to the when cull and draw threads have completed.
cg.sync();
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
cg.getSceneData()->accept(update);
tb->input( kbmcb->mx(), kbmcb->my(), kbmcb->mbutton() );
// update the main producer camera
cg.setViewByMatrix(tb->getMatrix());
// fire off the cull and draw traversals of the scene.
cg.frame();
}
// syncronize to the when cull and draw threads have completed.
cg.sync();
return 0;
}

View File

@ -1,7 +1,7 @@
// 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::GraphicsContext to create an OpenGL
// graphics window, and OSG for rendering. // graphics window, and use the SimpleViewer for OSG rendering.
#include <osgUtil/SceneView> #include <osgUtil/SceneView>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>

View File

@ -1,27 +0,0 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgsimplepager.cpp\
LIBS += -lProducer -losgFX -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
INSTFILES = \
$(CXXFILES)\
GNUmakefile.inst=GNUmakefile
EXEC = osgsimplepager
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

View File

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

View File

@ -1,276 +0,0 @@
// C++ source file - (C) 2003 Robert Osfield, released under the OSGPL.
//
// Simple example of use of Producer::RenderSurface + KeyboardMouseCallback + SceneView
// example that provides the user with control over view position with support for
// enabling the osgDB::DatabasePager as required by the PagedLOD and TXP databases.
#include <Producer/RenderSurface>
#include <Producer/KeyboardMouse>
#include <Producer/Trackball>
#include <osg/Timer>
#include <osgUtil/SceneView>
#include <osgUtil/IntersectVisitor>
#include <osgDB/ReadFile>
#include <osgFX/Scribe>
class MyKeyboardMouseCallback : public Producer::KeyboardMouseCallback
{
public:
MyKeyboardMouseCallback(osgUtil::SceneView* sceneView) :
Producer::KeyboardMouseCallback(),
_mx(0.0f),_my(0.0f),_mbutton(0),
_done(false),
_trackBall(new Producer::Trackball),
_sceneView(sceneView)
{
resetTrackball();
}
virtual void specialKeyPress( Producer::KeyCharacter key )
{
if (key==Producer::KeyChar_Escape)
shutdown();
}
virtual void shutdown()
{
_done = true;
}
virtual void keyPress( Producer::KeyCharacter key)
{
if (key==' ') resetTrackball();
}
virtual void mouseMotion( float mx, float my )
{
_mx = mx;
_my = my;
}
virtual void buttonPress( float mx, float my, unsigned int mbutton )
{
_mx = mx;
_my = my;
_mbutton |= (1<<(mbutton-1));
_mx_buttonPress = _mx;
_my_buttonPress = _my;
}
virtual void buttonRelease( float mx, float my, unsigned int mbutton )
{
_mx = mx;
_my = my;
_mbutton &= ~(1<<(mbutton-1));
}
bool done() { return _done; }
float mx() { return _mx; }
float my() { return _my; }
unsigned int mbutton() { return _mbutton; }
void resetTrackball()
{
osg::Node* scene = _sceneView->getSceneData();
if (scene)
{
const osg::BoundingSphere& bs = scene->getBound();
if (bs.valid())
{
_trackBall->reset();
_trackBall->setOrientation( Producer::Trackball::Z_UP );
_trackBall->setDistance(bs.radius()*2.0f);
_trackBall->translate(-bs.center().x(),-bs.center().y(),-bs.center().z());
}
}
}
osg::Matrixd getViewMatrix()
{
_trackBall->input( mx(), my(), mbutton() );
return osg::Matrixd(_trackBall->getMatrix().ptr());
}
private:
float _mx, _my;
float _mx_buttonPress, _my_buttonPress;
unsigned int _mbutton;
bool _done;
osg::ref_ptr<Producer::Trackball> _trackBall;
osg::ref_ptr<osgUtil::SceneView> _sceneView;
};
int main( int argc, char **argv )
{
if (argc<2)
{
std::cout << argv[0] <<": requires filename argument." << std::endl;
return 1;
}
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(argv[1]);
if (!loadedModel)
{
std::cout << argv[0] <<": No data loaded." << std::endl;
return 1;
}
// When numTimesToRun>1 allow the user to test opening and closing graphics contexts whilst
// still keep scene graph around.
unsigned int numTimesToRun = 1;
if (argc>2)
{
numTimesToRun = atoi(argv[2]);
}
// do the set up of the DatabasePager...
// create the database pager via the osgDB::Registry
osgDB::DatabasePager* databasePager = osgDB::Registry::instance()->getOrCreateDatabasePager();
// set wether the DatabasePager thread should be blocked while the scene graph is being used to render a frame
// setting frame block to true can help achieve constant frame rates on single CPU systems.
databasePager->setUseFrameBlock(false);
// set whether to pre compile GL objects before merging new subgraphs with main scene graph
// databasePager->setCompileGLObjectsForContextID(sceneView->getState()->getContextID(),true);
// register any PagedLOD that need to be tracked in the scene graph
databasePager->registerPagedLODs(loadedModel.get());
// record the timer tick at the start of rendering.
osg::Timer_t start_tick = osg::Timer::instance()->tick();
// set the frame number count. Note, this is outside the window loop, so that
// frame numbers increment even a graphics context is closed down and another opened
// this is to ensure the record of the frame numbers in the scene graph are kept valid.
unsigned int frameNum = 0;
if (numTimesToRun>1)
{
// make sure the database pager doesn't unref images as otherwise they won't be around the next time
// they are needed when the a new graphics context comes up.
databasePager->setUnrefImageDataAfterApplyPolicy(true,false);
}
for(unsigned int i=0;i<numTimesToRun;++i)
{
// create the view of the scene.
osg::ref_ptr<osgUtil::SceneView> sceneView = new osgUtil::SceneView;
sceneView->setDefaults();
sceneView->setSceneData(loadedModel.get());
sceneView->setLightingMode(osgUtil::SceneView::SKY_LIGHT);
// need to register the DatabasePager with the SceneView's CullVisitor so it can pass on request
// for files to be loaded.
sceneView->getCullVisitor()->setDatabaseRequestHandler(databasePager);
// create the window to draw to.
osg::ref_ptr<Producer::RenderSurface> renderSurface = new Producer::RenderSurface;
renderSurface->setWindowName("osgsimplepager");
renderSurface->setWindowRectangle(100,100,800,600);
renderSurface->useBorder(true);
renderSurface->realize();
// set up a KeyboardMouse to manage the events comming in from the RenderSurface
osg::ref_ptr<Producer::KeyboardMouse> kbm = new Producer::KeyboardMouse(renderSurface.get());
// create a KeyboardMouseCallback to handle the mouse events within this applications
osg::ref_ptr<MyKeyboardMouseCallback> kbmcb = new MyKeyboardMouseCallback(sceneView.get());
// 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())
{
// set up the frame stamp for current frame to record the current time and frame number so that animtion code can advance correctly
osg::FrameStamp* frameStamp = new osg::FrameStamp;
frameStamp->setReferenceTime(osg::Timer::instance()->delta_s(start_tick,osg::Timer::instance()->tick()));
frameStamp->setFrameNumber(frameNum++);
// pass frame stamp to the SceneView so that the update, cull and draw traversals all use the same FrameStamp
sceneView->setFrameStamp(frameStamp);
// pass any keyboard mouse events onto the local keyboard mouse callback.
kbm->update( *kbmcb );
// set the view
sceneView->setViewMatrix(kbmcb->getViewMatrix());
// update the viewport dimensions, incase the window has been resized.
sceneView->setViewport(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight());
// tell the DatabasePager the frame number of that the scene graph is being actively used to render a frame
databasePager->signalBeginFrame(frameStamp);
// syncronize changes required by the DatabasePager thread to the scene graph
databasePager->updateSceneGraph(frameStamp->getReferenceTime());
// do the update traversal the scene graph - such as updating animations
sceneView->update();
// do the cull traversal, collect all objects in the view frustum into a sorted set of rendering bins
sceneView->cull();
// draw the rendering bins.
sceneView->draw();
// tell the DatabasePager that the frame is complete and that scene graph is no longer be activity traversed.
databasePager->signalEndFrame();
// Swap Buffers
renderSurface->swapBuffers();
// clean up and compile gl objects with a specified limit
double availableTime = 0.0025; // 2.5 ms
// compile any GL objects that are required.
databasePager->compileGLObjects(*(sceneView->getState()),availableTime);
// flush deleted GL objects.
sceneView->flushDeletedGLObjects(availableTime);
}
// clear the database pager so its starts a fresh on the next update/cull/draw traversals
databasePager->clear();
// release the GL objects stored in the scene graph.
sceneView->releaseAllGLObjects();
// do a flush to delete all the OpenGL objects that have been deleted or released from the scene graph.
sceneView->flushAllDeletedGLObjects();
// if you are reusing the same StateSet then you'll need to reset the osg::State as well so that next time its used its in a cleaned state.
// here we are uses a new SceneView for each new graphics context so we don't need the reset().
// sceneView->getState()->reset();
}
// switch off the database pager by unreferencing it.
osgDB::Registry::instance()->setDatabasePager(0);
return 0;
}

View File

@ -1,27 +0,0 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgsimpleviewerProducer.cpp\
LIBS += -lProducer -losgViewer -losgGA -losgDB -losgUtil -losg $(X_LIBS) $(OTHER_LIBS) -lOpenThreads
INSTFILES = \
$(CXXFILES)\
GNUmakefile.inst=GNUmakefile
EXEC = osgsimpleviewerProducer
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

View File

@ -1,14 +0,0 @@
TOPDIR = ../..
include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgsimpleviewerProducer.cpp\
LIBS += -lProducer -losgViewer -losgGA -losgDB --losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
EXEC = osgsimpleviewerProducer
INC += $(PRODUCER_INCLUDE_DIR) $(X_INC)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -1,243 +0,0 @@
// C++ source file - (C) 2003 Robert Osfield, released under the OSGPL.
//
// Simple example of use of Producer::RenderSurface + KeyboardMouseCallback + SimpleViewer
#include <Producer/RenderSurface>
#include <Producer/KeyboardMouse>
#include <Producer/Trackball>
#include <osgDB/ReadFile>
#include <osgViewer/SimpleViewer>
#include <osgGA/TrackballManipulator>
#include <osgGA/StateSetManipulator>
// ----------- Begining of glue classes to adapter Producer's keyboard mouse events to osgGA's abstraction events.
class MyKeyboardMouseCallback : public Producer::KeyboardMouseCallback
{
public:
MyKeyboardMouseCallback(osgGA::EventQueue* eventQueue) :
_done(false),
_eventQueue(eventQueue)
{
}
virtual void shutdown()
{
_done = true;
}
virtual void specialKeyPress( Producer::KeyCharacter key )
{
if (key==Producer::KeyChar_Escape)
shutdown();
_eventQueue->keyPress( (osgGA::GUIEventAdapter::KeySymbol) key );
}
virtual void specialKeyRelease( Producer::KeyCharacter key )
{
_eventQueue->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) key );
}
virtual void keyPress( Producer::KeyCharacter key)
{
_eventQueue->keyPress( (osgGA::GUIEventAdapter::KeySymbol) key );
}
virtual void keyRelease( Producer::KeyCharacter key)
{
_eventQueue->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) key );
}
virtual void mouseMotion( float mx, float my )
{
_eventQueue->mouseMotion( mx, my );
}
virtual void buttonPress( float mx, float my, unsigned int mbutton )
{
_eventQueue->mouseButtonPress(mx, my, mbutton);
}
virtual void buttonRelease( float mx, float my, unsigned int mbutton )
{
_eventQueue->mouseButtonRelease(mx, my, mbutton);
}
bool done() { return _done; }
private:
bool _done;
osg::ref_ptr<osgGA::EventQueue> _eventQueue;
};
#if 1
// first approach uses a custom GraphicsWindow
// then uses multiple inheritance to create a SimpleViewerWindowProducer
class GraphicsWindowProducer : public virtual osgViewer::GraphicsWindow, public Producer::RenderSurface
{
public:
GraphicsWindowProducer()
{
// create a KeyboardMouseCallback to handle the mouse events within this applications
_kbmcb = new MyKeyboardMouseCallback(getEventQueue());
// set up a KeyboardMouse to manage the events comming in from the RenderSurface
_kbm = new Producer::KeyboardMouse(this);
_kbm->setCallback(_kbmcb.get());
// 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.
getEventQueue()->setUseFixedMouseInputRange(true);
getEventQueue()->setMouseInputRange(-1.0, -1.0, 1.0, 1.0);
// Producer has the y axis increase upwards, like OpenGL, and contary to most Windowing toolkits.
// we need to construct the event queue so that it knows about this convention.
getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS);
}
void setWindowRectangle(int x, int y, unsigned int width, unsigned int height, bool resize = true)
{
Producer::RenderSurface::setWindowRectangle(x, y, width, height, resize);
getEventQueue()->windowResize(x,y,width,height);
}
void realize() { Producer::RenderSurface::realize(); _kbm->startThread(); }
bool isRealized() const { return Producer::RenderSurface::isRealized(); }
void swapBuffers() { return Producer::RenderSurface::swapBuffers(); }
protected:
osg::ref_ptr<Producer::KeyboardMouse> _kbm;
osg::ref_ptr<MyKeyboardMouseCallback> _kbmcb;
};
class SimplerViewerProducer : public osgViewer::SimpleViewer, public GraphicsWindowProducer
{
public:
SimplerViewerProducer() {}
};
int main( int argc, char **argv )
{
if (argc<2)
{
std::cout << argv[0] <<": requires filename argument." << std::endl;
return 1;
}
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(argv[1]);
if (!loadedModel)
{
std::cout << argv[0] <<": No data loaded." << std::endl;
return 1;
}
// create the window to draw to.
SimplerViewerProducer viewer;
viewer.setWindowName("osgkeyboardmouse");
viewer.setWindowRectangle(100,100,800,600);
viewer.useBorder(true);
viewer.realize();
// create the view of the scene.
viewer.setSceneData(loadedModel.get());
// create a tracball manipulator to move the camera around in response to keyboard/mouse events
viewer.setCameraManipulator( new osgGA::TrackballManipulator );
// main loop (note, window toolkits which take control over the main loop will require a window redraw callback containing the code below.)
while( viewer.isRealized() )
{
// update the window dimensions, in case the window has been resized.
viewer.getEventQueue()->windowResize(0,0,viewer.getWindowWidth(),viewer.getWindowHeight());
viewer.frame();
// Swap Buffers
viewer.swapBuffers();
}
return 0;
}
#else
// Second approach is to leave Producer and SimpleViewer decoupled, with the integration done mannually in the main loop
int main( int argc, char **argv )
{
if (argc<2)
{
std::cout << argv[0] <<": requires filename argument." << std::endl;
return 1;
}
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(argv[1]);
if (!loadedModel)
{
std::cout << argv[0] <<": No data loaded." << std::endl;
return 1;
}
// create the window to draw to.
osg::ref_ptr<Producer::RenderSurface> renderSurface = new Producer::RenderSurface;
renderSurface->setWindowName("osgkeyboardmouse");
renderSurface->setWindowRectangle(100,100,800,600);
renderSurface->useBorder(true);
renderSurface->realize();
// create the view of the scene.
osgViewer::SimpleViewer viewer;
viewer.setSceneData(loadedModel.get());
// set up a KeyboardMouse to manage the events comming in from the RenderSurface
osg::ref_ptr<Producer::KeyboardMouse> kbm = new Producer::KeyboardMouse(renderSurface.get());
// 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
viewer.setCameraManipulator( new osgGA::TrackballManipulator );
// set the window dimensions
viewer.getEventQueue()->getCurrentEventState()->setWindowRectangle(100,100,800,600);
// set the mouse input range.
// Producer defaults to using non-dimensional units, so we pass this onto osgGA, most windowing toolkits use pixel coords so use the window size instead.
viewer.getEventQueue()->setUseFixedMouseInputRange(true);
viewer.getEventQueue()->setMouseInputRange(-1.0, -1.0, 1.0, 1.0);
// Producer has the y axis increase upwards, like OpenGL, and contary to most Windowing toolkits.
// we need to construct the event queue so that it knows about this convention.
viewer.getEventQueue()->getCurrentEventState()->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS);
// 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())
{
// update the window dimensions, in case the window has been resized.
viewer.getEventQueue()->windowResize(0,0,renderSurface->getWindowWidth(),renderSurface->getWindowHeight(), false);
// pass any keyboard mouse events onto the local keyboard mouse callback.
kbm->update( *kbmcb );
viewer.frame();
// Swap Buffers
renderSurface->swapBuffers();
}
return 0;
}
#endif

View File

@ -24,9 +24,6 @@ osgblendequation cessnafire.osg
echo osgcallback echo osgcallback
osgcallback cow.osg osgcallback cow.osg
echo osgcameragroup
osgcameragroup dumptruck.osg
echo osgcatch echo osgcatch
osgcatch osgcatch