20#include <emscripten/emscripten.h>
25#define NUM_OBJECTS 100
203 emscripten_cancel_main_loop();
225 for (
i = 1;
i < argc;) {
259 static const char *options[] = {
"[--blend none|blend|add|mod]",
"[--cyclecolor]",
"[--cyclealpha]",
NULL };
285 emscripten_set_main_loop(
loop, 0, 1);
299 double fps = ((double)
frames * 1000) / (now - then);
300 SDL_Log(
"%2.2f frames per second\n", fps);
SDL_BlendMode
The blend mode used in SDL_RenderCopy() and drawing operations.
#define SDL_RenderPresent
#define SDL_RenderGetViewport
#define SDL_RenderFillRect
#define SDL_SetRenderDrawColor
#define SDL_RenderDrawLine
#define SDL_SetRenderDrawBlendMode
#define SDL_RenderDrawPoint
#define SDL_LogSetPriority
@ SDL_LOG_CATEGORY_APPLICATION
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
GLfixed GLfixed GLfixed y2
GLuint GLfloat GLfloat GLfloat x1
void SDLTest_CommonQuit(SDLTest_CommonState *state)
Close test window.
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
void SDLTest_CommonLogUsage(SDLTest_CommonState *state, const char *argv0, const char **options)
Logs command line usage info.
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
EGLSurface EGLnsecsANDROID time
A rectangle, with the origin at the upper left (integer).
SDL_Renderer ** renderers
static SDL_Renderer * renderer
int main(int argc, char *argv[])
static int cycle_direction
void DrawRects(SDL_Renderer *renderer)
static SDL_BlendMode blendMode
static SDL_bool cycle_alpha
static SDL_bool cycle_color
void DrawLines(SDL_Renderer *renderer)
static SDLTest_CommonState * state
void DrawPoints(SDL_Renderer *renderer)