Tesselation error fix.
Added missing callback function (combine callback).
This commit is contained in:
parent
b1144a864f
commit
e3cb0aa36f
|
@ -1394,6 +1394,18 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr )
|
|||
}
|
||||
|
||||
|
||||
void CALLBACK CombineCallback( GLdouble coords[3],
|
||||
GLdouble* vertex_data[4],
|
||||
GLfloat weight[4], GLdouble** dataOut )
|
||||
{
|
||||
GLdouble* vertex = new GLdouble[3];
|
||||
|
||||
memcpy( vertex, coords, 3 * sizeof(GLdouble) );
|
||||
|
||||
*dataOut = vertex;
|
||||
}
|
||||
|
||||
|
||||
void CALLBACK BeginCallback( GLenum aWhich )
|
||||
{
|
||||
glBegin( aWhich );
|
||||
|
@ -1418,6 +1430,7 @@ void CALLBACK ErrorCallback( GLenum aErrorCode )
|
|||
void InitTesselatorCallbacks( GLUtesselator* aTesselator )
|
||||
{
|
||||
gluTessCallback( aTesselator, GLU_TESS_VERTEX, ( void (CALLBACK*)() )VertexCallback );
|
||||
gluTessCallback( aTesselator, GLU_TESS_COMBINE, ( void (CALLBACK*)() )CombineCallback );
|
||||
gluTessCallback( aTesselator, GLU_TESS_BEGIN, ( void (CALLBACK*)() )BeginCallback );
|
||||
gluTessCallback( aTesselator, GLU_TESS_END, ( void (CALLBACK*)() )EndCallback );
|
||||
gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback );
|
||||
|
|
Loading…
Reference in New Issue