Mercurial > hg > dmlib
changeset 261:eb77496ab7b3
More work on the rendering test.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 10 Oct 2012 01:03:15 +0300 |
parents | 0aa8647c3dfc |
children | 9d015d32841a |
files | vptest.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/vptest.c Wed Oct 10 01:02:42 2012 +0300 +++ b/vptest.c Wed Oct 10 01:03:15 2012 +0300 @@ -200,9 +200,9 @@ SDL_Color fontcol = { 255, 155, 155, 0 }; SDL_Event event; TTF_Font *font = NULL; - int mouseX, mouseY, bx, by; + int mouseX, mouseY, bx, by, err; BOOL initSDL = FALSE, initTTF = FALSE, exitFlag; - DM3DLineSpriteModel *model; + DM3DVectorSpriteModel *model; dmVerbosity = 5; if (!dmArgsProcess(argc, argv, optList, optListN, @@ -268,9 +268,9 @@ dmError("Could not open resource file '%s'.\n", optBitmapFilename); goto error_exit; } - dmRead3DLineSpriteModel(res, &model); + err = dmRead3DVectorSpriteModel(res, &model); dmf_close(res); - + dmMsg(0, "Loaded, %d: %s\n", err, dmErrorStr(err)); if (optBenchmark) { @@ -382,7 +382,7 @@ // dm_matrix_rot_a(&mat, f*0.1, f*0.1, f*0.1); dm_matrix_rot_a(&mat, 0, 0, f*0.1); - dmDraw3DLineSpriteModel(screen, model, &pos, &mat, fbmap, lcol); + dmDraw3DVectorSpriteModel(screen, model, &pos, &mat, fbmap, lcol); #endif #if 0 @@ -390,7 +390,7 @@ dmClearSurface(screen2, 0); for (np = 1; np <= 5; np++) { - float n = ((float) np - 0.5f) / 5.0f; + float n = ((float) np - 0.5f) * np; dmScaledBlitSurface32to32TransparentGA(screen, -n, -n, screen->w + n*2.0f, screen->h + n*2.0f, screen2, 210 - np * 10 ); @@ -400,11 +400,11 @@ // dmRadialBlur(screen, 320, 240, 0.010); // dmRadialBlur(screen, 325, 245, 0.016); - dmDraw3DLineSpriteModel(screen, model, &pos, &mat, fbmap, lcol); + dmDraw3DVectorSpriteModel(screen, model, &pos, &mat, fbmap, lcol); for (np = 1; np <= 5; np++) { - float n = ((float) np - 0.5f) / 4.0f; + float n = ((float) np - 0.5f) / 2.0f; dmScaledBlitSurface32to32TransparentGA(screen, -n, -n, screen->w + n*2.0f, screen->h + n*2.0f, screen2, 210 - np * 10 );