Move display format and display format alpha out of Surface.xs
[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 # Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
7 #
8 # ------------------------------------------------------------------------------
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License, or (at your option) any later version.
14
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Lesser General Public License for more details.
19
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 #
24 # ------------------------------------------------------------------------------
25 #
26 # Please feel free to send questions, suggestions or improvements to:
27 #
28 #       David J. Goehrig
29 #       dgoehrig\@cpan.org
30 #
31 #
32 # basic testing of SDL::OpenGL
33
34 BEGIN {
35         unshift @INC, 'blib/lib','blib/arch';
36 }
37
38 use strict;
39 use SDL::Config;
40
41 use Test::More;
42
43 if ( SDL::Config->has('GL') && SDL::Config->has('GLU') ) {
44                 plan ( tests => 3 );
45 } else {
46         plan ( skip_all => 'OpenGL support not compiled' );
47 }
48
49 use_ok('SDL::OpenGL');
50
51 can_ok('main', qw/
52         glBegin
53         glClear
54         glClearColor
55         glColor
56         glCullFace
57         glEnable
58         glEnd
59         glEvalCoord1
60         glEvalCoord2
61         glEvalMesh2
62         glFrontFace
63         glFrustum 
64         glGet
65         glLight
66         glLoadIdentity
67         glMap1
68         glMap2
69         glMapGrid2
70         glMaterial
71         glMatrixMode
72         glPointSize
73         glPopMatrix
74         glPushMatrix
75         glRotate
76         glScale
77         glShadeModel
78         glTranslate
79         glVertex
80         glVertex
81         glViewport /);
82
83 can_ok('main',qw/
84         gluPerspective
85         gluBeginSurface
86         gluBeginTrim
87         gluEndSurface
88         gluEndTrim
89         gluNewNurbsRenderer 
90         gluNurbsCurve
91         gluNurbsProperty
92         gluNurbsSurface
93         gluPwlCurve /);