13 use_ok( 'SDL::Video' );
15 can_ok ('SDL::Video', qw/
27 #testing get_video_surface
28 SDL::Init(SDL_INIT_VIDEO);
30 my $display = SDL::SetVideoMode(640,480,32, SDL_SWSURFACE );
32 #diag('Testing SDL::Video');
34 isa_ok(SDL::Video::get_video_surface(), 'SDL::Surface', '[get_video_surface] Checking if we get a surface ref back');
36 isa_ok(SDL::Video::get_video_info(), 'SDL::VideoInfo', '[get_video_info] Checking if we get videoinfo ref back');
38 my $driver_name = SDL::Video::video_driver_name();
40 pass '[video_driver_name] This is your driver name: '.$driver_name;
44 is( ref( SDL::Video::list_modes( $display->format , SDL_SWSURFACE )), 'ARRAY', '[list_modes] Returned an ARRAY! ');
46 cmp_ok(SDL::Video::video_mode_ok( 100, 100, 16, SDL_SWSURFACE), '>=', 0, "[video_mode_ok] Checking if an integer was return");
48 isa_ok(SDL::Video::set_video_mode( 100, 100 ,16, SDL_SWSURFACE), 'SDL::Surface', '[set_video_more] Checking if we get a surface ref back');
52 #TODO: Write to surface and check inf pixel in that area got updated.
54 SDL::Video::update_rect($display, 0, 0, 0, 0);
56 #TODO: Write to surface and check inf pixel in that area got updated.
57 SDL::Video::update_rects($display, SDL::Rect->new(0, 10, 20, 20));
59 is( (SDL::Video::flip($display) == 0 || -1), 1, '[flip] returns 0 or -1' );
61 pass "Are we still alive?";
82 create_RGB_surface_from