Commit 85345a67 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[FIX] made it compile on Mac.

parent 3bd4b8f8
......@@ -79,10 +79,14 @@ boost::shared_ptr< std::set< WPosition > > WPlane::samplePoints( double stepWidt
{
for( size_t j = 0; j < numX; ++j )
{
result->insert( m_pos - i * ycrement - j * xcrement );
result->insert( m_pos + i * ycrement - j * xcrement );
result->insert( m_pos - i * ycrement + j * xcrement );
result->insert( m_pos + i * ycrement + j * xcrement );
// NOTE: on some machines with older compilers, the size_t is not mapped to uint32_t or uint64_t. This
// breaks our WMatrixFixed type promotion. So we use doubles directly.
double id = i;
double jd = j;
result->insert( m_pos - id * ycrement - jd * xcrement );
result->insert( m_pos + id * ycrement - jd * xcrement );
result->insert( m_pos - id * ycrement + jd * xcrement );
result->insert( m_pos + id * ycrement + jd * xcrement );
}
}
return result;
......
......@@ -162,7 +162,7 @@ void WFiberCluster::generateCenterLine() const
{
avgPosition += cit->at( i );
}
avgPosition /= fibs->size();
avgPosition /= static_cast< double >( fibs->size() );
m_centerLine->push_back( avgPosition );
}
......
......@@ -28,16 +28,19 @@
#include "exceptions/WGEInitFailed.h"
WGEGraphicsWindow::WGEGraphicsWindow( osg::ref_ptr<osg::Referenced> wdata,
WGEGraphicsWindow::WGEGraphicsWindow( osg::ref_ptr<osg::Referenced>
#ifndef __APPLE__
wdata // this parameter is only needed on non-mac
#endif
,
int x,
int y,
int width,
int height )
{
#ifndef __APPLE__
m_WindowData = wdata;
// initialize context
m_WindowData = wdata;
try
{
createContext( x, y, width, height );
......@@ -48,7 +51,8 @@ WGEGraphicsWindow::WGEGraphicsWindow( osg::ref_ptr<osg::Referenced> wdata,
throw WGEInitFailed( "Initialization of OpenGL graphics context failed." );
}
#else
m_GraphicsWindow( new osgViewer::GraphicsWindowEmbedded( x, y, width, height ) );
m_GraphicsWindow = osg::ref_ptr<osgViewer::GraphicsWindow>(
static_cast<osgViewer::GraphicsWindow*>( new osgViewer::GraphicsWindowEmbedded( x, y, width, height ) ) );
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment