diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 18 | 
1 files changed, 9 insertions, 9 deletions
@@ -8,28 +8,27 @@  #include "extend/camera.h"  #define SCREEN_WIDTH 600 -#define SCREEN_HEIGHT 500 +#define SCREEN_HEIGHT 480  typedef void(*F)(void*); +  F onload;  F onupdate;  F onevent;  F ondraw; -/*macro这里需要绕一下弯*/  /*https://stackoverflow.com/questions/1489932/how-to-concatenate-twice-with-the-c-preprocessor-and-expand-a-macro-as-in-arg*/  #define SETEXAMPLEF(f, e) \ -f = f##_##e; +	f = f##_##e;  #define SETEXAMPLE(i) \ -SETEXAMPLEF(onload, i)\ -SETEXAMPLEF(ondraw, i)\ -SETEXAMPLEF(onevent, i)\ -SETEXAMPLEF(onupdate, i) +	SETEXAMPLEF(onload, i)\ +	SETEXAMPLEF(ondraw, i)\ +	SETEXAMPLEF(onevent, i)\ +	SETEXAMPLEF(onupdate, i)  int main(int argc, char* argv[]) { -	wog_Window* wnd = wog_createWindow("Soft Shader Room", SCREEN_WIDTH, SCREEN_HEIGHT, 500, 500, 0); -	wog_show(wnd); +	wog_Window* wnd = wog_createWindow("Soft Shade Room", SCREEN_WIDTH, SCREEN_HEIGHT, 500, 500, 0);  	wog_Surface* surface = wog_getsurface(wnd); // ARGB format  	/* init ssr */  	ssr_Config config = { @@ -40,6 +39,7 @@ int main(int argc, char* argv[]) {  	ssr_init(&config);  	SETEXAMPLE(EXAMPLECUR);  	onload(NULL); +	wog_show(wnd);  	/*set up global camera*/  	Camera cam;  	camera_init(&cam, wnd);  | 
