From 612a1b17ffae582f674833e2258e660f7ae951f2 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sat, 15 Oct 2016 17:59:27 -0700 Subject: [PATCH] Magic number removal --- libraries/gl/src/gl/TextureRecycler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/gl/src/gl/TextureRecycler.h b/libraries/gl/src/gl/TextureRecycler.h index b3e61fb67a..4175dfd201 100644 --- a/libraries/gl/src/gl/TextureRecycler.h +++ b/libraries/gl/src/gl/TextureRecycler.h @@ -15,6 +15,10 @@ #include +// GPU resources are typically buffered for one copy being used by the renderer, +// one copy in flight, and one copy being used by the receiver +#define GPU_RESOURCE_BUFFER_SIZE 3 + class TextureRecycler { public: TextureRecycler(bool useMipmaps) : _useMipmaps(useMipmaps) {} @@ -44,7 +48,7 @@ private: Queue _readyTextures; uvec2 _size{ 1920, 1080 }; bool _useMipmaps; - uint8_t _textureCount { 3 }; + uint8_t _textureCount { GPU_RESOURCE_BUFFER_SIZE }; }; #endif