diff src/video/win32/SDL_gapirender.c @ 3612:ce7d4942d18b

I can't compile this, but it should be updated for the new rendering API now.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 06 Jan 2010 07:37:15 +0000
parents 83518f8fcd61
children 64ce267332c6
line wrap: on
line diff
--- a/src/video/win32/SDL_gapirender.c	Wed Jan 06 07:34:20 2010 +0000
+++ b/src/video/win32/SDL_gapirender.c	Wed Jan 06 07:37:15 2010 +0000
@@ -38,10 +38,14 @@
 /* GAPI renderer implementation */
 
 static SDL_Renderer *GAPI_CreateRenderer(SDL_Window * window, Uint32 flags);
-static int GAPI_RenderPoint(SDL_Renderer * renderer, int x, int y);
-static int GAPI_RenderLine(SDL_Renderer * renderer, int x1, int y1,
-                           int x2, int y2);
-static int GAPI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect);
+static int GAPI_RenderDrawPoints(SDL_Renderer * renderer,
+                                 const SDL_Point * points, int count);
+static int GAPI_RenderDrawLines(SDL_Renderer * renderer,
+                                const SDL_Point * points, int count);
+static int GAPI_RenderDrawRects(SDL_Renderer * renderer,
+                                const SDL_Rect ** rects, int count);
+static int GAPI_RenderFillRects(SDL_Renderer * renderer,
+                                const SDL_Rect ** rects, int count);
 static int GAPI_RenderCopy(SDL_Renderer * renderer,
                            SDL_Texture * texture,
                            const SDL_Rect * srcrect,
@@ -459,9 +463,10 @@
         return NULL;
     }
 
-    renderer->RenderPoint = GAPI_RenderPoint;
-    renderer->RenderLine = GAPI_RenderLine;
-    renderer->RenderFill = GAPI_RenderFill;
+    renderer->RenderDrawPoints = GAPI_RenderDrawPoints;
+    renderer->RenderDrawLines = GAPI_RenderDrawLines;
+    renderer->RenderDrawRects = GAPI_RenderDrawRects;
+    renderer->RenderFillRects = GAPI_RenderFillRects;
     renderer->RenderCopy = GAPI_RenderCopy;
     renderer->RenderPresent = GAPI_RenderPresent;
     renderer->DestroyRenderer = GAPI_DestroyRenderer;
@@ -497,23 +502,38 @@
 }
 
 static int
-GAPI_RenderPoint(SDL_Renderer * renderer, int x, int y)
+GAPI_RenderDrawPoints(SDL_Renderer * renderer,
+                      const SDL_Point * points, int count)
 {
-    //TODO implement
+    // TODO implement
+    SDL_Unsupported();
     return -1;
 }
 
 static int
-GAPI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
+GAPI_RenderDrawLines(SDL_Renderer * renderer,
+                     const SDL_Point * points, int count)
 {
-    //TODO implement
-    return -11;
+    // TODO implement
+    SDL_Unsupported();
+    return -1;
 }
 
 static int
-GAPI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
+GAPI_RenderDrawRects(SDL_Renderer * renderer,
+                     const SDL_Rect ** rects, int count)
 {
-    //TODO implement
+    // TODO implement
+    SDL_Unsupported();
+    return -1;
+}
+
+static int
+GAPI_RenderFillRects(SDL_Renderer * renderer,
+                     const SDL_Rect ** rects, int count)
+{
+    // TODO implement
+    SDL_Unsupported();
     return -1;
 }