Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added types for GLU and Tels Faster color function

  • Loading branch information...
commit 45f7368964390b1b6e48edfba3dfa4b0d6cc74ce 1 parent d67647d
@kthakore kthakore authored
View
2  META.yml
@@ -1,6 +1,6 @@
---
name: SDL_Perl
-version: v2.2.1
+version: v2.2.1.8
author:
- 'David J. Goehrig <DGOEHRIG@cpan.org>'
abstract: Simple DirectMedia Layer for Perl
View
9 lib/SDL/Color.pm
@@ -38,8 +38,10 @@ use SDL;
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
- my $self;
+ return bless \SDL::NewColor(@_), $class if (@_ == 3);
+ my $self;
+
my (%options) = @_;
verify (%options, qw/ -color -surface -pixel -r -g -b /) if $SDL::DEBUG;
@@ -82,6 +84,11 @@ sub b {
SDL::ColorB($$self,@_);
}
+sub rgb {
+ my $self = shift;
+ SDL::ColorRGB($$self,@_);
+}
+
sub pixel {
croak "SDL::Color::pixel requires an SDL::Surface"
unless !$SDL::DEBUG || $_[1]->isa("SDL::Surface");
View
55 src/OpenGL.xs
@@ -2734,5 +2734,60 @@ gluTessVertex ( tessobj, coords, vd )
#endif
+GLUquadric *
+gluNewQuadric ()
+ CODE:
+ RETVAL = gluNewQuadric ();
+ OUTPUT:
+ RETVAL
+
+void
+gluDeleteQuadric (quad)
+ GLUquadric *quad
+
+void
+gluQuadricNormals ( quad, normal )
+ GLUquadric *quad
+ GLenum normal
+
+void
+gluQuadricTexture ( quad, texture )
+ GLUquadric *quad
+ GLboolean texture
+
+void
+gluCylinder ( quad, base, top, height, slices, stacks )
+ GLUquadric *quad
+ GLdouble base
+ GLdouble top
+ GLdouble height
+ GLint slices
+ GLint stacks
+
+void
+gluDisk ( quad, inner, outer, slices, loops )
+ GLUquadric *quad
+ GLdouble inner
+ GLdouble outer
+ GLint slices
+ GLint loops
+
+void
+gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep )
+ GLUquadric *quad
+ GLdouble inner
+ GLdouble outer
+ GLint slices
+ GLint loops
+ GLdouble start
+ GLdouble sweep
+
+void
+gluSphere ( quad, radius, slices, stacks )
+ GLUquadric *quad
+ GLdouble radius
+ GLint slices
+ GLint stacks
+
#endif
View
15 src/SDL.xs
@@ -1323,6 +1323,21 @@ ColorB ( color, ... )
OUTPUT:
RETVAL
+
+void
+ColorRGB ( color, ... )
+ SDL_Color *color
+ PPCODE:
+ if (items > 1 ) {
+ color->r = SvIV(ST(1));
+ color->g = SvIV(ST(2));
+ color->b = SvIV(ST(3));
+ }
+ mXPUSHi( color->r );
+ mXPUSHi( color->g );
+ mXPUSHi( color->b );
+ XSRETURN(3);
+
void
FreeColor ( color )
SDL_Color *color
View
2  typemap
@@ -52,6 +52,8 @@ GLbitfield T_IV
GLenum T_IV
ConsoleInformation * T_PTR
GLboolean T_U_CHAR
+GLUquadric * T_PTR
+GLdouble T_NV
GLUnurbsObj * T_PTR
GLUtesselator * T_PTR
GLuint T_UV
Please sign in to comment.
Something went wrong with that request. Please try again.