Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -41,10 +41,6 @@ typedef double GLUclampd; /* double precision float in [0,1] */
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
// mesa glu has the below for Windows.
|
||||
//#define GLUAPIENTRY __stdcall
|
||||
//typedef void (__stdcall* _GLUfuncptr)();
|
||||
|
||||
#define GLUAPIENTRY
|
||||
typedef void (* _GLUfuncptr)();
|
||||
|
||||
@@ -55,20 +51,6 @@ typedef struct GLUtesselator GLUtesselator;
|
||||
typedef GLUtesselator GLUtesselatorObj;
|
||||
typedef GLUtesselator GLUtriangulatorObj;
|
||||
|
||||
/*
|
||||
GLUAPI GLUtesselator* GLUAPIENTRY gluNewTess (void);
|
||||
GLUAPI void GLUAPIENTRY gluDeleteTess (GLUtesselator* tess);
|
||||
|
||||
GLUAPI void GLUAPIENTRY gluTessBeginContour (GLUtesselator* tess);
|
||||
GLUAPI void GLUAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLUvoid* data);
|
||||
GLUAPI void GLUAPIENTRY gluTessCallback (GLUtesselator* tess, GLUenum which, _GLUfuncptr CallBackFunc);
|
||||
GLUAPI void GLUAPIENTRY gluTessEndContour (GLUtesselator* tess);
|
||||
GLUAPI void GLUAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
|
||||
GLUAPI void GLUAPIENTRY gluTessNormal (GLUtesselator* tess, GLUdouble valueX, GLUdouble valueY, GLUdouble valueZ);
|
||||
GLUAPI void GLUAPIENTRY gluTessProperty (GLUtesselator* tess, GLUenum which, GLUdouble data);
|
||||
GLUAPI void GLUAPIENTRY gluTessVertex (GLUtesselator* tess, GLUdouble *location, GLUvoid* data);
|
||||
*/
|
||||
|
||||
#define GLU_MIN(x,y) ((x) <= (y) ? (x) : (y))
|
||||
#define GLU_MAX(x,y) ((x) >= (y) ? (x) : (y))
|
||||
#define GLU_ABS(x) ((x) < 0 ? -(x) : (x))
|
||||
|
||||
@@ -75,10 +75,6 @@ inline GLUdouble __gl_edgeSign( GLUvertex *u, GLUvertex *v, GLUvertex *w )
|
||||
*/
|
||||
GLUdouble gapL, gapR;
|
||||
|
||||
/*
|
||||
#define VertLeq(u,v) (((u)->s < (v)->s) || \
|
||||
((u)->s == (v)->s && (u)->t <= (v)->t))
|
||||
*/
|
||||
assert( VertLeq( u, v ) && VertLeq( v, w ));
|
||||
|
||||
gapL = v->s - u->s;
|
||||
@@ -172,7 +168,6 @@ inline int __gl_vertCCW( GLUvertex *u, GLUvertex *v, GLUvertex *w )
|
||||
: (x + (y-x) * (a/(a+b)))) \
|
||||
: (y + (x-y) * (b/(a+b)))))
|
||||
|
||||
//#define Swap(a,b) if (1) { GLUvertex *t = a; a = b; b = t; } else
|
||||
#define Swap(a,b) do { GLUvertex *t = a; a = b; b = t; } while(false)
|
||||
|
||||
inline void __gl_edgeIntersect( GLUvertex *o1, GLUvertex *d1,
|
||||
|
||||
@@ -585,35 +585,6 @@ gluTessEndPolygon( GLUtesselator *tess )
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************/
|
||||
|
||||
/* Obsolete calls -- for backward compatibility */
|
||||
|
||||
/*
|
||||
inline void GLUAPIENTRY
|
||||
gluBeginPolygon( GLUtesselator *tess )
|
||||
{
|
||||
gluTessBeginPolygon( tess, NULL );
|
||||
gluTessBeginContour( tess );
|
||||
}
|
||||
|
||||
|
||||
inline void GLUAPIENTRY
|
||||
gluNextContour( GLUtesselator *tess, GLUenum type )
|
||||
{
|
||||
gluTessEndContour( tess );
|
||||
gluTessBeginContour( tess );
|
||||
}
|
||||
|
||||
|
||||
inline void GLUAPIENTRY
|
||||
gluEndPolygon( GLUtesselator *tess )
|
||||
{
|
||||
gluTessEndContour( tess );
|
||||
gluTessEndPolygon( tess );
|
||||
}
|
||||
*/
|
||||
|
||||
#include "undef"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,26 +7,6 @@
|
||||
/// inlined C code : ///////////////////////////////////
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TOOLS_MEM
|
||||
#include "../mem"
|
||||
#include <cstdlib>
|
||||
namespace tools {
|
||||
inline void* mem_alloc(size_t a_size){
|
||||
mem::increment(tools::s_malloc().c_str());
|
||||
return ::malloc(a_size);
|
||||
}
|
||||
inline void* mem_realloc(void* a_ptr,size_t a_size){
|
||||
if(a_ptr==NULL) mem::increment(tools::s_malloc().c_str());
|
||||
return ::realloc(a_ptr,a_size);
|
||||
}
|
||||
inline void mem_free(void* a_ptr){
|
||||
if(a_ptr!=NULL) mem::decrement(tools::s_malloc().c_str());
|
||||
::free(a_ptr);
|
||||
}
|
||||
inline int mem_init( size_t /*maxFast*/) {return 1;}
|
||||
|
||||
}
|
||||
#else
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
namespace tools {
|
||||
@@ -35,7 +15,6 @@ inline void* mem_realloc(void* a_ptr,size_t a_size){return ::realloc(a_ptr,a_siz
|
||||
inline void mem_free(void* a_ptr){::free(a_ptr);}
|
||||
inline int mem_init( size_t /*maxFast*/) {return 1;}
|
||||
}
|
||||
#endif
|
||||
|
||||
#define memAlloc tools::mem_alloc
|
||||
#define memRealloc tools::mem_realloc
|
||||
|
||||
Reference in New Issue
Block a user