Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3611:57823d017f02 | 3612:ce7d4942d18b |
---|---|
36 #define GAPI_RENDERER_DEBUG 1 | 36 #define GAPI_RENDERER_DEBUG 1 |
37 | 37 |
38 /* GAPI renderer implementation */ | 38 /* GAPI renderer implementation */ |
39 | 39 |
40 static SDL_Renderer *GAPI_CreateRenderer(SDL_Window * window, Uint32 flags); | 40 static SDL_Renderer *GAPI_CreateRenderer(SDL_Window * window, Uint32 flags); |
41 static int GAPI_RenderPoint(SDL_Renderer * renderer, int x, int y); | 41 static int GAPI_RenderDrawPoints(SDL_Renderer * renderer, |
42 static int GAPI_RenderLine(SDL_Renderer * renderer, int x1, int y1, | 42 const SDL_Point * points, int count); |
43 int x2, int y2); | 43 static int GAPI_RenderDrawLines(SDL_Renderer * renderer, |
44 static int GAPI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect); | 44 const SDL_Point * points, int count); |
45 static int GAPI_RenderDrawRects(SDL_Renderer * renderer, | |
46 const SDL_Rect ** rects, int count); | |
47 static int GAPI_RenderFillRects(SDL_Renderer * renderer, | |
48 const SDL_Rect ** rects, int count); | |
45 static int GAPI_RenderCopy(SDL_Renderer * renderer, | 49 static int GAPI_RenderCopy(SDL_Renderer * renderer, |
46 SDL_Texture * texture, | 50 SDL_Texture * texture, |
47 const SDL_Rect * srcrect, | 51 const SDL_Rect * srcrect, |
48 const SDL_Rect * dstrect); | 52 const SDL_Rect * dstrect); |
49 static void GAPI_RenderPresent(SDL_Renderer * renderer); | 53 static void GAPI_RenderPresent(SDL_Renderer * renderer); |
457 GAPI_DestroyRenderer(renderer); | 461 GAPI_DestroyRenderer(renderer); |
458 SDL_OutOfMemory(); | 462 SDL_OutOfMemory(); |
459 return NULL; | 463 return NULL; |
460 } | 464 } |
461 | 465 |
462 renderer->RenderPoint = GAPI_RenderPoint; | 466 renderer->RenderDrawPoints = GAPI_RenderDrawPoints; |
463 renderer->RenderLine = GAPI_RenderLine; | 467 renderer->RenderDrawLines = GAPI_RenderDrawLines; |
464 renderer->RenderFill = GAPI_RenderFill; | 468 renderer->RenderDrawRects = GAPI_RenderDrawRects; |
469 renderer->RenderFillRects = GAPI_RenderFillRects; | |
465 renderer->RenderCopy = GAPI_RenderCopy; | 470 renderer->RenderCopy = GAPI_RenderCopy; |
466 renderer->RenderPresent = GAPI_RenderPresent; | 471 renderer->RenderPresent = GAPI_RenderPresent; |
467 renderer->DestroyRenderer = GAPI_DestroyRenderer; | 472 renderer->DestroyRenderer = GAPI_DestroyRenderer; |
468 renderer->info.name = GAPI_RenderDriver.info.name; | 473 renderer->info.name = GAPI_RenderDriver.info.name; |
469 renderer->info.flags = 0; | 474 renderer->info.flags = 0; |
495 | 500 |
496 return renderer; | 501 return renderer; |
497 } | 502 } |
498 | 503 |
499 static int | 504 static int |
500 GAPI_RenderPoint(SDL_Renderer * renderer, int x, int y) | 505 GAPI_RenderDrawPoints(SDL_Renderer * renderer, |
501 { | 506 const SDL_Point * points, int count) |
502 //TODO implement | 507 { |
508 // TODO implement | |
509 SDL_Unsupported(); | |
503 return -1; | 510 return -1; |
504 } | 511 } |
505 | 512 |
506 static int | 513 static int |
507 GAPI_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2) | 514 GAPI_RenderDrawLines(SDL_Renderer * renderer, |
508 { | 515 const SDL_Point * points, int count) |
509 //TODO implement | 516 { |
510 return -11; | 517 // TODO implement |
518 SDL_Unsupported(); | |
519 return -1; | |
511 } | 520 } |
512 | 521 |
513 static int | 522 static int |
514 GAPI_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect) | 523 GAPI_RenderDrawRects(SDL_Renderer * renderer, |
515 { | 524 const SDL_Rect ** rects, int count) |
516 //TODO implement | 525 { |
526 // TODO implement | |
527 SDL_Unsupported(); | |
528 return -1; | |
529 } | |
530 | |
531 static int | |
532 GAPI_RenderFillRects(SDL_Renderer * renderer, | |
533 const SDL_Rect ** rects, int count) | |
534 { | |
535 // TODO implement | |
536 SDL_Unsupported(); | |
517 return -1; | 537 return -1; |
518 } | 538 } |
519 | 539 |
520 /* Video memory is very slow so lets optimize as much as possible */ | 540 /* Video memory is very slow so lets optimize as much as possible */ |
521 static void | 541 static void |