glu32: Use the correct data types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-04-06 13:48:07 +02:00
parent 3558acac72
commit 488bdbaf19
1 changed files with 249 additions and 196 deletions

View File

@ -25,21 +25,27 @@
#include "windef.h"
#include "winbase.h"
#include "wine/wgl.h"
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(glu);
typedef struct GLUnurbs GLUnurbs;
typedef struct GLUquadric GLUquadric;
typedef struct GLUtesselator GLUtesselator;
typedef void (*_GLUfuncptr)(void);
/* The only non-trivial bit of this is the *Tess* functions. Here we
need to wrap the callbacks up in a thunk to switch calling
conventions, so we use our own tesselator type to store the
application's callbacks. wine_gluTessCallback always sets the
*_DATA type of callback so that we have access to the polygon_data
(which is in fact just wine_tess_t), in the thunk itself we can
(which is in fact just wine_GLUtesselator), in the thunk itself we can
check whether we should call the _DATA or non _DATA type. */
typedef struct {
void *tess;
GLUtesselator *tess;
void *polygon_data;
void (CALLBACK *cb_tess_begin)(int);
void (CALLBACK *cb_tess_begin_data)(int, void *);
@ -53,7 +59,7 @@ typedef struct {
void (CALLBACK *cb_tess_edge_flag_data)(int, void *);
void (CALLBACK *cb_tess_combine)(double *, void *, float *, void **);
void (CALLBACK *cb_tess_combine_data)(double *, void *, float *, void **, void *);
} wine_tess_t;
} wine_GLUtesselator;
#define GLU_TESS_BEGIN 100100
#define GLU_TESS_VERTEX 100101
@ -68,53 +74,53 @@ typedef struct {
#define GLU_TESS_EDGE_FLAG_DATA 100110
#define GLU_TESS_COMBINE_DATA 100111
static int (*p_gluBeginCurve)(void *arg0);
static int (*p_gluBeginSurface)(void *arg0);
static int (*p_gluBeginTrim)(void *arg0);
static int (*p_gluBuild1DMipmaps)(int arg0,int arg1,int arg2,int arg3,int arg4,void *arg5);
static int (*p_gluBuild2DMipmaps)(int arg0,int arg1,int arg2,int arg3,int arg4,int arg5,void *arg6);
static int (*p_gluCylinder)(void *arg0,double arg1,double arg2,double arg3,int arg4,int arg5);
static int (*p_gluDeleteNurbsRenderer)(void *arg0);
static int (*p_gluDeleteQuadric)(void *arg0);
static void (*p_gluDeleteTess)(void *);
static int (*p_gluDisk)(void *arg0,double arg1,double arg2,int arg3,int arg4);
static int (*p_gluEndCurve)(void *arg0);
static int (*p_gluEndSurface)(void *arg0);
static int (*p_gluEndTrim)(void *arg0);
static int (*p_gluErrorString)(int arg0);
static int (*p_gluGetNurbsProperty)(void *arg0,int arg1,void *arg2);
static int (*p_gluGetString)(int arg0);
static int (*p_gluLoadSamplingMatrices)(void *arg0,void *arg1,void *arg2,void *arg3);
static int (*p_gluLookAt)(double arg0,double arg1,double arg2,double arg3,double arg4,double arg5,double arg6,double arg7,double arg8);
static int (*p_gluNewNurbsRenderer)(void);
static int (*p_gluNewQuadric)(void);
static void*(*p_gluNewTess)(void);
static int (*p_gluNurbsCallback)(void *arg0,int arg1,void *arg2);
static int (*p_gluNurbsCurve)(void *arg0,int arg1,void *arg2,int arg3,void *arg4,int arg5,int arg6);
static int (*p_gluNurbsProperty)(void *arg0,int arg1,int arg2);
static int (*p_gluNurbsSurface)(void *arg0,int arg1,void *arg2,int arg3,void *arg4,int arg5,int arg6,void *arg7,int arg8,int arg9,int arg10);
static int (*p_gluOrtho2D)(double arg0,double arg1,double arg2,double arg3);
static int (*p_gluPartialDisk)(void *arg0,double arg1,double arg2,int arg3,int arg4,double arg5,double arg6);
static int (*p_gluPerspective)(double arg0,double arg1,double arg2,double arg3);
static int (*p_gluPickMatrix)(double arg0,double arg1,double arg2,double arg3,void *arg4);
static int (*p_gluProject)(double arg0,double arg1,double arg2,void *arg3,void *arg4,void *arg5,void *arg6,void *arg7,void *arg8);
static int (*p_gluPwlCurve)(void *arg0,int arg1,void *arg2,int arg3,int arg4);
static int (*p_gluQuadricCallback)(void *arg0,int arg1,void *arg2);
static int (*p_gluQuadricDrawStyle)(void *arg0,int arg1);
static int (*p_gluQuadricNormals)(void *arg0,int arg1);
static int (*p_gluQuadricOrientation)(void *arg0,int arg1);
static int (*p_gluQuadricTexture)(void *arg0,int arg1);
static int (*p_gluScaleImage)(int arg0,int arg1,int arg2,int arg3,void *arg4,int arg5,int arg6,int arg7,void *arg8);
static int (*p_gluSphere)(void *arg0,double arg1,int arg2,int arg3);
static void (*p_gluTessBeginContour)(void *);
static void (*p_gluTessBeginPolygon)(void *, void *);
static void (*p_gluTessCallback)(void *,int,void *);
static void (*p_gluTessEndContour)(void *);
static void (*p_gluTessEndPolygon)(void *);
static void (*p_gluTessNormal)(void *, double, double, double);
static void (*p_gluTessProperty)(void *, int, double);
static void (*p_gluTessVertex)(void *, void *, void *);
static int (*p_gluUnProject)(double arg0,double arg1,double arg2,void *arg3,void *arg4,void *arg5,void *arg6,void *arg7,void *arg8);
static void (*p_gluBeginCurve)( GLUnurbs* nurb );
static void (*p_gluBeginSurface)( GLUnurbs* nurb );
static void (*p_gluBeginTrim)( GLUnurbs* nurb );
static GLint (*p_gluBuild1DMipmaps)( GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data );
static GLint (*p_gluBuild2DMipmaps)( GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data );
static void (*p_gluCylinder)( GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks );
static void (*p_gluDeleteNurbsRenderer)( GLUnurbs* nurb );
static void (*p_gluDeleteQuadric)( GLUquadric* quad );
static void (*p_gluDeleteTess)( GLUtesselator* tess );
static void (*p_gluDisk)( GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops );
static void (*p_gluEndCurve)( GLUnurbs* nurb );
static void (*p_gluEndSurface)( GLUnurbs* nurb );
static void (*p_gluEndTrim)( GLUnurbs* nurb );
static const GLubyte * (*p_gluErrorString)( GLenum error );
static void (*p_gluGetNurbsProperty)( GLUnurbs* nurb, GLenum property, GLfloat* data );
static const GLubyte * (*p_gluGetString)( GLenum name );
static void (*p_gluLoadSamplingMatrices)( GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view );
static void (*p_gluLookAt)( GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ );
static GLUnurbs* (*p_gluNewNurbsRenderer)(void);
static GLUquadric* (*p_gluNewQuadric)(void);
static GLUtesselator* (*p_gluNewTess)(void);
static void (*p_gluNurbsCallback)( GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc );
static void (*p_gluNurbsCurve)( GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type );
static void (*p_gluNurbsProperty)( GLUnurbs* nurb, GLenum property, GLfloat value );
static void (*p_gluNurbsSurface)( GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type );
static void (*p_gluOrtho2D)( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top );
static void (*p_gluPartialDisk)( GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep );
static void (*p_gluPerspective)( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar );
static void (*p_gluPickMatrix)( GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport );
static GLint (*p_gluProject)( GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ );
static void (*p_gluPwlCurve)( GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type );
static void (*p_gluQuadricCallback)( GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc );
static void (*p_gluQuadricDrawStyle)( GLUquadric* quad, GLenum draw );
static void (*p_gluQuadricNormals)( GLUquadric* quad, GLenum normal );
static void (*p_gluQuadricOrientation)( GLUquadric* quad, GLenum orientation );
static void (*p_gluQuadricTexture)( GLUquadric* quad, GLboolean texture );
static GLint (*p_gluScaleImage)( GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut );
static void (*p_gluSphere)( GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks );
static void (*p_gluTessBeginContour)( GLUtesselator* tess );
static void (*p_gluTessBeginPolygon)( GLUtesselator* tess, GLvoid* data );
static void (*p_gluTessCallback)( GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc );
static void (*p_gluTessEndContour)( GLUtesselator* tess );
static void (*p_gluTessEndPolygon)( GLUtesselator* tess );
static void (*p_gluTessNormal)( GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ );
static void (*p_gluTessProperty)( GLUtesselator* tess, GLenum which, GLdouble data );
static void (*p_gluTessVertex)( GLUtesselator* tess, GLdouble *location, GLvoid* data );
static GLint (*p_gluUnProject)( GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ );
static BOOL load_libglu(void)
{
@ -197,277 +203,334 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
/***********************************************************************
* gluLookAt (GLU32.@)
*/
int WINAPI wine_gluLookAt(double arg0,double arg1,double arg2,double arg3,double arg4,double arg5,double arg6,double arg7,double arg8) {
return p_gluLookAt(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
void WINAPI wine_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
GLdouble centerx, GLdouble centery, GLdouble centerz,
GLdouble upx, GLdouble upy, GLdouble upz )
{
p_gluLookAt( eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz );
}
/***********************************************************************
* gluOrtho2D (GLU32.@)
*/
int WINAPI wine_gluOrtho2D(double arg0,double arg1,double arg2,double arg3) {
return p_gluOrtho2D(arg0,arg1,arg2,arg3);
void WINAPI wine_gluOrtho2D( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top )
{
p_gluOrtho2D( left, right, bottom, top );
}
/***********************************************************************
* gluPerspective (GLU32.@)
*/
int WINAPI wine_gluPerspective(double arg0,double arg1,double arg2,double arg3) {
return p_gluPerspective(arg0,arg1,arg2,arg3);
void WINAPI wine_gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar )
{
p_gluPerspective( fovy, aspect, zNear, zFar );
}
/***********************************************************************
* gluPickMatrix (GLU32.@)
*/
int WINAPI wine_gluPickMatrix(double arg0,double arg1,double arg2,double arg3,void *arg4) {
return p_gluPickMatrix(arg0,arg1,arg2,arg3,arg4);
void WINAPI wine_gluPickMatrix( GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4])
{
p_gluPickMatrix( x, y, width, height, viewport );
}
/***********************************************************************
* gluProject (GLU32.@)
*/
int WINAPI wine_gluProject(double arg0,double arg1,double arg2,void *arg3,void *arg4,void *arg5,void *arg6,void *arg7,void *arg8) {
return p_gluProject(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
int WINAPI wine_gluProject( GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16],
const GLdouble projMatrix[16], const GLint viewport[4],
GLdouble *winx, GLdouble *winy, GLdouble *winz )
{
return p_gluProject( objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz );
}
/***********************************************************************
* gluUnProject (GLU32.@)
*/
int WINAPI wine_gluUnProject(double arg0,double arg1,double arg2,void *arg3,void *arg4,void *arg5,void *arg6,void *arg7,void *arg8) {
return p_gluUnProject(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
int WINAPI wine_gluUnProject( GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16],
const GLdouble projMatrix[16], const GLint viewport[4],
GLdouble *objx, GLdouble *objy, GLdouble *objz )
{
return p_gluUnProject( winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy, objz );
}
/***********************************************************************
* gluErrorString (GLU32.@)
*/
int WINAPI wine_gluErrorString(int arg0) {
return p_gluErrorString(arg0);
const GLubyte * WINAPI wine_gluErrorString( GLenum errCode )
{
return p_gluErrorString( errCode );
}
/***********************************************************************
* gluScaleImage (GLU32.@)
*/
int WINAPI wine_gluScaleImage(int arg0,int arg1,int arg2,int arg3,void *arg4,int arg5,int arg6,int arg7,void *arg8) {
return p_gluScaleImage(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
int WINAPI wine_gluScaleImage( GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain,
GLint widthout, GLint heightout, GLenum typeout, void *dataout )
{
return p_gluScaleImage( format, widthin, heightin, typein, datain,
widthout, heightout, typeout, dataout );
}
/***********************************************************************
* gluBuild1DMipmaps (GLU32.@)
*/
int WINAPI wine_gluBuild1DMipmaps(int arg0,int arg1,int arg2,int arg3,int arg4,void *arg5) {
return p_gluBuild1DMipmaps(arg0,arg1,arg2,arg3,arg4,arg5);
int WINAPI wine_gluBuild1DMipmaps( GLenum target, GLint components, GLint width,
GLenum format, GLenum type, const void *data )
{
return p_gluBuild1DMipmaps( target, components, width, format, type, data );
}
/***********************************************************************
* gluBuild2DMipmaps (GLU32.@)
*/
int WINAPI wine_gluBuild2DMipmaps(int arg0,int arg1,int arg2,int arg3,int arg4,int arg5,void *arg6) {
return p_gluBuild2DMipmaps(arg0,arg1,arg2,arg3,arg4,arg5,arg6);
int WINAPI wine_gluBuild2DMipmaps( GLenum target, GLint components, GLint width, GLint height,
GLenum format, GLenum type, const void *data )
{
return p_gluBuild2DMipmaps( target, components, width, height, format, type, data );
}
/***********************************************************************
* gluNewQuadric (GLU32.@)
*/
int WINAPI wine_gluNewQuadric(void) {
return p_gluNewQuadric();
GLUquadric * WINAPI wine_gluNewQuadric(void)
{
return p_gluNewQuadric();
}
/***********************************************************************
* gluDeleteQuadric (GLU32.@)
*/
int WINAPI wine_gluDeleteQuadric(void *arg0) {
return p_gluDeleteQuadric(arg0);
void WINAPI wine_gluDeleteQuadric( GLUquadric *state )
{
p_gluDeleteQuadric( state );
}
/***********************************************************************
* gluQuadricDrawStyle (GLU32.@)
*/
int WINAPI wine_gluQuadricDrawStyle(void *arg0,int arg1) {
return p_gluQuadricDrawStyle(arg0,arg1);
void WINAPI wine_gluQuadricDrawStyle( GLUquadric *quadObject, GLenum drawStyle )
{
p_gluQuadricDrawStyle( quadObject, drawStyle );
}
/***********************************************************************
* gluQuadricOrientation (GLU32.@)
*/
int WINAPI wine_gluQuadricOrientation(void *arg0,int arg1) {
return p_gluQuadricOrientation(arg0,arg1);
void WINAPI wine_gluQuadricOrientation( GLUquadric *quadObject, GLenum orientation )
{
p_gluQuadricOrientation( quadObject, orientation );
}
/***********************************************************************
* gluQuadricNormals (GLU32.@)
*/
int WINAPI wine_gluQuadricNormals(void *arg0,int arg1) {
return p_gluQuadricNormals(arg0,arg1);
void WINAPI wine_gluQuadricNormals( GLUquadric *quadObject, GLenum normals )
{
p_gluQuadricNormals( quadObject, normals );
}
/***********************************************************************
* gluQuadricTexture (GLU32.@)
*/
int WINAPI wine_gluQuadricTexture(void *arg0,int arg1) {
return p_gluQuadricTexture(arg0,arg1);
void WINAPI wine_gluQuadricTexture( GLUquadric *quadObject, GLboolean textureCoords )
{
p_gluQuadricTexture( quadObject, textureCoords );
}
/***********************************************************************
* gluQuadricCallback (GLU32.@)
*/
int WINAPI wine_gluQuadricCallback(void *arg0,int arg1,void *arg2) {
return p_gluQuadricCallback(arg0,arg1,arg2);
void WINAPI wine_gluQuadricCallback( GLUquadric *qobj, GLenum which, void (CALLBACK *fn)(void) )
{
/* FIXME: callback calling convention */
p_gluQuadricCallback( qobj, which, (_GLUfuncptr)fn );
}
/***********************************************************************
* gluCylinder (GLU32.@)
*/
int WINAPI wine_gluCylinder(void *arg0,double arg1,double arg2,double arg3,int arg4,int arg5) {
return p_gluCylinder(arg0,arg1,arg2,arg3,arg4,arg5);
void WINAPI wine_gluCylinder( GLUquadric *qobj, GLdouble baseRadius, GLdouble topRadius,
GLdouble height, GLint slices, GLint stacks )
{
p_gluCylinder( qobj, baseRadius, topRadius, height, slices, stacks );
}
/***********************************************************************
* gluSphere (GLU32.@)
*/
int WINAPI wine_gluSphere(void *arg0,double arg1,int arg2,int arg3) {
return p_gluSphere(arg0,arg1,arg2,arg3);
void WINAPI wine_gluSphere( GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks )
{
p_gluSphere( qobj, radius, slices, stacks );
}
/***********************************************************************
* gluDisk (GLU32.@)
*/
int WINAPI wine_gluDisk(void *arg0,double arg1,double arg2,int arg3,int arg4) {
return p_gluDisk(arg0,arg1,arg2,arg3,arg4);
void WINAPI wine_gluDisk( GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius,
GLint slices, GLint loops )
{
p_gluDisk( qobj, innerRadius, outerRadius, slices, loops );
}
/***********************************************************************
* gluPartialDisk (GLU32.@)
*/
int WINAPI wine_gluPartialDisk(void *arg0,double arg1,double arg2,int arg3,int arg4,double arg5,double arg6) {
return p_gluPartialDisk(arg0,arg1,arg2,arg3,arg4,arg5,arg6);
void WINAPI wine_gluPartialDisk( GLUquadric *qobj, GLdouble innerRadius, GLdouble outerRadius,
GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle )
{
p_gluPartialDisk( qobj, innerRadius, outerRadius, slices, loops, startAngle, sweepAngle );
}
/***********************************************************************
* gluNewNurbsRenderer (GLU32.@)
*/
int WINAPI wine_gluNewNurbsRenderer(void) {
return p_gluNewNurbsRenderer();
GLUnurbs * WINAPI wine_gluNewNurbsRenderer(void)
{
return p_gluNewNurbsRenderer();
}
/***********************************************************************
* gluDeleteNurbsRenderer (GLU32.@)
*/
int WINAPI wine_gluDeleteNurbsRenderer(void *arg0) {
return p_gluDeleteNurbsRenderer(arg0);
void WINAPI wine_gluDeleteNurbsRenderer( GLUnurbs *nobj )
{
p_gluDeleteNurbsRenderer( nobj );
}
/***********************************************************************
* gluLoadSamplingMatrices (GLU32.@)
*/
int WINAPI wine_gluLoadSamplingMatrices(void *arg0,void *arg1,void *arg2,void *arg3) {
return p_gluLoadSamplingMatrices(arg0,arg1,arg2,arg3);
void WINAPI wine_gluLoadSamplingMatrices( GLUnurbs *nobj, const GLfloat modelMatrix[16],
const GLfloat projMatrix[16], const GLint viewport[4] )
{
p_gluLoadSamplingMatrices( nobj, modelMatrix, projMatrix, viewport );
}
/***********************************************************************
* gluNurbsProperty (GLU32.@)
*/
int WINAPI wine_gluNurbsProperty(void *arg0,int arg1,int arg2) {
return p_gluNurbsProperty(arg0,arg1,arg2);
void WINAPI wine_gluNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat value )
{
p_gluNurbsProperty( nobj, property, value );
}
/***********************************************************************
* gluGetNurbsProperty (GLU32.@)
*/
int WINAPI wine_gluGetNurbsProperty(void *arg0,int arg1,void *arg2) {
return p_gluGetNurbsProperty(arg0,arg1,arg2);
void WINAPI wine_gluGetNurbsProperty( GLUnurbs *nobj, GLenum property, GLfloat *value )
{
p_gluGetNurbsProperty( nobj, property, value );
}
/***********************************************************************
* gluBeginCurve (GLU32.@)
*/
int WINAPI wine_gluBeginCurve(void *arg0) {
return p_gluBeginCurve(arg0);
void WINAPI wine_gluBeginCurve( GLUnurbs *nobj )
{
p_gluBeginCurve( nobj );
}
/***********************************************************************
* gluEndCurve (GLU32.@)
*/
int WINAPI wine_gluEndCurve(void *arg0) {
return p_gluEndCurve(arg0);
void WINAPI wine_gluEndCurve( GLUnurbs *nobj )
{
p_gluEndCurve( nobj );
}
/***********************************************************************
* gluNurbsCurve (GLU32.@)
*/
int WINAPI wine_gluNurbsCurve(void *arg0,int arg1,void *arg2,int arg3,void *arg4,int arg5,int arg6) {
return p_gluNurbsCurve(arg0,arg1,arg2,arg3,arg4,arg5,arg6);
void WINAPI wine_gluNurbsCurve( GLUnurbs *nobj, GLint nknots, GLfloat *knot,
GLint stride, GLfloat *ctlarray, GLint order, GLenum type )
{
p_gluNurbsCurve( nobj, nknots, knot, stride, ctlarray, order, type );
}
/***********************************************************************
* gluBeginSurface (GLU32.@)
*/
int WINAPI wine_gluBeginSurface(void *arg0) {
return p_gluBeginSurface(arg0);
void WINAPI wine_gluBeginSurface( GLUnurbs *nobj )
{
p_gluBeginSurface( nobj );
}
/***********************************************************************
* gluEndSurface (GLU32.@)
*/
int WINAPI wine_gluEndSurface(void *arg0) {
return p_gluEndSurface(arg0);
void WINAPI wine_gluEndSurface( GLUnurbs *nobj )
{
p_gluEndSurface( nobj );
}
/***********************************************************************
* gluNurbsSurface (GLU32.@)
*/
int WINAPI wine_gluNurbsSurface(void *arg0,int arg1,void *arg2,int arg3,void *arg4,int arg5,int arg6,void *arg7,int arg8,int arg9,int arg10) {
return p_gluNurbsSurface(arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
void WINAPI wine_gluNurbsSurface( GLUnurbs *nobj, GLint sknot_count, float *sknot, GLint tknot_count,
GLfloat *tknot, GLint s_stride, GLint t_stride, GLfloat *ctlarray,
GLint sorder, GLint torder, GLenum type )
{
p_gluNurbsSurface( nobj, sknot_count, sknot, tknot_count, tknot,
s_stride, t_stride, ctlarray, sorder, torder, type );
}
/***********************************************************************
* gluBeginTrim (GLU32.@)
*/
int WINAPI wine_gluBeginTrim(void *arg0) {
return p_gluBeginTrim(arg0);
void WINAPI wine_gluBeginTrim( GLUnurbs *nobj )
{
p_gluBeginTrim( nobj );
}
/***********************************************************************
* gluEndTrim (GLU32.@)
*/
int WINAPI wine_gluEndTrim(void *arg0) {
return p_gluEndTrim(arg0);
void WINAPI wine_gluEndTrim( GLUnurbs *nobj )
{
p_gluEndTrim( nobj );
}
/***********************************************************************
* gluPwlCurve (GLU32.@)
*/
int WINAPI wine_gluPwlCurve(void *arg0,int arg1,void *arg2,int arg3,int arg4) {
return p_gluPwlCurve(arg0,arg1,arg2,arg3,arg4);
void WINAPI wine_gluPwlCurve( GLUnurbs *nobj, GLint count, GLfloat *array, GLint stride, GLenum type )
{
p_gluPwlCurve( nobj, count, array, stride, type );
}
/***********************************************************************
* gluNurbsCallback (GLU32.@)
*/
int WINAPI wine_gluNurbsCallback(void *arg0,int arg1,void *arg2) {
return p_gluNurbsCallback(arg0,arg1,arg2);
void WINAPI wine_gluNurbsCallback( GLUnurbs *nobj, GLenum which, void (CALLBACK *fn)(void) )
{
/* FIXME: callback calling convention */
p_gluNurbsCallback( nobj, which, (_GLUfuncptr)fn );
}
/***********************************************************************
* gluGetString (GLU32.@)
*/
int WINAPI wine_gluGetString(int arg0) {
return p_gluGetString(arg0);
const GLubyte * WINAPI wine_gluGetString( GLenum name )
{
return p_gluGetString( name );
}
/***********************************************************************
* gluCheckExtension (GLU32.@)
*/
int WINAPI
wine_gluCheckExtension( const char *extName, void *extString ) {
GLboolean WINAPI wine_gluCheckExtension( const GLubyte *extName, const GLubyte *extString )
{
return 0;
}
/***********************************************************************
* gluNewTess (GLU32.@)
*/
void * WINAPI wine_gluNewTess(void)
wine_GLUtesselator * WINAPI wine_gluNewTess(void)
{
void *tess;
wine_tess_t *ret;
wine_GLUtesselator *ret;
if((tess = p_gluNewTess()) == NULL)
return NULL;
@ -484,9 +547,8 @@ void * WINAPI wine_gluNewTess(void)
/***********************************************************************
* gluDeleteTess (GLU32.@)
*/
void WINAPI wine_gluDeleteTess(void *tess)
void WINAPI wine_gluDeleteTess( wine_GLUtesselator *wine_tess )
{
wine_tess_t *wine_tess = tess;
p_gluDeleteTess(wine_tess->tess);
HeapFree(GetProcessHeap(), 0, wine_tess);
return;
@ -495,9 +557,8 @@ void WINAPI wine_gluDeleteTess(void *tess)
/***********************************************************************
* gluTessBeginPolygon (GLU32.@)
*/
void WINAPI wine_gluTessBeginPolygon(void *tess, void *polygon_data)
void WINAPI wine_gluTessBeginPolygon( wine_GLUtesselator *wine_tess, void *polygon_data )
{
wine_tess_t *wine_tess = tess;
wine_tess->polygon_data = polygon_data;
p_gluTessBeginPolygon(wine_tess->tess, wine_tess);
@ -506,14 +567,13 @@ void WINAPI wine_gluTessBeginPolygon(void *tess, void *polygon_data)
/***********************************************************************
* gluTessEndPolygon (GLU32.@)
*/
void WINAPI wine_gluTessEndPolygon(void *tess)
void WINAPI wine_gluTessEndPolygon( wine_GLUtesselator *wine_tess )
{
wine_tess_t *wine_tess = tess;
p_gluTessEndPolygon(wine_tess->tess);
}
static void wine_glu_tess_begin_data(int type, wine_tess_t *wine_tess)
static void wine_glu_tess_begin_data(int type, wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_begin_data)
wine_tess->cb_tess_begin_data(type, wine_tess->polygon_data);
@ -521,7 +581,7 @@ static void wine_glu_tess_begin_data(int type, wine_tess_t *wine_tess)
wine_tess->cb_tess_begin(type);
}
static void wine_glu_tess_vertex_data(void *vertex_data, wine_tess_t *wine_tess)
static void wine_glu_tess_vertex_data(void *vertex_data, wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_vertex_data)
wine_tess->cb_tess_vertex_data(vertex_data, wine_tess->polygon_data);
@ -529,7 +589,7 @@ static void wine_glu_tess_vertex_data(void *vertex_data, wine_tess_t *wine_tess)
wine_tess->cb_tess_vertex(vertex_data);
}
static void wine_glu_tess_end_data(wine_tess_t *wine_tess)
static void wine_glu_tess_end_data(wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_end_data)
wine_tess->cb_tess_end_data(wine_tess->polygon_data);
@ -537,7 +597,7 @@ static void wine_glu_tess_end_data(wine_tess_t *wine_tess)
wine_tess->cb_tess_end();
}
static void wine_glu_tess_error_data(int error, wine_tess_t *wine_tess)
static void wine_glu_tess_error_data(int error, wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_error_data)
wine_tess->cb_tess_error_data(error, wine_tess->polygon_data);
@ -545,7 +605,7 @@ static void wine_glu_tess_error_data(int error, wine_tess_t *wine_tess)
wine_tess->cb_tess_error(error);
}
static void wine_glu_tess_edge_flag_data(int flag, wine_tess_t *wine_tess)
static void wine_glu_tess_edge_flag_data(int flag, wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_edge_flag_data)
wine_tess->cb_tess_edge_flag_data(flag, wine_tess->polygon_data);
@ -554,7 +614,7 @@ static void wine_glu_tess_edge_flag_data(int flag, wine_tess_t *wine_tess)
}
static void wine_glu_tess_combine_data(double *coords, void *vertex_data, float *weight, void **outData,
wine_tess_t *wine_tess)
wine_GLUtesselator *wine_tess)
{
if(wine_tess->cb_tess_combine_data)
wine_tess->cb_tess_combine_data(coords, vertex_data, weight, outData, wine_tess->polygon_data);
@ -566,144 +626,137 @@ static void wine_glu_tess_combine_data(double *coords, void *vertex_data, float
/***********************************************************************
* gluTessCallback (GLU32.@)
*/
void WINAPI wine_gluTessCallback(void *tess,int which,void *fn)
void WINAPI wine_gluTessCallback( wine_GLUtesselator *tess, GLenum which, void (CALLBACK *fn)(void))
{
wine_tess_t *wine_tess = tess;
void *new_fn;
switch(which) {
case GLU_TESS_BEGIN:
wine_tess->cb_tess_begin = fn;
fn = wine_glu_tess_begin_data;
tess->cb_tess_begin = (void *)fn;
new_fn = wine_glu_tess_begin_data;
which += 6;
break;
case GLU_TESS_VERTEX:
wine_tess->cb_tess_vertex = fn;
fn = wine_glu_tess_vertex_data;
tess->cb_tess_vertex = (void *)fn;
new_fn = wine_glu_tess_vertex_data;
which += 6;
break;
case GLU_TESS_END:
wine_tess->cb_tess_end = fn;
fn = wine_glu_tess_end_data;
tess->cb_tess_end = (void *)fn;
new_fn = wine_glu_tess_end_data;
which += 6;
break;
case GLU_TESS_ERROR:
wine_tess->cb_tess_error = fn;
fn = wine_glu_tess_error_data;
tess->cb_tess_error = (void *)fn;
new_fn = wine_glu_tess_error_data;
which += 6;
break;
case GLU_TESS_EDGE_FLAG:
wine_tess->cb_tess_edge_flag = fn;
fn = wine_glu_tess_edge_flag_data;
tess->cb_tess_edge_flag = (void *)fn;
new_fn = wine_glu_tess_edge_flag_data;
which += 6;
break;
case GLU_TESS_COMBINE:
wine_tess->cb_tess_combine = fn;
fn = wine_glu_tess_combine_data;
tess->cb_tess_combine = (void *)fn;
new_fn = wine_glu_tess_combine_data;
which += 6;
break;
case GLU_TESS_BEGIN_DATA:
wine_tess->cb_tess_begin_data = fn;
fn = wine_glu_tess_begin_data;
tess->cb_tess_begin_data = (void *)fn;
new_fn = wine_glu_tess_begin_data;
break;
case GLU_TESS_VERTEX_DATA:
wine_tess->cb_tess_vertex_data = fn;
fn = wine_glu_tess_vertex_data;
tess->cb_tess_vertex_data = (void *)fn;
new_fn = wine_glu_tess_vertex_data;
break;
case GLU_TESS_END_DATA:
wine_tess->cb_tess_end_data = fn;
fn = wine_glu_tess_end_data;
tess->cb_tess_end_data = (void *)fn;
new_fn = wine_glu_tess_end_data;
break;
case GLU_TESS_ERROR_DATA:
wine_tess->cb_tess_error_data = fn;
fn = wine_glu_tess_error_data;
tess->cb_tess_error_data = (void *)fn;
new_fn = wine_glu_tess_error_data;
break;
case GLU_TESS_EDGE_FLAG_DATA:
wine_tess->cb_tess_edge_flag_data = fn;
fn = wine_glu_tess_edge_flag_data;
tess->cb_tess_edge_flag_data = (void *)fn;
new_fn = wine_glu_tess_edge_flag_data;
break;
case GLU_TESS_COMBINE_DATA:
wine_tess->cb_tess_combine_data = fn;
fn = wine_glu_tess_combine_data;
tess->cb_tess_combine_data = (void *)fn;
new_fn = wine_glu_tess_combine_data;
break;
default:
ERR("Unknown callback %d\n", which);
break;
return;
}
p_gluTessCallback(wine_tess->tess, which, fn);
p_gluTessCallback(tess->tess, which, new_fn);
}
/***********************************************************************
* gluTessBeginContour (GLU32.@)
*/
void WINAPI wine_gluTessBeginContour(void *tess)
void WINAPI wine_gluTessBeginContour( wine_GLUtesselator *tess )
{
wine_tess_t *wine_tess = tess;
p_gluTessBeginContour(wine_tess->tess);
p_gluTessBeginContour(tess->tess);
}
/***********************************************************************
* gluTessEndContour (GLU32.@)
*/
void WINAPI wine_gluTessEndContour(void *tess)
void WINAPI wine_gluTessEndContour( wine_GLUtesselator *tess )
{
wine_tess_t *wine_tess = tess;
p_gluTessEndContour(wine_tess->tess);
p_gluTessEndContour(tess->tess);
}
/***********************************************************************
* gluTessVertex (GLU32.@)
*/
void WINAPI wine_gluTessVertex(void *tess,void *arg1,void *arg2)
void WINAPI wine_gluTessVertex( wine_GLUtesselator *tess, GLdouble coords[3], void *data )
{
wine_tess_t *wine_tess = tess;
p_gluTessVertex(wine_tess->tess, arg1, arg2);
p_gluTessVertex( tess->tess, coords, data );
}
/***********************************************************************
* gluTessProperty (GLU32.@)
*/
void WINAPI wine_gluTessProperty(void *tess, int arg1, double arg2)
void WINAPI wine_gluTessProperty( wine_GLUtesselator *tess, GLenum which, GLdouble value )
{
wine_tess_t *wine_tess = tess;
p_gluTessProperty(wine_tess->tess, arg1, arg2);
p_gluTessProperty( tess->tess, which, value );
}
/***********************************************************************
* gluTessNormal (GLU32.@)
*/
void WINAPI wine_gluTessNormal(void *tess, double arg1, double arg2, double arg3)
void WINAPI wine_gluTessNormal( wine_GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z )
{
wine_tess_t *wine_tess = tess;
p_gluTessNormal(wine_tess->tess, arg1, arg2, arg3);
p_gluTessNormal( tess->tess, x, y, z );
}
/***********************************************************************
* gluBeginPolygon (GLU32.@)
*/
void WINAPI wine_gluBeginPolygon(void *tess)
void WINAPI wine_gluBeginPolygon( wine_GLUtesselator *tess )
{
wine_tess_t *wine_tess = tess;
wine_tess->polygon_data = NULL;
p_gluTessBeginPolygon(wine_tess->tess, wine_tess);
p_gluTessBeginContour(wine_tess->tess);
tess->polygon_data = NULL;
p_gluTessBeginPolygon(tess->tess, tess);
p_gluTessBeginContour(tess->tess);
}
/***********************************************************************
* gluEndPolygon (GLU32.@)
*/
void WINAPI wine_gluEndPolygon(void *tess)
void WINAPI wine_gluEndPolygon( wine_GLUtesselator *tess )
{
wine_tess_t *wine_tess = tess;
p_gluTessEndContour(wine_tess->tess);
p_gluTessEndPolygon(wine_tess->tess);
p_gluTessEndContour(tess->tess);
p_gluTessEndPolygon(tess->tess);
}
/***********************************************************************
* gluNextContour (GLU32.@)
*/
void WINAPI wine_gluNextContour(void *tess, int arg1)
void WINAPI wine_gluNextContour( wine_GLUtesselator *tess, GLenum type )
{
wine_tess_t *wine_tess = tess;
p_gluTessEndContour(wine_tess->tess);
p_gluTessBeginContour(wine_tess->tess);
p_gluTessEndContour(tess->tess);
p_gluTessBeginContour(tess->tess);
}