Fix for Tiger build
This commit is contained in:
parent
a1f23bbccd
commit
f8c855a576
@ -16,8 +16,10 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <OpenGL/glu.h>
|
#include <OpenGL/glu.h>
|
||||||
|
#define GLU_TESS_CALLBACK GLvoid (CALLBACK*)(...)
|
||||||
#else
|
#else
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
#define GLU_TESS_CALLBACK GLvoid (CALLBACK*)()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __osgGLU_h
|
#endif // __osgGLU_h
|
||||||
|
@ -754,11 +754,11 @@ void _dwobj::buildDrawable(Group *grp, const osgDB::ReaderWriter::Options *optio
|
|||||||
|
|
||||||
|
|
||||||
GLUtesselator* ts=gluNewTess();
|
GLUtesselator* ts=gluNewTess();
|
||||||
gluTessCallback(ts, GLU_TESS_BEGIN, (void (CALLBACK *) ())myFaceBegin);
|
gluTessCallback(ts, GLU_TESS_BEGIN, (GLU_TESS_CALLBACK) myFaceBegin);
|
||||||
gluTessCallback(ts, GLU_TESS_VERTEX, (GLvoid (CALLBACK *) ())myVertex);
|
gluTessCallback(ts, GLU_TESS_VERTEX, (GLU_TESS_CALLBACK) myVertex);
|
||||||
gluTessCallback(ts, GLU_TESS_END, (GLvoid (CALLBACK *) ())myFaceEnd);
|
gluTessCallback(ts, GLU_TESS_END, (GLU_TESS_CALLBACK) myFaceEnd);
|
||||||
gluTessCallback(ts, GLU_TESS_ERROR, (GLvoid (CALLBACK *) ())error);
|
gluTessCallback(ts, GLU_TESS_ERROR, (GLU_TESS_CALLBACK) error);
|
||||||
gluTessCallback(ts, GLU_TESS_COMBINE_DATA, (GLvoid (CALLBACK *) ()) &combineCallback);
|
gluTessCallback(ts, GLU_TESS_COMBINE_DATA, (GLU_TESS_CALLBACK) combineCallback);
|
||||||
// for (int nvf=0; nvf<6; nvf++) { // for each length of face
|
// for (int nvf=0; nvf<6; nvf++) { // for each length of face
|
||||||
// for Geometry we dont need to collect prim types individually
|
// for Geometry we dont need to collect prim types individually
|
||||||
// prd.setmode(nvf , nfnvf); // filter out only this type of tesselated face
|
// prd.setmode(nvf , nfnvf); // filter out only this type of tesselated face
|
||||||
|
@ -46,10 +46,10 @@ bool Tessellator::tessellate(const Polygon &poly, const osg::Vec3Array *points,
|
|||||||
|
|
||||||
GLUtesselator *tess = gluNewTess();
|
GLUtesselator *tess = gluNewTess();
|
||||||
|
|
||||||
gluTessCallback(tess, GLU_TESS_BEGIN_DATA, reinterpret_cast<void (CALLBACK *)()>(cb_begin_data));
|
gluTessCallback(tess, GLU_TESS_BEGIN_DATA, (GLU_TESS_CALLBACK) (cb_begin_data));
|
||||||
gluTessCallback(tess, GLU_TESS_VERTEX_DATA, reinterpret_cast<void (CALLBACK *)()>(cb_vertex_data));
|
gluTessCallback(tess, GLU_TESS_VERTEX_DATA, (GLU_TESS_CALLBACK) (cb_vertex_data));
|
||||||
gluTessCallback(tess, GLU_TESS_END_DATA, reinterpret_cast<void (CALLBACK *)()>(cb_end_data));
|
gluTessCallback(tess, GLU_TESS_END_DATA, (GLU_TESS_CALLBACK) (cb_end_data));
|
||||||
gluTessCallback(tess, GLU_TESS_ERROR_DATA, reinterpret_cast<void (CALLBACK *)()>(cb_error_data));
|
gluTessCallback(tess, GLU_TESS_ERROR_DATA, (GLU_TESS_CALLBACK) (cb_error_data));
|
||||||
|
|
||||||
gluTessBeginPolygon(tess, this);
|
gluTessBeginPolygon(tess, this);
|
||||||
gluTessBeginContour(tess);
|
gluTessBeginContour(tess);
|
||||||
|
@ -35,17 +35,19 @@ Tesselator::~Tesselator()
|
|||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Tesselator::beginTesselation()
|
void Tesselator::beginTesselation()
|
||||||
{
|
{
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
if (!_tobj) _tobj = gluNewTess();
|
if (!_tobj) _tobj = gluNewTess();
|
||||||
|
|
||||||
gluTessCallback(_tobj, GLU_TESS_VERTEX_DATA, (GLvoid (CALLBACK*)()) vertexCallback);
|
gluTessCallback(_tobj, GLU_TESS_VERTEX_DATA, (GLU_TESS_CALLBACK) vertexCallback);
|
||||||
gluTessCallback(_tobj, GLU_TESS_BEGIN_DATA, (GLvoid (CALLBACK*)()) beginCallback);
|
gluTessCallback(_tobj, GLU_TESS_BEGIN_DATA, (GLU_TESS_CALLBACK) beginCallback);
|
||||||
gluTessCallback(_tobj, GLU_TESS_END_DATA, (GLvoid (CALLBACK*)()) endCallback);
|
gluTessCallback(_tobj, GLU_TESS_END_DATA, (GLU_TESS_CALLBACK) endCallback);
|
||||||
gluTessCallback(_tobj, GLU_TESS_COMBINE_DATA,(GLvoid (CALLBACK*)()) combineCallback);
|
gluTessCallback(_tobj, GLU_TESS_COMBINE_DATA,(GLU_TESS_CALLBACK) combineCallback);
|
||||||
gluTessCallback(_tobj, GLU_TESS_ERROR_DATA, (GLvoid (CALLBACK*)()) errorCallback);
|
gluTessCallback(_tobj, GLU_TESS_ERROR_DATA, (GLU_TESS_CALLBACK) errorCallback);
|
||||||
|
|
||||||
gluTessBeginPolygon(_tobj,this);
|
gluTessBeginPolygon(_tobj,this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user