Broken OpenGL.xs
Kartik Thakore [Sun, 2 Aug 2009 14:06:57 +0000 (10:06 -0400)]
src/OpenGL.xs
t/opengl.t
typemap

index a04d63c..bb84322 100644 (file)
@@ -708,6 +708,12 @@ glGet ( param )
             croak("Unknown glGet parameter!");
         }
 
+const char * glGetString ( name )
+       GLenum name
+       CODE:
+               RETVAL = (const char *)glGetString (name);
+       OUTPUT:
+               RETVAL
 
 Uint32
 glIsEnabled ( cap )
@@ -2701,7 +2707,77 @@ gluTessVertex ( tessobj, coords, vd )
        CODE:
                gluTessVertex(tessobj,(GLdouble*)coords,vd);
        
-#endif
+
+
+GLUquadric *
+gluNewQuadric ()
+       CODE:
+               RETVAL = gluNewQuadric ();
+       OUTPUT:
+               RETVAL
+
+void
+gluDeleteQuadric (quad)
+       GLUquadric      *quad
+       CODE:
+               gluDeleteQuadric(quad);
+
+void
+gluQuadricNormals ( quad, normal )
+       GLUquadric *quad
+       GLenum  normal
+       CODE:
+               gluQuadricNormals(quad, normal);
+
+
+void
+gluQuadricTexture ( quad, texture )
+       GLUquadric *quad
+       GLboolean  texture
+       CODE:
+               gluQuadricTexture ( quad, texture );
+
+void
+gluCylinder ( quad, base, top, height, slices, stacks )
+       GLUquadric *quad
+       GLdouble  base
+       GLdouble  top
+       GLdouble  height
+       GLint  slices
+       GLint  stacks
+       CODE:
+               gluCylinder ( quad, base, top, height, slices, stacks );
+void
+gluDisk ( quad, inner, outer, slices, loops )
+       GLUquadric *quad
+       GLdouble inner
+       GLdouble outer
+       GLint slices
+       GLint loops
+       CODE:
+               gluDisk ( quad, inner, outer, slices, loops );  
+       
+void
+gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep )
+       GLUquadric *quad
+       GLdouble inner
+       GLdouble outer
+       GLint slices
+       GLint loops
+       GLdouble start
+       GLdouble sweep
+       
+       CODE:
+               gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep );
+
+void
+gluSphere ( quad, radius, slices, stacks )
+       GLUquadric *quad
+       GLdouble radius
+       GLint  slices
+       GLint  stacks
+       CODE:
+               gluSphere ( quad, radius, slices, stacks );
 
 #endif
 
index 58f7fcd..1c3eef6 100644 (file)
@@ -36,6 +36,7 @@ can_ok('main', qw/
        glFrontFace
        glFrustum 
        glGet
+       glGetString
        glLight
        glLoadIdentity
        glMap1
@@ -64,4 +65,12 @@ can_ok('main',qw/
        gluNurbsCurve
        gluNurbsProperty
        gluNurbsSurface
-       gluPwlCurve /);
+       gluPwlCurve
+       gluNewQuadric
+       gluDeleteQuadric
+       gluQuadricNormals
+       gluQuadricTexture
+       gluCylinder
+       gluDisk
+       gluPartialDisk
+       gluSphere /);
diff --git a/typemap b/typemap
index e970268..410e973 100644 (file)
--- a/typemap
+++ b/typemap
@@ -59,6 +59,8 @@ GLint*                        T_PTR
 float *                        T_PTR
 float                  T_NV
 GLfloat                        T_NV
+GLUquadric *           T_PTR
+GLdouble                       T_NV
 Sound_DecoderInfo *    T_PTR
 const Sound_DecoderInfo *      T_PTR
 Sound_Sample *         T_PTR