Updated for API changes
authorSam Lantinga <slouken@libsdl.org>
Thu, 03 Feb 2011 02:42:50 -0800
changeset 5162e2b3f003e085
parent 5161 1bd1e62e648d
child 5163 d72793305335
Updated for API changes
test/automated/render/render.c
     1.1 --- a/test/automated/render/render.c	Thu Feb 03 01:30:28 2011 -0800
     1.2 +++ b/test/automated/render/render.c	Thu Feb 03 02:42:50 2011 -0800
     1.3 @@ -38,7 +38,6 @@
     1.4  static int render_hasTexAlpha (void);
     1.5  static int render_clearScreen (void);
     1.6  /* Testcases. */
     1.7 -static int render_testReadWrite (void);
     1.8  static int render_testPrimitives (void);
     1.9  static int render_testPrimitivesBlend (void);
    1.10  static int render_testBlit (void);
    1.11 @@ -230,7 +229,7 @@
    1.12           );
    1.13     if (face == NULL)
    1.14        return 0;
    1.15 -   tface = SDL_CreateTextureFromSurface(renderer, 0, face );
    1.16 +   tface = SDL_CreateTextureFromSurface(renderer, face);
    1.17     SDL_FreeSurface(face);
    1.18  
    1.19     return tface;
    1.20 @@ -347,31 +346,6 @@
    1.21  
    1.22  
    1.23  /**
    1.24 - * @brief Test reading and writing framebuffer
    1.25 - */
    1.26 -static int render_testReadWrite (void)
    1.27 -{
    1.28 -   int ret;
    1.29 -   SDL_Rect rect;
    1.30 -
    1.31 -   /* Write pixels. */
    1.32 -   rect.x = 0;
    1.33 -   rect.y = 0;
    1.34 -   rect.w = 80;
    1.35 -   rect.h = 60;
    1.36 -   ret = SDL_RenderWritePixels(renderer, &rect, SDL_PIXELFORMAT_RGB24, img_primitives.pixel_data, img_primitives.width*img_primitives.bytes_per_pixel );
    1.37 -   if (SDL_ATassert( "SDL_RenderWritePixels", ret==0) )
    1.38 -      return 1;
    1.39 -
    1.40 -   /* See if it's the same. */
    1.41 -   if (render_compare( "Read/write output not the same.", &img_primitives, ALLOWABLE_ERROR_OPAQUE ))
    1.42 -      return -1;
    1.43 -
    1.44 -   return 0;
    1.45 -}
    1.46 -
    1.47 -
    1.48 -/**
    1.49   * @brief Tests the SDL primitives for rendering.
    1.50   */
    1.51  static int render_testPrimitives (void)
    1.52 @@ -927,9 +901,6 @@
    1.53        SDL_ATprintVerbose( 1, "      Texture Alpha Mod supported\n" );
    1.54  
    1.55     /* Software surface blitting. */
    1.56 -   ret = render_testReadWrite();
    1.57 -   if (ret)
    1.58 -      return -1;
    1.59     ret = render_testPrimitives();
    1.60     if (ret)
    1.61        return -1;