Fixes for IRIX build.

This commit is contained in:
Robert Osfield 2003-03-07 21:05:35 +00:00
parent ef3b957cb9
commit 6a87495c80
11 changed files with 44 additions and 21 deletions

7
examples/Makefile Normal file
View File

@ -0,0 +1,7 @@
TOPDIR = ..
include $(TOPDIR)/Make/makedirdefs
include $(TOPDIR)/Make/makedefs
DIRS = $(EXAMPLE_DIRS)
include $(TOPDIR)/Make/makedirrules

View File

@ -154,10 +154,6 @@ int main( int argc, char **argv )
init_event->adaptFrame(0.0);
keyswitchManipulator->getCurrentCameraManipulator()->home(*init_event,actionAdapter);
double previous_time_since_start = 0.0f;
int number_frames_since_last_print = 0;
int number_of_frame_samples = 10;
bool printOutFrameStats=true;
while( !done )
{
// syncronize to screen refresh.
@ -168,15 +164,6 @@ int main( int argc, char **argv )
frameStamp->setFrameNumber(frameNumber);
frameStamp->setReferenceTime(time_since_start);
if (printOutFrameStats)
{
if (number_frames_since_last_print==number_of_frame_samples)
{
cout << "frame rate = "<< (double)number_of_frame_samples/(time_since_start-previous_time_since_start)<<endl;
previous_time_since_start = time_since_start;
number_frames_since_last_print = 0;
} else ++number_frames_since_last_print;
}
// get the event since the last frame.
osgProducer::KeyboardMouseCallback::EventQueue queue;

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osghud.cpp\
LIBS += -losgText -losgProducer -lProducer $(OSG_LIBS) -L/usr/local/lib $(FREETYPE_LIB) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\
@ -12,4 +12,8 @@ INSTFILES = \
EXEC = osghud
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -4,9 +4,12 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osghud.cpp\
LIBS += -osgText -losgProducer -lProducer $(OSG_LIBS) -L/usr/local/lib $(FREETYPE_LIB) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
EXEC = osghud
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgstereoimage.cpp\
LIBS += -losgProducer -lProducer $(OSG_LIBS) -L/usr/local/lib $(FREETYPE_LIB) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\
@ -12,4 +12,8 @@ INSTFILES = \
EXEC = osgstereoimage
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgtext.cpp\
LIBS += -losgText -losgProducer -lProducer $(OSG_LIBS) -L/usr/local/lib $(FREETYPE_LIB) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\
@ -12,4 +12,8 @@ INSTFILES = \
EXEC = osgtext
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -4,9 +4,12 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgtext.cpp\
LIBS += -osgText -losgProducer -lProducer $(OSG_LIBS) -L/usr/local/lib $(FREETYPE_LIB) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgProducer -lProducer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
EXEC = osgtext
CXXFLAGS += $(PRODUCER_INCLUDE_DIR)
LDFLAGS += $(PRODUCER_LIB_DIR)
include $(TOPDIR)/Make/makerules

View File

@ -11,9 +11,11 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgProducer/OsgCameraGroup>
#include <osg/ApplicationUsage>
#include <osgDB/FileUtils>
#include <osgProducer/OsgCameraGroup>
using namespace Producer;
using namespace osgProducer;
@ -26,6 +28,12 @@ std::string findCameraConfigFile(const std::string& configFile)
std::string extractCameraConfigFile(osg::ArgumentParser& arguments)
{
// report the usage options.
if (arguments.getApplicationUsage())
{
arguments.getApplicationUsage()->addCommandLineOption("-c <filename>","Specify camera config file");
}
std::string filename;
if (arguments.read("-c",filename)) return filename;
return "";

View File

@ -102,6 +102,9 @@ void Viewer::setUpViewer(unsigned int options)
// enable depth testing by default.
globalStateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
// enable lighting by default
globalStateSet->setMode(GL_LIGHTING, osg::StateAttribute::ON);
// set up an alphafunc by default to speed up blending operations.
osg::AlphaFunc* alphafunc = new osg::AlphaFunc;
alphafunc->setFunction(osg::AlphaFunc::GREATER,0.0f);

View File

@ -107,7 +107,7 @@ std::string Font::getFileName() const
void Font::setSize(unsigned int width, unsigned int height)
{
if (_implementation.valid()) return _implementation->setSize(width, height);
if (_implementation.valid()) _implementation->setSize(width, height);
}
Font::Glyph* Font::getGlyph(unsigned int charcode)

View File

@ -236,7 +236,7 @@ unsigned int getNextCharacter(look_ahead_iterator& charString,String::Encoding e
//
String::String(const String& str):
Referenced(),
osg::Referenced(),
std::vector<unsigned int>(str)
{
}