From ae7e4deb2fff2677abccaf4b0e4eaa31d86f4a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 29 Mar 2015 18:18:06 -0700 Subject: [PATCH 1/2] 08-update: Fixed debug build. --- examples/08-update/update.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 0f962ea0b..4c021e23a 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -495,7 +495,10 @@ int _main_(int /*_argc*/, char** /*_argv*/) bgfx::destroyTexture(textureCube); bgfx::destroyIndexBuffer(ibh); bgfx::destroyVertexBuffer(vbh); - bgfx::destroyProgram(program3d); + if (bgfx::isValid(program3d) ) + { + bgfx::destroyProgram(program3d); + } bgfx::destroyProgram(programCmp); bgfx::destroyProgram(program); bgfx::destroyUniform(u_time); From d45e71aa1540d5ff337f9ff0df1317585285cf9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 29 Mar 2015 18:29:56 -0700 Subject: [PATCH 2/2] Fixed VS2015 warnings. --- examples/23-vectordisplay/vectordisplay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/23-vectordisplay/vectordisplay.cpp b/examples/23-vectordisplay/vectordisplay.cpp index 41ecbd7f2..7f603c15d 100644 --- a/examples/23-vectordisplay/vectordisplay.cpp +++ b/examples/23-vectordisplay/vectordisplay.cpp @@ -361,10 +361,10 @@ void VectorDisplay::endDraw() line->y0 = m_pendingPoints[i - 1].y; line->x1 = m_pendingPoints[i].x; line->y1 = m_pendingPoints[i].y; - line->a = atan2(line->y1 - line->y0, line->x1 - line->x0); // angle from positive x axis, increasing ccw, [-pi, pi] + line->a = atan2f(line->y1 - line->y0, line->x1 - line->x0); // angle from positive x axis, increasing ccw, [-pi, pi] line->sin_a = sinf(line->a); line->cos_a = cosf(line->a); - line->len = sqrt( (line->x1 - line->x0) * (line->x1 - line->x0) + (line->y1 - line->y0) * (line->y1 - line->y0) ); + line->len = sqrtf( (line->x1 - line->x0) * (line->x1 - line->x0) + (line->y1 - line->y0) * (line->y1 - line->y0) ); // figure out what connections we have line->has_prev = (!line->is_first