importation des models
This commit is contained in:
1 parent
82385c833e
commit
2a4f53984c
2 files changed
+90
No files matched your search
@@ -0,0 +1,38 @@
|
||||
// SDL2 Model by aurelien.esnard@u-bordeaux.fr
|
||||
|
||||
#ifndef MODEL_H
|
||||
#define MODEL_H
|
||||
|
||||
#include <SDL.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct Env_t Env;
|
||||
|
||||
/* **************************************************************** */
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#define PRINT(STR, ...) do { SDL_Log(STR, ##__VA_ARGS__); } while(0)
|
||||
#define ERROR(STR, ...) do { SDL_Log(STR, ##__VA_ARGS__); exit(EXIT_FAILURE); } while(0)
|
||||
#else
|
||||
#define PRINT(STR, ...) do { printf(STR, ##__VA_ARGS__); } while(0)
|
||||
#define ERROR(STR, ...) do { fprintf(stderr, STR, ##__VA_ARGS__); exit(EXIT_FAILURE); } while(0)
|
||||
#endif
|
||||
|
||||
/* **************************************************************** */
|
||||
|
||||
#define APP_NAME "SDL2 Demo"
|
||||
#define SCREEN_WIDTH 600
|
||||
#define SCREEN_HEIGHT 600
|
||||
#define DELAY 100
|
||||
|
||||
/* **************************************************************** */
|
||||
|
||||
Env * init(SDL_Window* win, SDL_Renderer* ren, int argc, char* argv[]);
|
||||
void render(SDL_Window* win, SDL_Renderer* ren, Env * env);
|
||||
void clean(SDL_Window* win, SDL_Renderer* ren, Env * env);
|
||||
bool process(SDL_Window* win, SDL_Renderer* ren, Env * env, SDL_Event * e);
|
||||
|
||||
/* **************************************************************** */
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user