SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | MOOSEPIC_W 64 |
#define | MOOSEPIC_H 88 |
#define | MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) |
#define | MOOSEFRAMES_COUNT 10 |
Functions | |
static void | quit (int rc) |
void | RGBtoYUV (Uint8 *rgb, int *yuv, int monochrome, int luminance) |
void | ConvertRGBtoYV12 (Uint8 *rgb, Uint8 *out, int w, int h, int monochrome, int luminance) |
void | ConvertRGBtoNV12 (Uint8 *rgb, Uint8 *out, int w, int h, int monochrome, int luminance) |
static void | PrintUsage (char *argv0) |
void | loop () |
int | main (int argc, char **argv) |
Variables | |
SDL_Color | MooseColors [84] |
Uint8 | MooseFrame [MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE *2] |
SDL_Texture * | MooseTexture |
SDL_Rect | displayrect |
int | window_w |
int | window_h |
SDL_Window * | window |
SDL_Renderer * | renderer |
int | paused = 0 |
int | i |
SDL_bool | done = SDL_FALSE |
Uint32 | pixel_format = SDL_PIXELFORMAT_YV12 |
static int | fpsdelay |
#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) |
Definition at line 32 of file testoverlay2.c.
Referenced by main().
#define MOOSEFRAMES_COUNT 10 |
Definition at line 33 of file testoverlay2.c.
#define MOOSEPIC_H 88 |
Definition at line 30 of file testoverlay2.c.
Referenced by main().
#define MOOSEPIC_W 64 |
Definition at line 29 of file testoverlay2.c.
Definition at line 226 of file testoverlay2.c.
References RGBtoYUV().
Referenced by main().
Definition at line 202 of file testoverlay2.c.
References RGBtoYUV().
Referenced by main().
void loop | ( | ) |
Definition at line 266 of file testoverlay2.c.
References done, SDL_WindowEvent::event, fpsdelay, SDL_Rect::h, i, SDL_Event::key, SDL_KeyboardEvent::keysym, MooseFrame, MOOSEFRAMES_COUNT, MOOSEPIC_W, SDL_Event::motion, NULL, paused, pixel_format, SDL_BYTESPERPIXEL, SDL_Delay, SDL_KEYDOWN, SDL_MOUSEBUTTONDOWN, SDL_MOUSEMOTION, SDL_PollEvent, SDL_QUIT, SDL_RenderClear, SDL_RenderCopy, SDL_RenderPresent, SDL_RenderSetViewport, SDL_TRUE, SDL_UpdateTexture, SDL_WINDOWEVENT, SDL_WINDOWEVENT_RESIZED, SDLK_ESCAPE, SDLK_SPACE, SDL_MouseMotionEvent::state, SDL_Keysym::sym, SDL_Event::type, SDL_Rect::w, SDL_Event::window, window_h, window_w, SDL_Rect::x, and SDL_Rect::y.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 324 of file testoverlay2.c.
References SDL_Color::b, ConvertRGBtoNV12(), ConvertRGBtoYV12(), done, fpsdelay, frame, free, SDL_Color::g, SDL_Rect::h, i, j, loop(), malloc, MooseFrame, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT, MOOSEPIC_H, MOOSEPIC_W, NULL, pixel_format, PrintUsage(), quit(), SDL_Color::r, SDL_CreateRenderer, SDL_CreateTexture, SDL_CreateWindow, SDL_DestroyRenderer, SDL_EventState, SDL_GetError, SDL_IGNORE, SDL_Init, SDL_INIT_VIDEO, SDL_KEYUP, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_PIXELFORMAT_NV12, SDL_PIXELFORMAT_YV12, SDL_RWclose, SDL_RWFromFile, SDL_RWread, SDL_TEXTUREACCESS_STREAMING, SDL_WINDOW_RESIZABLE, SDL_WINDOWPOS_UNDEFINED, SDL_Rect::w, window, window_h, window_w, SDL_Rect::x, and SDL_Rect::y.
|
static |
|
static |
Definition at line 170 of file testoverlay2.c.
Referenced by ConvertRGBtoNV12(), and ConvertRGBtoYV12().
SDL_Rect displayrect |
Definition at line 144 of file testoverlay2.c.
Definition at line 151 of file testoverlay2.c.
|
static |
Definition at line 153 of file testoverlay2.c.
int i |
Definition at line 150 of file testoverlay2.c.
SDL_Color MooseColors[84] |
Definition at line 35 of file testoverlay2.c.
Uint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE *2] |
Definition at line 142 of file testoverlay2.c.
SDL_Texture* MooseTexture |
Definition at line 143 of file testoverlay2.c.
int paused = 0 |
Definition at line 149 of file testoverlay2.c.
Referenced by loop().
Uint32 pixel_format = SDL_PIXELFORMAT_YV12 |
Definition at line 152 of file testoverlay2.c.
Referenced by loop(), main(), and SDL_InitFormat().
SDL_Renderer* renderer |
Definition at line 148 of file testoverlay2.c.
Definition at line 147 of file testoverlay2.c.
Referenced by main().
int window_h |
Definition at line 146 of file testoverlay2.c.
Referenced by loop(), main(), MoveSprites(), and SDL_CreateRenderer().
int window_w |
Definition at line 145 of file testoverlay2.c.
Referenced by loop(), main(), MoveSprites(), and SDL_CreateRenderer().