First commit of SDL_Perl-2.1.3
[sdlgit/SDL_perl.git] / t / opengl.t
1 #!/usr/bin/perl -w
2 #
3 # Copyright (C) 2003 Tels
4 # Copyright (C) 2004 David J. Goehrig
5 #
6 # basic testing of SDL::OpenGL
7
8 BEGIN {
9         unshift @INC, 'blib/lib','blib/arch';
10 }
11
12 use strict;
13 use SDL::Config;
14
15 use Test::More;
16
17 if ( SDL::Config->has('GL') && SDL::Config->has('GLU') ) {
18                 plan ( tests => 3 );
19 } else {
20         plan ( skip_all => 'OpenGL support not compiled' );
21 }
22
23 use_ok('SDL::OpenGL');
24
25 can_ok('main', qw/
26         glBegin
27         glClear
28         glClearColor
29         glColor
30         glCullFace
31         glEnable
32         glEnd
33         glEvalCoord1
34         glEvalCoord2
35         glEvalMesh2
36         glFrontFace
37         glFrustum 
38         glGet
39         glLight
40         glLoadIdentity
41         glMap1
42         glMap2
43         glMapGrid2
44         glMaterial
45         glMatrixMode
46         glPointSize
47         glPopMatrix
48         glPushMatrix
49         glRotate
50         glScale
51         glShadeModel
52         glTranslate
53         glVertex
54         glVertex
55         glViewport /);
56
57 can_ok('main',qw/
58         gluPerspective
59         gluBeginSurface
60         gluBeginTrim
61         gluEndSurface
62         gluEndTrim
63         gluNewNurbsRenderer 
64         gluNurbsCurve
65         gluNurbsProperty
66         gluNurbsSurface
67         gluPwlCurve /);