Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

I can't compile this, but it should be updated for the new rendering …

…API now.
  • Loading branch information
slouken committed Jan 6, 2010
1 parent 6f63a0e commit 7b7e27d6c4fd952dafb83f415e97888e59d07d79
Showing with 34 additions and 14 deletions.
  1. +34 −14 src/video/win32/SDL_gapirender.c
@@ -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 @@ GAPI_CreateRenderer(SDL_Window * window, Uint32 flags)
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 @@ GAPI_CreateRenderer(SDL_Window * window, Uint32 flags)
}

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_RenderDrawRects(SDL_Renderer * renderer,
const SDL_Rect ** rects, int count)
{
// TODO implement
SDL_Unsupported();
return -1;
}

static int
GAPI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
GAPI_RenderFillRects(SDL_Renderer * renderer,
const SDL_Rect ** rects, int count)
{
//TODO implement
// TODO implement
SDL_Unsupported();
return -1;
}

0 comments on commit 7b7e27d

Please sign in to comment.