22#define NUM_SPRITES 100
26#ifdef TEST_NATIVE_WINDOWS
27 &WindowsWindowFactory,
32#ifdef TEST_NATIVE_COCOA
103 position->
x += velocity->
x;
105 velocity->
x = -velocity->
x;
106 position->
x += velocity->
x;
108 position->
y += velocity->
y;
110 velocity->
y = -velocity->
y;
111 position->
y += velocity->
y;
156 SDL_Log(
"Creating native window for %s driver\n", driver);
213 switch (
event.type) {
215 switch (
event.window.event) {
#define SDL_RenderPresent
#define SDL_GetWindowSize
#define SDL_RenderGetViewport
#define SDL_CreateWindowFrom
#define SDL_GetCurrentVideoDriver
#define SDL_SetRenderDrawColor
#define SDL_CreateTextureFromSurface
#define SDL_CreateRenderer
#define SDL_LogSetPriority
#define SDL_SetWindowTitle
@ SDL_LOG_CATEGORY_APPLICATION
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
#define SDL_LoadBMP(file)
@ SDL_WINDOWEVENT_EXPOSED
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
EGLConfig void * native_window
EGLSurface EGLNativeWindowType * window
void *(* CreateNativeWindow)(int w, int h)
void(* DestroyNativeWindow)(void *window)
A rectangle, with the origin at the upper left (integer).
A collection of pixels used in software blitting.
The type used to identify a window.
static SDL_Renderer * renderer
int main(int argc, char *argv[])
SDL_Texture * LoadSprite(SDL_Renderer *renderer, char *file)
static void * native_window
static SDL_Rect * velocities
static SDL_Rect * positions
static NativeWindowFactory * factories[]
void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
static NativeWindowFactory * factory
static SDL_Texture * sprite