diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-23 17:56:23 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-23 17:56:23 +1000 |
commit | e758a60b100913fe7fa82e9751292781c0328a38 (patch) | |
tree | 7e95c7cde2d9246f98fb006e3683e407468ba9c2 /demos/modules/gwin/gl3d-spin/main.c | |
parent | 2b47a0708602b45b0b5db120a496bf92232aa4b1 (diff) | |
parent | 0c7c74112e07f612ea5a2da00a5962728225d41f (diff) | |
download | uGFX-e758a60b100913fe7fa82e9751292781c0328a38.tar.gz uGFX-e758a60b100913fe7fa82e9751292781c0328a38.tar.bz2 uGFX-e758a60b100913fe7fa82e9751292781c0328a38.zip |
Merge branch 'gdriver' into newmouse
Diffstat (limited to 'demos/modules/gwin/gl3d-spin/main.c')
-rw-r--r-- | demos/modules/gwin/gl3d-spin/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demos/modules/gwin/gl3d-spin/main.c b/demos/modules/gwin/gl3d-spin/main.c index 4a8b25e6..2b80994f 100644 --- a/demos/modules/gwin/gl3d-spin/main.c +++ b/demos/modules/gwin/gl3d-spin/main.c @@ -29,6 +29,9 @@ #include "gfx.h" +#define GL3D_WINDOW_SIZE 120 // Limits zbuffer size to program runs in 192k limit on STMF407 +#define FRAME_DELAY 20 // 20ms should be approx 50 frames per second less CPU overheads. + /* The handle for our Window */ GHandle gh; @@ -138,7 +141,7 @@ int main(void) { GWindowInit wi; gwinClearInit(&wi); - wi.show = TRUE; wi.x = 8; wi.y = 8; wi.width = gdispGetWidth()-16; wi.height = gdispGetHeight()-16; + wi.show = TRUE; wi.x = (gdispGetWidth()-GL3D_WINDOW_SIZE)/2; wi.y = (gdispGetHeight()-GL3D_WINDOW_SIZE)/2; wi.width = GL3D_WINDOW_SIZE; wi.height = GL3D_WINDOW_SIZE; gh = gwinGL3DCreate(0, &wi); } @@ -162,7 +165,7 @@ int main(void) { while(TRUE) { // rate control - gfxSleepMilliseconds(10); + gfxSleepMilliseconds(FRAME_DELAY); // move and redraw spin(); |