Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added types for GLU and Tels Faster color function

  • Loading branch information...
commit 45f7368964390b1b6e48edfba3dfa4b0d6cc74ce 1 parent d67647d
Kartik Thakore kthakore authored
2  META.yml
... ... @@ -1,6 +1,6 @@
1 1 ---
2 2 name: SDL_Perl
3   -version: v2.2.1
  3 +version: v2.2.1.8
4 4 author:
5 5 - 'David J. Goehrig <DGOEHRIG@cpan.org>'
6 6 abstract: Simple DirectMedia Layer for Perl
9 lib/SDL/Color.pm
@@ -38,8 +38,10 @@ use SDL;
38 38 sub new {
39 39 my $proto = shift;
40 40 my $class = ref($proto) || $proto;
41   - my $self;
  41 + return bless \SDL::NewColor(@_), $class if (@_ == 3);
42 42
  43 + my $self;
  44 +
43 45 my (%options) = @_;
44 46
45 47 verify (%options, qw/ -color -surface -pixel -r -g -b /) if $SDL::DEBUG;
@@ -82,6 +84,11 @@ sub b {
82 84 SDL::ColorB($$self,@_);
83 85 }
84 86
  87 +sub rgb {
  88 + my $self = shift;
  89 + SDL::ColorRGB($$self,@_);
  90 +}
  91 +
85 92 sub pixel {
86 93 croak "SDL::Color::pixel requires an SDL::Surface"
87 94 unless !$SDL::DEBUG || $_[1]->isa("SDL::Surface");
55 src/OpenGL.xs
@@ -2734,5 +2734,60 @@ gluTessVertex ( tessobj, coords, vd )
2734 2734
2735 2735 #endif
2736 2736
  2737 +GLUquadric *
  2738 +gluNewQuadric ()
  2739 + CODE:
  2740 + RETVAL = gluNewQuadric ();
  2741 + OUTPUT:
  2742 + RETVAL
  2743 +
  2744 +void
  2745 +gluDeleteQuadric (quad)
  2746 + GLUquadric *quad
  2747 +
  2748 +void
  2749 +gluQuadricNormals ( quad, normal )
  2750 + GLUquadric *quad
  2751 + GLenum normal
  2752 +
  2753 +void
  2754 +gluQuadricTexture ( quad, texture )
  2755 + GLUquadric *quad
  2756 + GLboolean texture
  2757 +
  2758 +void
  2759 +gluCylinder ( quad, base, top, height, slices, stacks )
  2760 + GLUquadric *quad
  2761 + GLdouble base
  2762 + GLdouble top
  2763 + GLdouble height
  2764 + GLint slices
  2765 + GLint stacks
  2766 +
  2767 +void
  2768 +gluDisk ( quad, inner, outer, slices, loops )
  2769 + GLUquadric *quad
  2770 + GLdouble inner
  2771 + GLdouble outer
  2772 + GLint slices
  2773 + GLint loops
  2774 +
  2775 +void
  2776 +gluPartialDisk ( quad, inner, outer, slices, loops, start, sweep )
  2777 + GLUquadric *quad
  2778 + GLdouble inner
  2779 + GLdouble outer
  2780 + GLint slices
  2781 + GLint loops
  2782 + GLdouble start
  2783 + GLdouble sweep
  2784 +
  2785 +void
  2786 +gluSphere ( quad, radius, slices, stacks )
  2787 + GLUquadric *quad
  2788 + GLdouble radius
  2789 + GLint slices
  2790 + GLint stacks
  2791 +
2737 2792 #endif
2738 2793
15 src/SDL.xs
@@ -1323,6 +1323,21 @@ ColorB ( color, ... )
1323 1323 OUTPUT:
1324 1324 RETVAL
1325 1325
  1326 +
  1327 +void
  1328 +ColorRGB ( color, ... )
  1329 + SDL_Color *color
  1330 + PPCODE:
  1331 + if (items > 1 ) {
  1332 + color->r = SvIV(ST(1));
  1333 + color->g = SvIV(ST(2));
  1334 + color->b = SvIV(ST(3));
  1335 + }
  1336 + mXPUSHi( color->r );
  1337 + mXPUSHi( color->g );
  1338 + mXPUSHi( color->b );
  1339 + XSRETURN(3);
  1340 +
1326 1341 void
1327 1342 FreeColor ( color )
1328 1343 SDL_Color *color
2  typemap
@@ -52,6 +52,8 @@ GLbitfield T_IV
52 52 GLenum T_IV
53 53 ConsoleInformation * T_PTR
54 54 GLboolean T_U_CHAR
  55 +GLUquadric * T_PTR
  56 +GLdouble T_NV
55 57 GLUnurbsObj * T_PTR
56 58 GLUtesselator * T_PTR
57 59 GLuint T_UV

0 comments on commit 45f7368

Please sign in to comment.
Something went wrong with that request. Please try again.