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