### Header File

The header file may include additional information glu.hrl

### Exports

tessBeginPolygon(#tessPtr{ptr=Tobj})

Args: TessObject
Returns: ok
C-API: void gluTessBeginPolygon(GLUtesselator *tobj)

tessCallback(#tessPtr{ptr=Tobj}, Which, ESDL_TESSCB)

Args: Which, ESDL_TESSCB one of the callback functions defined in glu.hrl
Returns: ok
C-API: void gluTessCallback(GLUtesselator *tobj, GLenum which, void (GLCALLBACK *fn)())
Desc:
ESDL have some predefined functions which must be supplied as callbacks funcs, see glu.hrl. New callbacks may be defined in the future, input and or implementations are welcomed.

tessVertex(#tessPtr{ptr=Tobj}, {X,Y,Z})

Args: Tobj, Coords[, VtxData]
Returns: ok
C-API: void gluTessVertex(GLUtesselator *tobj, GLdouble coords[3], void *vertex_data)
Desc:
VtxData is a tuple-list of extra data supported types are [{normal, {X,Y,Z}}, {color, {R,G,B[,A]}}, {texcoord2, {U,V}}] Use ?ESDL_TESSCB_VERTEX_DATA callback to call apropriate gl functions on the extra data.

beginCurve(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluBeginCurve(GLUnurbs * nurb)

beginSurface(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluBeginSurface(GLUnurbs * nurb)

beginTrim(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluBeginTrim(GLUnurbs * nurb)

build1DMipmaps(Target, InternalFormat, Width, Format, Type, Data)

Args: Target, InternalFormat, Width, Format, Type, <<[Data]>>
Returns: ?GL_INT
C-API: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data)

build2DMipmaps(Target, InternalFormat, Width, Height, Format, Type, Data)

Args: Target, InternalFormat, Width, Height, Format, Type, <<[Data]>>
Returns: ?GL_INT
C-API: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data)

cylinder(Quad=#quadricPtr{}, Base, Top, Height, Slices, Stacks)

Args: Quad, Base, Top, Height, Slices, Stacks
Returns: ok
C-API: void gluCylinder(GLUquadric * quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks)

deleteNurbsRenderer(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluDeleteNurbsRenderer(GLUnurbs * nurb)

deleteQuadric(Quad=#quadricPtr{})

Args: Quad
Returns: ok
C-API: void gluDeleteQuadric(GLUquadric * quad)

deleteTess(Tess=#tessPtr{})

Args: Tess
Returns: ok
C-API: void gluDeleteTess(GLUtesselator * tess)

disk(Quad=#quadricPtr{}, Inner, Outer, Slices, Loops)

Args: Quad, Inner, Outer, Slices, Loops
Returns: ok
C-API: void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops)

endCurve(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluEndCurve(GLUnurbs * nurb)

endSurface(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluEndSurface(GLUnurbs * nurb)

endTrim(Nurb=#nurbsPtr{})

Args: Nurb
Returns: ok
C-API: void gluEndTrim(GLUnurbs * nurb)

errorString(Error)

Args: Error
Returns: [?GL_UNSIGNED_BYTE]
C-API: GLubyte* gluErrorString(GLenum error)

getNurbsProperty(Nurb=#nurbsPtr{}, Property)

Args: Nurb, Property
Returns: [Data]
C-API: void gluGetNurbsProperty(GLUnurbs * nurb, GLenum property, GLfloat * data)

getString(Name)

Args: Name
Returns: [?GL_UNSIGNED_BYTE]
C-API: GLubyte* gluGetString(GLenum name)

getTessProperty(Tess=#tessPtr{}, Which)

Args: Tess, Which
Returns: [Data]
C-API: void gluGetTessProperty(GLUtesselator * tess, GLenum which, GLdouble * data)

loadSamplingMatrices(Nurb=#nurbsPtr{}, Model, Perspective, View)

Args: Nurb, <<[Model]>>, <<[Perspective]>>, <<[View]>>
Returns: ok
C-API: void gluLoadSamplingMatrices(GLUnurbs * nurb, const GLfloat * model, const GLfloat * perspective, const GLint * view)

lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ)

Args: EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ
Returns: ok
C-API: void gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ)

newNurbsRenderer()

Returns: [NurbsPtr]
C-API: GLUnurbs* gluNewNurbsRenderer()

newQuadric()

Returns: [QuadricPtr]
C-API: GLUquadric* gluNewQuadric()

newTess()

Returns: [TessPtr]
C-API: GLUtesselator* gluNewTess()

nurbsCurve(Nurb=#nurbsPtr{}, KnotCount, Knots, Stride, Control, Order, Type)

Args: Nurb, KnotCount, <<[Knots]>>, Stride, <<[Control]>>, Order, Type
Returns: ok
C-API: void gluNurbsCurve(GLUnurbs * nurb, GLint knotCount, const GLfloat * knots, GLint stride, const GLfloat * control, GLint order, GLenum type)

nurbsProperty(Nurb=#nurbsPtr{}, Property, Value)

Args: Nurb, Property, Value
Returns: ok
C-API: void gluNurbsProperty(GLUnurbs * nurb, GLenum property, GLfloat value)

nurbsSurface(Nurb=#nurbsPtr{}, SKnotCount, SKnots, TKnotCount, TKnots, SStride, TStride, Control, SOrder, TOrder, Type)

Args: Nurb, SKnotCount, <<[SKnots]>>, TKnotCount, <<[TKnots]>>, SStride, TStride, <<[Control]>>, SOrder, TOrder, Type
Returns: ok
C-API: void gluNurbsSurface(GLUnurbs * nurb, GLint sKnotCount, const GLfloat * sKnots, GLint tKnotCount, const GLfloat * tKnots, GLint sStride, GLint tStride, const GLfloat * control, GLint sOrder, GLint tOrder, GLenum type)

ortho2D(Left, Right, Bottom, Top)

Args: Left, Right, Bottom, Top
Returns: ok
C-API: void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)

partialDisk(Quad=#quadricPtr{}, Inner, Outer, Slices, Loops, Start, Sweep)

Args: Quad, Inner, Outer, Slices, Loops, Start, Sweep
Returns: ok
C-API: void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep)

perspective(Fovy, Aspect, ZNear, ZFar)

Args: Fovy, Aspect, ZNear, ZFar
Returns: ok
C-API: void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)

pickMatrix(X, Y, DelX, DelY, Viewport)

Args: X, Y, DelX, DelY, <<[Viewport]>>
Returns: ok
C-API: void gluPickMatrix(GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, const GLint * viewport)

project(ObjX, ObjY, ObjZ, Model, Proj, View)

Args: ObjX, ObjY, ObjZ, <<[Model]>>, <<[Proj]>>, <<[View]>>
Returns: {WinX, WinY, WinZ} | error
C-API: GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ)

pwlCurve(Nurb=#nurbsPtr{}, Count, Data, Stride, Type)

Args: Nurb, Count, <<[Data]>>, Stride, Type
Returns: ok
C-API: void gluPwlCurve(GLUnurbs * nurb, GLint count, const GLfloat * data, GLint stride, GLenum type)

quadricDrawStyle(Quad=#quadricPtr{}, Draw)

Args: Quad, Draw
Returns: ok
C-API: void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw)

quadricNormals(Quad=#quadricPtr{}, Normal)

Args: Quad, Normal
Returns: ok
C-API: void gluQuadricNormals(GLUquadric * quad, GLenum normal)

quadricOrientation(Quad=#quadricPtr{}, Orientation)

Args: Quad, Orientation
Returns: ok
C-API: void gluQuadricOrientation(GLUquadric * quad, GLenum orientation)

quadricTexture(Quad=#quadricPtr{}, Texture)

Args: Quad, Texture
Returns: ok
C-API: void gluQuadricTexture(GLUquadric * quad, GLboolean texture)

scaleImage(Format, WIn, HIn, TypeIn, DataIn, WOut, HOut, TypeOut, #sdlmem{bin=DataOut})

Args: Format, WIn, HIn, TypeIn, <<[DataIn]>>, WOut, HOut, TypeOut, #sdlmem{} = DataOut
Returns: ?GL_INT
C-API: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut)

sphere(Quad=#quadricPtr{}, Radius, Slices, Stacks)

Args: Quad, Radius, Slices, Stacks
Returns: ok
C-API: void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks)

tessBeginContour(#tessPtr{ptr=Ptr})

Args: Tess
Returns: ok
C-API: void gluTessBeginContour(GLUtesselator * tess)

tessEndContour(#tessPtr{ptr=Ptr})

Args: Tess
Returns: ok
C-API: void gluTessEndContour(GLUtesselator * tess)

tessEndPolygon(#tessPtr{ptr=Ptr})

Args: Tess
Returns: ok
C-API: void gluTessEndPolygon(GLUtesselator * tess)

tessNormal(#tessPtr{ptr=Ptr}, ValueX, ValueY, ValueZ)

Args: Tess, ValueX, ValueY, ValueZ
Returns: ok
C-API: void gluTessNormal(GLUtesselator * tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ)

tessProperty(Tess=#tessPtr{}, Which, Data)

Args: Tess, Which, Data
Returns: ok
C-API: void gluTessProperty(GLUtesselator * tess, GLenum which, GLdouble data)

unProject(WinX, WinY, WinZ, Model, Proj, View)

Args: WinX, WinY, WinZ, <<[Model]>>, <<[Proj]>>, <<[View]>>
Returns: {ObjX, ObjY, ObjZ} | error
C-API: GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ)

triangulate(N, Ps)

Args: Normal [Vertices]
Returns: {[{TriIndex}], [VertexPos]}