Introduced osg namespace to new local GLU functions
This commit is contained in:
parent
12e6a23451
commit
d23ce985a1
@ -215,11 +215,11 @@ void PhotoArchive::buildArchive(const std::string& filename, const FileNameList&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PixelStorageModes psm;
|
osg::PixelStorageModes psm;
|
||||||
psm.pack_alignment = image->getPacking();
|
psm.pack_alignment = image->getPacking();
|
||||||
psm.unpack_alignment = image->getPacking();
|
psm.unpack_alignment = image->getPacking();
|
||||||
|
|
||||||
GLint status = gluScaleImage(&psm, image->getPixelFormat(),
|
GLint status = osg::gluScaleImage(&psm, image->getPixelFormat(),
|
||||||
image->s(),
|
image->s(),
|
||||||
image->t(),
|
image->t(),
|
||||||
image->getDataType(),
|
image->getDataType(),
|
||||||
@ -233,7 +233,7 @@ void PhotoArchive::buildArchive(const std::string& filename, const FileNameList&
|
|||||||
{
|
{
|
||||||
delete [] newData;
|
delete [] newData;
|
||||||
|
|
||||||
osg::notify(osg::WARN) << "Error scaleImage() did not succeed : errorString = "<<gluErrorString((GLenum)status)<<std::endl;
|
osg::notify(osg::WARN) << "Error scaleImage() did not succeed : errorString = "<<osg::gluErrorString((GLenum)status)<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// now set up the photo header.
|
// now set up the photo header.
|
||||||
@ -282,11 +282,11 @@ void PhotoArchive::buildArchive(const std::string& filename, const FileNameList&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PixelStorageModes psm;
|
osg::PixelStorageModes psm;
|
||||||
psm.pack_alignment = image->getPacking();
|
psm.pack_alignment = image->getPacking();
|
||||||
psm.unpack_alignment = image->getPacking();
|
psm.unpack_alignment = image->getPacking();
|
||||||
|
|
||||||
GLint status = gluScaleImage(&psm, image->getPixelFormat(),
|
GLint status = osg::gluScaleImage(&psm, image->getPixelFormat(),
|
||||||
image->s(),
|
image->s(),
|
||||||
image->t(),
|
image->t(),
|
||||||
image->getDataType(),
|
image->getDataType(),
|
||||||
@ -300,7 +300,7 @@ void PhotoArchive::buildArchive(const std::string& filename, const FileNameList&
|
|||||||
{
|
{
|
||||||
delete [] newData;
|
delete [] newData;
|
||||||
|
|
||||||
osg::notify(osg::WARN) << "Error scaleImage() did not succeed : errorString = "<<gluErrorString((GLenum)status)<<std::endl;
|
osg::notify(osg::WARN) << "Error scaleImage() did not succeed : errorString = "<<osg::gluErrorString((GLenum)status)<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageHeader imageHeader;
|
ImageHeader imageHeader;
|
||||||
|
@ -38,52 +38,8 @@
|
|||||||
|
|
||||||
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
||||||
|
|
||||||
|
|
||||||
class MyGraphicsContext {
|
|
||||||
public:
|
|
||||||
MyGraphicsContext()
|
|
||||||
{
|
|
||||||
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
|
|
||||||
traits->x = 0;
|
|
||||||
traits->y = 0;
|
|
||||||
traits->width = 1;
|
|
||||||
traits->height = 1;
|
|
||||||
traits->windowDecoration = false;
|
|
||||||
traits->doubleBuffer = false;
|
|
||||||
traits->sharedContext = 0;
|
|
||||||
traits->pbuffer = true;
|
|
||||||
|
|
||||||
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
|
||||||
|
|
||||||
if (!_gc)
|
|
||||||
{
|
|
||||||
traits->pbuffer = false;
|
|
||||||
_gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_gc.valid())
|
|
||||||
{
|
|
||||||
_gc->realize();
|
|
||||||
_gc->makeCurrent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool valid() const { return _gc.valid() && _gc->isRealized(); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
osg::ref_ptr<osg::GraphicsContext> _gc;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
osg::StateSet* createState()
|
osg::StateSet* createState()
|
||||||
{
|
{
|
||||||
MyGraphicsContext gc;
|
|
||||||
if (!gc.valid())
|
|
||||||
{
|
|
||||||
osg::notify(osg::NOTICE)<<"Unable to create the graphics context required to build 3d image."<<std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read 4 2d images
|
// read 4 2d images
|
||||||
osg::ref_ptr<osg::Image> image_0 = osgDB::readImageFile("Images/lz.rgb");
|
osg::ref_ptr<osg::Image> image_0 = osgDB::readImageFile("Images/lz.rgb");
|
||||||
osg::ref_ptr<osg::Image> image_1 = osgDB::readImageFile("Images/reflect.rgb");
|
osg::ref_ptr<osg::Image> image_1 = osgDB::readImageFile("Images/reflect.rgb");
|
||||||
@ -102,10 +58,7 @@ osg::StateSet* createState()
|
|||||||
return new osg::StateSet;
|
return new osg::StateSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get max 3D texture size
|
GLint textureSize = 256;
|
||||||
GLint textureSize = osg::Texture3D::getExtensions(0,true)->maxTexture3DSize();
|
|
||||||
if (textureSize > 256)
|
|
||||||
textureSize = 256;
|
|
||||||
|
|
||||||
// scale them all to the same size.
|
// scale them all to the same size.
|
||||||
image_0->scaleImage(textureSize,textureSize,1);
|
image_0->scaleImage(textureSize,textureSize,1);
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
#include <osg/GL>
|
#include <osg/GL>
|
||||||
|
|
||||||
|
namespace osg
|
||||||
|
{
|
||||||
|
|
||||||
/* Pixel storage modes, used by gluScaleImage */
|
/* Pixel storage modes, used by gluScaleImage */
|
||||||
struct OSG_EXPORT PixelStorageModes
|
struct OSG_EXPORT PixelStorageModes
|
||||||
{
|
{
|
||||||
@ -163,13 +166,15 @@ extern OSG_EXPORT GLUtesselator* gluNewTess (void);
|
|||||||
extern OSG_EXPORT void gluDeleteTess (GLUtesselator* tess);
|
extern OSG_EXPORT void gluDeleteTess (GLUtesselator* tess);
|
||||||
|
|
||||||
extern OSG_EXPORT void gluTessBeginContour (GLUtesselator* tess);
|
extern OSG_EXPORT void gluTessBeginContour (GLUtesselator* tess);
|
||||||
extern OSG_EXPORT void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
|
||||||
extern OSG_EXPORT void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
extern OSG_EXPORT void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
||||||
extern OSG_EXPORT void gluTessEndContour (GLUtesselator* tess);
|
extern OSG_EXPORT void gluTessEndContour (GLUtesselator* tess);
|
||||||
extern OSG_EXPORT void gluTessEndPolygon (GLUtesselator* tess);
|
|
||||||
extern OSG_EXPORT void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
extern OSG_EXPORT void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
||||||
extern OSG_EXPORT void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
extern OSG_EXPORT void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
||||||
extern OSG_EXPORT void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
extern OSG_EXPORT void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
||||||
|
extern OSG_EXPORT void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
||||||
|
extern OSG_EXPORT void gluTessEndPolygon (GLUtesselator* tess);
|
||||||
|
extern OSG_EXPORT void gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __osgGLU_h
|
#endif // __osgGLU_h
|
||||||
|
@ -210,7 +210,7 @@ class OSGUTIL_EXPORT Tessellator : public osg::Referenced
|
|||||||
typedef std::vector<NewVertex> NewVertexList;
|
typedef std::vector<NewVertex> NewVertexList;
|
||||||
typedef std::vector<Vec3d*> Vec3dList;
|
typedef std::vector<Vec3d*> Vec3dList;
|
||||||
|
|
||||||
GLUtesselator* _tobj;
|
osg::GLUtesselator* _tobj;
|
||||||
|
|
||||||
PrimList _primList;
|
PrimList _primList;
|
||||||
Vec3dList _coordData;
|
Vec3dList _coordData;
|
||||||
|
@ -1003,7 +1003,7 @@ void Image::copySubImage(int s_offset, int t_offset, int r_offset, const osg::Im
|
|||||||
|
|
||||||
PixelStorageModes psm;
|
PixelStorageModes psm;
|
||||||
psm.pack_alignment = _packing;
|
psm.pack_alignment = _packing;
|
||||||
psm.pack_row_length = _packing;
|
psm.pack_row_length = _s;
|
||||||
psm.unpack_alignment = _packing;
|
psm.unpack_alignment = _packing;
|
||||||
|
|
||||||
GLint status = gluScaleImage(&psm, _pixelFormat,
|
GLint status = gluScaleImage(&psm, _pixelFormat,
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*ARGSUSED*/ static void GLAPIENTRY noBegin( GLenum type ) {}
|
/*ARGSUSED*/ static void GLAPIENTRY noBegin( GLenum type ) {}
|
||||||
/*ARGSUSED*/ static void GLAPIENTRY noEdgeFlag( GLboolean boundaryEdge ) {}
|
/*ARGSUSED*/ static void GLAPIENTRY noEdgeFlag( GLboolean boundaryEdge ) {}
|
||||||
/*ARGSUSED*/ static void GLAPIENTRY noVertex( void *data ) {}
|
/*ARGSUSED*/ static void GLAPIENTRY noVertex( void *data ) {}
|
||||||
@ -89,7 +90,7 @@ typedef struct { GLUhalfEdge e, eSym; } EdgePair;
|
|||||||
|
|
||||||
|
|
||||||
GLUtesselator * GLAPIENTRY
|
GLUtesselator * GLAPIENTRY
|
||||||
gluNewTess( void )
|
osg::gluNewTess( void )
|
||||||
{
|
{
|
||||||
GLUtesselator *tess;
|
GLUtesselator *tess;
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ static void GotoState( GLUtesselator *tess, enum TessState newState )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluDeleteTess( GLUtesselator *tess )
|
osg::gluDeleteTess( GLUtesselator *tess )
|
||||||
{
|
{
|
||||||
RequireState( tess, T_DORMANT );
|
RequireState( tess, T_DORMANT );
|
||||||
memFree( tess );
|
memFree( tess );
|
||||||
@ -198,7 +199,7 @@ gluDeleteTess( GLUtesselator *tess )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
|
osg::gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
|
||||||
{
|
{
|
||||||
GLenum windingRule;
|
GLenum windingRule;
|
||||||
|
|
||||||
@ -237,7 +238,7 @@ gluTessProperty( GLUtesselator *tess, GLenum which, GLdouble value )
|
|||||||
|
|
||||||
/* Returns tessellator property */
|
/* Returns tessellator property */
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value )
|
osg::gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value )
|
||||||
{
|
{
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case GLU_TESS_TOLERANCE:
|
case GLU_TESS_TOLERANCE:
|
||||||
@ -265,7 +266,7 @@ gluGetTessProperty( GLUtesselator *tess, GLenum which, GLdouble *value )
|
|||||||
} /* gluGetTessProperty() */
|
} /* gluGetTessProperty() */
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
|
osg::gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
|
||||||
{
|
{
|
||||||
tess->normal[0] = x;
|
tess->normal[0] = x;
|
||||||
tess->normal[1] = y;
|
tess->normal[1] = y;
|
||||||
@ -273,7 +274,7 @@ gluTessNormal( GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn)
|
osg::gluTessCallback( GLUtesselator *tess, GLenum which, _GLUfuncptr fn)
|
||||||
{
|
{
|
||||||
switch( which ) {
|
switch( which ) {
|
||||||
case GLU_TESS_BEGIN:
|
case GLU_TESS_BEGIN:
|
||||||
@ -412,7 +413,7 @@ static int EmptyCache( GLUtesselator *tess )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data )
|
osg::gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data )
|
||||||
{
|
{
|
||||||
int i, tooLarge = FALSE;
|
int i, tooLarge = FALSE;
|
||||||
GLdouble x, clamped[3];
|
GLdouble x, clamped[3];
|
||||||
@ -459,7 +460,7 @@ gluTessVertex( GLUtesselator *tess, GLdouble coords[3], void *data )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessBeginPolygon( GLUtesselator *tess, void *data )
|
osg::gluTessBeginPolygon( GLUtesselator *tess, void *data )
|
||||||
{
|
{
|
||||||
RequireState( tess, T_DORMANT );
|
RequireState( tess, T_DORMANT );
|
||||||
|
|
||||||
@ -473,7 +474,7 @@ gluTessBeginPolygon( GLUtesselator *tess, void *data )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessBeginContour( GLUtesselator *tess )
|
osg::gluTessBeginContour( GLUtesselator *tess )
|
||||||
{
|
{
|
||||||
RequireState( tess, T_IN_POLYGON );
|
RequireState( tess, T_IN_POLYGON );
|
||||||
|
|
||||||
@ -490,14 +491,14 @@ gluTessBeginContour( GLUtesselator *tess )
|
|||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessEndContour( GLUtesselator *tess )
|
osg::gluTessEndContour( GLUtesselator *tess )
|
||||||
{
|
{
|
||||||
RequireState( tess, T_IN_CONTOUR );
|
RequireState( tess, T_IN_CONTOUR );
|
||||||
tess->state = T_IN_POLYGON;
|
tess->state = T_IN_POLYGON;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
gluTessEndPolygon( GLUtesselator *tess )
|
osg::gluTessEndPolygon( GLUtesselator *tess )
|
||||||
{
|
{
|
||||||
GLUmesh *mesh;
|
GLUmesh *mesh;
|
||||||
|
|
||||||
@ -590,43 +591,3 @@ gluTessEndPolygon( GLUtesselator *tess )
|
|||||||
tess->polygonData= NULL;
|
tess->polygonData= NULL;
|
||||||
tess->mesh = NULL;
|
tess->mesh = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*XXXblythe unused function*/
|
|
||||||
#if 0
|
|
||||||
void GLAPIENTRY
|
|
||||||
gluDeleteMesh( GLUmesh *mesh )
|
|
||||||
{
|
|
||||||
__gl_meshDeleteMesh( mesh );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************/
|
|
||||||
|
|
||||||
/* Obsolete calls -- for backward compatibility */
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
gluBeginPolygon( GLUtesselator *tess )
|
|
||||||
{
|
|
||||||
gluTessBeginPolygon( tess, NULL );
|
|
||||||
gluTessBeginContour( tess );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void GLAPIENTRY
|
|
||||||
gluNextContour( GLUtesselator *tess, GLenum type )
|
|
||||||
{
|
|
||||||
gluTessEndContour( tess );
|
|
||||||
gluTessBeginContour( tess );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
gluEndPolygon( GLUtesselator *tess )
|
|
||||||
{
|
|
||||||
gluTessEndContour( tess );
|
|
||||||
gluTessEndPolygon( tess );
|
|
||||||
}
|
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "priorityq.h"
|
#include "priorityq.h"
|
||||||
|
|
||||||
|
|
||||||
/* The begin/end calls must be properly nested. We keep track of
|
/* The begin/end calls must be properly nested. We keep track of
|
||||||
* the current state to enforce the ordering.
|
* the current state to enforce the ordering.
|
||||||
*/
|
*/
|
||||||
@ -62,7 +61,7 @@ typedef struct CachedVertex {
|
|||||||
void *data;
|
void *data;
|
||||||
} CachedVertex;
|
} CachedVertex;
|
||||||
|
|
||||||
struct GLUtesselator {
|
struct osg::GLUtesselator {
|
||||||
|
|
||||||
/*** state needed for collecting the input data ***/
|
/*** state needed for collecting the input data ***/
|
||||||
|
|
||||||
@ -168,4 +167,9 @@ void GLAPIENTRY __gl_noCombineData( GLdouble coords[3], void *data[4],
|
|||||||
(*tess->callErrorData)((a),tess->polygonData); \
|
(*tess->callErrorData)((a),tess->polygonData); \
|
||||||
else (*tess->callError)((a));
|
else (*tess->callError)((a));
|
||||||
|
|
||||||
|
// make it easy to introduce the namespace osg for the public functions and typedefs
|
||||||
|
using osg::GLUtesselator;
|
||||||
|
using osg::_GLUfuncptr;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
#define GL_TABLE_TOO_LARGE 0x8031
|
#define GL_TABLE_TOO_LARGE 0x8031
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace osg
|
||||||
|
{
|
||||||
|
|
||||||
static unsigned char *__gluNurbsErrors[] = {
|
static unsigned char *__gluNurbsErrors[] = {
|
||||||
(unsigned char*) " ",
|
(unsigned char*) " ",
|
||||||
(unsigned char*) "spline order un-supported",
|
(unsigned char*) "spline order un-supported",
|
||||||
@ -140,3 +143,4 @@ const GLubyte* gluErrorString(GLenum errorCode)
|
|||||||
return (const GLubyte *) 0;
|
return (const GLubyte *) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // end of namespace osg
|
@ -50,6 +50,9 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <osg/Notify>
|
#include <osg/Notify>
|
||||||
|
|
||||||
|
namespace osg
|
||||||
|
{
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
unsigned char ub[4];
|
unsigned char ub[4];
|
||||||
unsigned short us[2];
|
unsigned short us[2];
|
||||||
@ -8970,3 +8973,4 @@ static void halveImage3D(int components,
|
|||||||
|
|
||||||
/*** mipmap.c ***/
|
/*** mipmap.c ***/
|
||||||
|
|
||||||
|
} // end of namespace osg
|
@ -44,15 +44,15 @@ bool Tessellator::tessellate(const Polygon &poly, const osg::Vec3Array *points,
|
|||||||
out_ = out;
|
out_ = out;
|
||||||
last_error_ = 0;
|
last_error_ = 0;
|
||||||
|
|
||||||
GLUtesselator *tess = gluNewTess();
|
osg::GLUtesselator *tess = osg::gluNewTess();
|
||||||
|
|
||||||
gluTessCallback(tess, GLU_TESS_BEGIN_DATA, (GLU_TESS_CALLBACK) (cb_begin_data));
|
osg::gluTessCallback(tess, GLU_TESS_BEGIN_DATA, (osg::GLU_TESS_CALLBACK) (cb_begin_data));
|
||||||
gluTessCallback(tess, GLU_TESS_VERTEX_DATA, (GLU_TESS_CALLBACK) (cb_vertex_data));
|
osg::gluTessCallback(tess, GLU_TESS_VERTEX_DATA, (osg::GLU_TESS_CALLBACK) (cb_vertex_data));
|
||||||
gluTessCallback(tess, GLU_TESS_END_DATA, (GLU_TESS_CALLBACK) (cb_end_data));
|
osg::gluTessCallback(tess, GLU_TESS_END_DATA, (osg::GLU_TESS_CALLBACK) (cb_end_data));
|
||||||
gluTessCallback(tess, GLU_TESS_ERROR_DATA, (GLU_TESS_CALLBACK) (cb_error_data));
|
osg::gluTessCallback(tess, GLU_TESS_ERROR_DATA, (osg::GLU_TESS_CALLBACK) (cb_error_data));
|
||||||
|
|
||||||
gluTessBeginPolygon(tess, this);
|
osg::gluTessBeginPolygon(tess, this);
|
||||||
gluTessBeginContour(tess);
|
osg::gluTessBeginContour(tess);
|
||||||
|
|
||||||
double *vertices = new double[poly.indices().size() * 3];
|
double *vertices = new double[poly.indices().size() * 3];
|
||||||
int *indices = new int[poly.indices().size()];
|
int *indices = new int[poly.indices().size()];
|
||||||
@ -72,9 +72,9 @@ bool Tessellator::tessellate(const Polygon &poly, const osg::Vec3Array *points,
|
|||||||
gluTessVertex(tess, v, x);
|
gluTessVertex(tess, v, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
gluTessEndContour(tess);
|
osg::gluTessEndContour(tess);
|
||||||
gluTessEndPolygon(tess);
|
osg::gluTessEndPolygon(tess);
|
||||||
gluDeleteTess(tess);
|
osg::gluDeleteTess(tess);
|
||||||
|
|
||||||
delete[] vertices;
|
delete[] vertices;
|
||||||
delete[] indices;
|
delete[] indices;
|
||||||
|
@ -434,7 +434,7 @@ void Glyph::subload() const
|
|||||||
GLenum errorNo = glGetError();
|
GLenum errorNo = glGetError();
|
||||||
if (errorNo!=GL_NO_ERROR)
|
if (errorNo!=GL_NO_ERROR)
|
||||||
{
|
{
|
||||||
const GLubyte* msg = gluErrorString(errorNo);
|
const GLubyte* msg = osg::gluErrorString(errorNo);
|
||||||
if (msg) { OSG_WARN<<"before Glyph::subload(): detected OpenGL error: "<<msg<<std::endl; }
|
if (msg) { OSG_WARN<<"before Glyph::subload(): detected OpenGL error: "<<msg<<std::endl; }
|
||||||
else { OSG_WARN<<"before Glyph::subload(): detected OpenGL error number: "<<errorNo<<std::endl; }
|
else { OSG_WARN<<"before Glyph::subload(): detected OpenGL error number: "<<errorNo<<std::endl; }
|
||||||
}
|
}
|
||||||
@ -459,7 +459,7 @@ void Glyph::subload() const
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
const GLubyte* msg = gluErrorString(errorNo);
|
const GLubyte* msg = osg::gluErrorString(errorNo);
|
||||||
if (msg) { OSG_WARN<<"after Glyph::subload() : detected OpenGL error: "<<msg<<std::endl; }
|
if (msg) { OSG_WARN<<"after Glyph::subload() : detected OpenGL error: "<<msg<<std::endl; }
|
||||||
else { OSG_WARN<<"after Glyph::subload() : detected OpenGL error number: "<<errorNo<<std::endl; }
|
else { OSG_WARN<<"after Glyph::subload() : detected OpenGL error number: "<<errorNo<<std::endl; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user