Commit | Line | Data |
df4106bf |
1 | #!/usr/bin/perl -w |
df4106bf |
2 | use strict; |
3 | use SDL; |
4510df28 |
4 | use SDL::Surface; |
df4106bf |
5 | use SDL::Config; |
7fa192d4 |
6 | use Devel::Peek; |
4510df28 |
7 | use Data::Dumper; |
df4106bf |
8 | use Test::More; |
9 | |
218b5471 |
10 | plan ( tests => 7 ); |
df4106bf |
11 | |
12 | use_ok( 'SDL::Video' ); |
13 | |
14 | can_ok ('SDL::Video', qw/ |
15 | get_video_surface |
16 | get_video_info |
8a2411d0 |
17 | video_driver_name |
7dda1934 |
18 | list_modes |
218b5471 |
19 | video_mode_ok |
95f5be30 |
20 | /); |
21 | |
22 | #testing get_video_surface |
23 | SDL::Init(SDL_INIT_VIDEO); |
24 | |
25 | my $display = SDL::SetVideoMode(640,480,32, SDL_SWSURFACE ); |
26 | |
218b5471 |
27 | #diag('Testing SDL::Video'); |
95f5be30 |
28 | |
e4259ddb |
29 | isa_ok(SDL::Video::get_video_surface(), 'SDL::Surface', '[get_video_surface] Checking if we get a surface ref back'); |
30 | |
31 | isa_ok(SDL::Video::get_video_info(), 'SDL::VideoInfo', '[get_video_info] Checking if we get videoinfo ref back'); |
20f544ea |
32 | |
7fa192d4 |
33 | my $driver_name = SDL::Video::video_driver_name(); |
34 | |
e4259ddb |
35 | pass '[video_driver_name] This is your driver name: '.$driver_name; |
7fa192d4 |
36 | |
218b5471 |
37 | |
38 | |
39 | is( ref( SDL::Video::list_modes( $display->format , SDL_SWSURFACE )), 'ARRAY', '[list_modes] Returned an ARRAY! '); |
40 | |
41 | cmp_ok(SDL::Video::video_mode_ok( 100, 100, 16, SDL_SWSURFACE), '>=', 0, "[video_mode_ok] Checking if an integer was return"); |
7fa192d4 |
42 | |
bc1947c7 |
43 | pass "Are we still alive?"; |
44 | |
95f5be30 |
45 | =skip |
df4106bf |
46 | video_mode_ok |
47 | set_video_mode |
48 | update_rect |
49 | update_rects |
50 | flip |
51 | set_colors |
52 | set_palette |
53 | set_gamma |
54 | get_gamma_ramp |
55 | set_gmmma_ramp |
56 | map_RGB |
57 | map_RGBA |
58 | get_RGB |
59 | get_RGBA |
60 | create_RGB_surface_from |
61 | lock_surface |
62 | unlock_surface |
63 | convert_surface |
64 | display_format |
65 | display_format_alpha |
66 | load_BMP |
67 | save_BMP |
68 | set_color_key |
69 | set_alpha |
70 | set_clip_rect |
71 | get_clip_rect |
72 | blit_surface |
73 | fill_rect |
74 | GL_load_library |
75 | GL_get_proc_address |
76 | GL_get_attribute |
77 | GL_set_attribute |
78 | GL_swap_buffers |
79 | GL_attr |
df4106bf |
80 | lock_YUV_overlay |
81 | unlock_YUV_overlay |
82 | display_YUV_overlay |
df4106bf |
83 | /); |
84 | |