Mercurial > sdl-ios-xcode
diff test/automated/render/render.c @ 5143:e743b9c3f6d6
Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 31 Jan 2011 23:23:57 -0800 |
parents | 35afe807b51c |
children | 3e4086b3bcd2 |
line wrap: on
line diff
--- a/test/automated/render/render.c Mon Jan 31 22:53:45 2011 -0800 +++ b/test/automated/render/render.c Mon Jan 31 23:23:57 2011 -0800 @@ -190,24 +190,6 @@ ret = (mode != SDL_BLENDMODE_ADD); if (!render_isSupported(ret)) fail = 1; - ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_MOD ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode( &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_MOD); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_MASK ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode( &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_MASK); - if (!render_isSupported(ret)) - fail = 1; ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_NONE ); if (!render_isSupported(ret)) fail = 1; @@ -858,13 +840,6 @@ &img_blendNone, ALLOWABLE_ERROR_OPAQUE )) return -1; - /* Test Mask. */ - if (render_testBlitBlendMode( tface, SDL_BLENDMODE_MASK )) - return -1; - if (render_compare( "Blit blending output not the same (using SDL_BLENDMODE_MASK).", - &img_blendMask, ALLOWABLE_ERROR_OPAQUE )) - return -1; - /* Test Blend. */ if (render_testBlitBlendMode( tface, SDL_BLENDMODE_BLEND )) return -1; @@ -879,13 +854,6 @@ &img_blendAdd, ALLOWABLE_ERROR_BLENDED )) return -1; - /* Test Mod. */ - if (render_testBlitBlendMode( tface, SDL_BLENDMODE_MOD )) - return -1; - if (render_compare( "Blit blending output not the same (using SDL_BLENDMODE_MOD).", - &img_blendMod, ALLOWABLE_ERROR_BLENDED )) - return -1; - /* Clear surface. */ if (render_clearScreen()) return -1; @@ -906,10 +874,10 @@ /* Crazy blending mode magic. */ mode = (i/4*j/4) % 4; - if (mode==0) mode = SDL_BLENDMODE_MASK; + if (mode==0) mode = SDL_BLENDMODE_NONE; else if (mode==1) mode = SDL_BLENDMODE_BLEND; else if (mode==2) mode = SDL_BLENDMODE_ADD; - else if (mode==3) mode = SDL_BLENDMODE_MOD; + else if (mode==3) mode = SDL_BLENDMODE_NONE; ret = SDL_SetTextureBlendMode( tface, mode ); if (SDL_ATassert( "SDL_SetTextureBlendMode", ret == 0)) return -1;