SDL
2.0
|
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "SDL_test.h"
#include "SDL_test_common.h"
Go to the source code of this file.
Functions | |
static void | quit (int rc) |
void | DrawOnViewport (SDL_Renderer *renderer, SDL_Rect viewport) |
void | loop () |
int | main (int argc, char *argv[]) |
Variables | |
static SDLTest_CommonState * | state |
SDL_Rect | viewport |
int | done |
int | j |
SDL_bool | use_target = SDL_FALSE |
void DrawOnViewport | ( | SDL_Renderer * | renderer, |
SDL_Rect | viewport | ||
) |
Definition at line 44 of file testviewport.c.
References SDL_Rect::h, rect, SDL_RenderClear, SDL_RenderDrawLine, SDL_RenderDrawPoint, SDL_RenderFillRect, SDL_RenderSetViewport, SDL_SetRenderDrawColor, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by loop().
void loop | ( | ) |
Definition at line 92 of file testviewport.c.
References done, DrawOnViewport(), SDL_Rect::h, i, j, NULL, SDLTest_CommonState::num_windows, SDLTest_CommonState::renderers, SDL_GetTicks(), SDL_Log, SDL_PollEvent, SDL_RenderCopy, SDL_RenderPresent, SDL_SetRenderTarget, SDLTest_CommonEvent(), SDLTest_CommonState::targets, use_target, SDL_Rect::w, SDLTest_CommonState::windows, SDL_Rect::x, and SDL_Rect::y.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 141 of file testviewport.c.
References done, i, j, loop(), SDLTest_CommonState::num_windows, quit(), renderer, SDLTest_CommonState::renderers, SDL_CreateTexture, SDL_Delay, SDL_GetTicks(), SDL_GetWindowSize, SDL_INIT_VIDEO, SDL_Log, SDL_PIXELFORMAT_RGBA8888, SDL_RenderClear, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_strcasecmp, SDL_TEXTUREACCESS_TARGET, SDL_TRUE, SDLTest_CommonArg(), SDLTest_CommonCreateState(), SDLTest_CommonInit(), SDLTest_CommonUsage(), SDLTest_CommonState::targets, use_target, and SDLTest_CommonState::windows.
|
static |
Definition at line 37 of file testviewport.c.
References SDLTest_CommonQuit().
Referenced by main().
int done |
Definition at line 29 of file testviewport.c.
int j |
Definition at line 29 of file testviewport.c.
|
static |
Definition at line 26 of file testviewport.c.
Definition at line 30 of file testviewport.c.
SDL_Rect viewport |
Definition at line 28 of file testviewport.c.
Referenced by Draw(), DrawComposite(), DrawLines(), DrawPoints(), DrawRects(), loop(), MoveSprites(), SDLTest_ScreenShot(), and UpdateLogicalSize().