Mercurial > hg > dmlib
changeset 23:f2f6963080bd
Add test for line drawing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 28 Sep 2012 15:15:41 +0300 |
parents | 997e26f17946 |
children | 372b68c0752a |
files | vptest.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/vptest.c Fri Sep 28 15:15:33 2012 +0300 +++ b/vptest.c Fri Sep 28 15:15:41 2012 +0300 @@ -206,6 +206,8 @@ SDL_WM_SetCaption("Halleluja", "DMT"); } + Uint32 lcol = dmMapRGB(screen, 255,255,255); + int numFrames = 0, startTime = SDL_GetTicks(), endTime = 0; exitFlag = FALSE; @@ -289,6 +291,10 @@ 128 + sin(f*0.1) * 120.0f); #endif + dmDrawLineAny(screen, 30, 30, 600 + 200 * sin(f), 250 , lcol, DMD_NONE); + dmDrawLineAny(screen, 20, 30, 100 , 250 + 100 * sin(f), lcol, DMD_NONE); + dmDrawLineAny(screen, 100, 100, 100 + cos(f) * 50, 100 + sin(f) * 50, lcol, DMD_NONE); + if (!optBenchmark) { dmDrawTTFText(screen, font, fontcol, 0, 0, "%3.1f FPS",