From 2df0a41918ac60afbab3ff6f8e81d3f739f96018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Mon, 1 Nov 2021 08:43:22 -0700 Subject: [PATCH] 08-update: Added blit test. --- examples/08-update/update.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 1c43476c9..5ff34279a 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -424,6 +424,10 @@ public: m_texture2dData = (uint8_t*)malloc(kTexture2dSize*kTexture2dSize*4); + m_blitTestA = bgfx::createTexture2D(16, 16, false, 1, bgfx::TextureFormat::Enum::RGBA8, BGFX_TEXTURE_BLIT_DST); + m_blitTestB = bgfx::createTexture2D(16, 16, false, 1, bgfx::TextureFormat::Enum::RGBA8, BGFX_TEXTURE_BLIT_DST); + m_blitTestC = bgfx::createTexture2D(16, 16, false, 1, bgfx::TextureFormat::Enum::RGBA8, BGFX_TEXTURE_BLIT_DST); + m_rr = m_rng.gen()%255; m_gg = m_rng.gen()%255; m_bb = m_rng.gen()%255; @@ -449,6 +453,10 @@ public: // Cleanup. free(m_texture2dData); + bgfx::destroy(m_blitTestA); + bgfx::destroy(m_blitTestB); + bgfx::destroy(m_blitTestC); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) { bgfx::destroy(m_textures[ii]); @@ -461,7 +469,7 @@ public: bgfx::destroy(m_texture2d); - for (uint32_t ii = 0; ii