From Mathias Froehlich, "Attached are most of the fixes that are required to build osg on solaris and

hpux. I have skipped irix this time as irix is too dead to keep osg building
there.

As usual, solaris does not like member templates in stl containers.
Some headers missing and link problems due to missing libraries."
This commit is contained in:
Robert Osfield 2010-12-02 14:13:54 +00:00
parent e26eab96f4
commit 65aee287e7
13 changed files with 41 additions and 12 deletions

View File

@ -102,7 +102,15 @@ ENDIF()
IF (WIN32)
# to support cluster code
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32)
ELSE()
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME)
IF(LIB_NSL_HAS_GETHOSTBYNAME)
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} nsl)
ENDIF()
CHECK_LIBRARY_EXISTS("socket" "socket" "" LIB_SOCKET_HAS_SOCKET)
IF(LIB_SOCKET_HAS_SOCKET)
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} socket)
ENDIF()
ENDIF()
SETUP_APPLICATION(present3D)

View File

@ -363,7 +363,9 @@ int main(int argc, char **argv)
if (!sanityCheck)
{
osg::ref_ptr<osgQt::QWidgetImage> widgetImage = new osgQt::QWidgetImage(widget);
#if (QT_VERSION >= QT_VERSION_CHECK(4, 5, 0))
widgetImage->getQWidget()->setAttribute(Qt::WA_TranslucentBackground);
#endif
widgetImage->getQGraphicsViewAdapter()->setBackgroundColor(QColor(0, 0, 0, 0));
//widgetImage->getQGraphicsViewAdapter()->resize(800, 600);
graphicsScene = widgetImage->getQGraphicsViewAdapter()->getQGraphicsScene();

View File

@ -6,6 +6,15 @@ SET(TARGET_SRC
IF (WIN32)
SET(TARGET_EXTERNAL_LIBRARIES ws2_32)
ELSE(WIN32)
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME)
IF(LIB_NSL_HAS_GETHOSTBYNAME)
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} nsl)
ENDIF()
CHECK_LIBRARY_EXISTS("socket" "socket" "" LIB_SOCKET_HAS_SOCKET)
IF(LIB_SOCKET_HAS_SOCKET)
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} socket)
ENDIF()
ENDIF(WIN32)
#### end var setup ###

View File

@ -40,8 +40,6 @@
#include <osgViewer/CompositeViewer>
#include <osgFX/Scribe>
#include <osg/io_utils>
class MyPager : public osgDB::DatabasePager

View File

@ -227,7 +227,7 @@ void TextTechnique::finish()
void TextTechnique::traverse(osg::NodeVisitor& nv)
{
// OSG_NOTICE<<"TextTechnique::traverse()"<<std::endl;
if (_textNode) _textNode->Group::traverse(nv);
if (_textNode) _textNode->osg::Group::traverse(nv);
}
/////////////////////////////////////////////////////////////////////////////////////////

View File

@ -30,6 +30,7 @@
#include <osg/GLBeginEndAdapter>
#include <osg/ArrayDispatchers>
#include <iosfwd>
#include <vector>
#include <map>
#include <set>

View File

@ -18,6 +18,7 @@
#include <osg/Vec2>
#include <osgText/Export>
#include <iosfwd>
#include <vector>
namespace osgText

View File

@ -594,8 +594,10 @@ int Thread::start() {
// value.
//
if(pd->stackSize) {
#ifdef PTHREAD_STACK_MIN
if(pd->stackSize < PTHREAD_STACK_MIN)
pd->stackSize = PTHREAD_STACK_MIN;
#endif
pthread_attr_setstacksize( &thread_attr, pd->stackSize);
if(status != 0) {
return status;

View File

@ -51,7 +51,7 @@ void MultiTouchTrackballManipulator::handleMultiTouchDrag(GUIEventAdapter::Touch
// osg::notify(osg::ALWAYS) << gap_now << " " << gap_last << std::endl;
if (abs(gap_last - gap_now) >= zoom_threshold)
if (fabs(gap_last - gap_now) >= zoom_threshold)
{
// zoom gesture
zoomModel( (gap_last - gap_now) * eventTimeDelta, true );

View File

@ -35,7 +35,11 @@
#endif
#ifndef _MSC_VER
#if defined __sun || defined __hpux
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;

View File

@ -27,8 +27,12 @@ typedef INT32 int32_t;
typedef UINT16 uint16_t;
typedef UINT8 uint8_t;
#else
#if defined __sun || defined __hpux
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#endif
using namespace osg;

View File

@ -706,9 +706,9 @@ void IncrementalCompileOperation::CompileSet::buildCompileMap(ContextSet& contex
++itr)
{
CompileData& cd = _compileMap[*itr];
cd._drawables.insert(cstc._drawables.begin(), cstc._drawables.end());
cd._textures.insert(cstc._textures.begin(), cstc._textures.end());
cd._programs.insert(cstc._programs.begin(), cstc._programs.end());
std::copy(cstc._drawables.begin(), cstc._drawables.end(), std::inserter(cd._drawables, cd._drawables.end()));
std::copy(cstc._textures.begin(), cstc._textures.end(), std::inserter(cd._textures, cd._textures.end()));
std::copy(cstc._programs.begin(), cstc._programs.end(), std::inserter(cd._programs, cd._programs.end()));
}
}

View File

@ -524,7 +524,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*)
data = data.substr(0, _maxSize-s.size()-(deleteMax - deleteMin));
s.erase(s.begin() + deleteMin, s.begin() + deleteMax);
s.insert(s.begin() + deleteMin, data.begin(), data.end());
std::copy(data.begin(), data.end(), std::inserter(s, s.begin() + deleteMin));
_index = deleteMin + data.size();
}
@ -532,7 +532,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*)
{
data = data.substr(0, _maxSize-s.size());
s.insert(s.begin() + _index, data.begin(), data.end());
std::copy(data.begin(), data.end(), std::inserter(s, s.begin() + _index));
_index += data.length();
}
@ -558,7 +558,7 @@ bool Input::keyDown(int key, int mask, const WindowManager*)
if (selectionMax - selectionMin > 0)
{
std::string data;
data.insert(data.begin(), s.begin() + selectionMin, s.begin() + selectionMax);
std::copy(s.begin() + selectionMin, s.begin() + selectionMax, std::inserter(data, data.begin()));
// Data to clipboard
#ifdef WIN32