From c53b7e5d38c24bce7ba55abf3060ffd012783086 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 27 Oct 2014 23:58:09 +0100 Subject: QtBiomeVisualiser: Switched caching to entire regions. This speeds up the rendering preparation for small zooms. --- Tools/QtBiomeVisualiser/BiomeView.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Tools/QtBiomeVisualiser/BiomeView.h') diff --git a/Tools/QtBiomeVisualiser/BiomeView.h b/Tools/QtBiomeVisualiser/BiomeView.h index 40d8b96ae..9901b8f24 100644 --- a/Tools/QtBiomeVisualiser/BiomeView.h +++ b/Tools/QtBiomeVisualiser/BiomeView.h @@ -2,7 +2,7 @@ #include #include -#include "ChunkCache.h" +#include "RegionCache.h" #include "ChunkSource.h" @@ -51,8 +51,8 @@ public slots: /** Redraw the entire widget area. */ void redraw(); - /** A specified chunk has become available, redraw it. */ - void chunkAvailable(int a_ChunkX, int a_ChunkZ); + /** A specified region has become available, redraw it. */ + void regionAvailable(int a_RegionX, int a_RegionZ); /** Reloads the current chunk source and redraws the entire workspace. */ void reload(); @@ -62,7 +62,7 @@ protected: double m_Zoom; /** Cache for the loaded chunk data. */ - ChunkCache m_Cache; + RegionCache m_Cache; /** The entire view's contents in an offscreen image. */ QImage m_Image; -- cgit v1.2.3 From bea2edb2a9b3b3db6fd734f4e53a4d60eebc3272 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 28 Oct 2014 20:52:04 +0100 Subject: QtBiomeVisualiser: Reduced memory usage. --- Tools/QtBiomeVisualiser/BiomeView.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Tools/QtBiomeVisualiser/BiomeView.h') diff --git a/Tools/QtBiomeVisualiser/BiomeView.h b/Tools/QtBiomeVisualiser/BiomeView.h index 9901b8f24..cd9c7ead9 100644 --- a/Tools/QtBiomeVisualiser/BiomeView.h +++ b/Tools/QtBiomeVisualiser/BiomeView.h @@ -79,6 +79,9 @@ protected: /** Data used for rendering a chunk that hasn't been loaded yet */ uchar m_EmptyChunkImage[16 * 16 * 4]; + /** Data placeholder for chunks that aren't valid. */ + short m_EmptyChunkBiomes[16 * 16]; + /** Draws the specified chunk into m_Image */ void drawChunk(int a_ChunkX, int a_ChunkZ); -- cgit v1.2.3