From 15206dc5a5843bd45e849eb0ec3734e34984ae7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 9 Apr 2015 17:36:36 -0700 Subject: [PATCH] Fixed matrix cache size. --- examples/17-drawstress/drawstress.cpp | 2 +- src/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/17-drawstress/drawstress.cpp b/examples/17-drawstress/drawstress.cpp index 947edfba..ba79c792 100644 --- a/examples/17-drawstress/drawstress.cpp +++ b/examples/17-drawstress/drawstress.cpp @@ -257,7 +257,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::reset(width, height, reset); const bgfx::Caps* caps = bgfx::getCaps(); - maxDim = (int32_t)powf(caps->maxDrawCalls, 1.0/3.0); + maxDim = (int32_t)powf(float(caps->maxDrawCalls), 1.0f/3.0f); // Enable debug text. bgfx::setDebug(debug); diff --git a/src/config.h b/src/config.h index 791f39a7..2a4ff3d2 100644 --- a/src/config.h +++ b/src/config.h @@ -168,7 +168,7 @@ #endif // BGFX_CONFIG_MAX_DRAW_CALLS #ifndef BGFX_CONFIG_MAX_MATRIX_CACHE -# define BGFX_CONFIG_MAX_MATRIX_CACHE (64<<10) +# define BGFX_CONFIG_MAX_MATRIX_CACHE (BGFX_CONFIG_MAX_DRAW_CALLS+1) #endif // BGFX_CONFIG_MAX_MATRIX_CACHE #ifndef BGFX_CONFIG_MAX_RECT_CACHE