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;
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");
#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
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