From 95bedac6ca8240e010bb9ff49168fdd4abde06e7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Sep 2016 13:14:14 +0200 Subject: [PATCH] - inlined FHardwareTexture::GetTexDimension. --- src/gl/textures/gl_hwtexture.cpp | 12 ------------ src/gl/textures/gl_hwtexture.h | 7 ++++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/gl/textures/gl_hwtexture.cpp b/src/gl/textures/gl_hwtexture.cpp index 73c4e7b36e..25dc989e70 100644 --- a/src/gl/textures/gl_hwtexture.cpp +++ b/src/gl/textures/gl_hwtexture.cpp @@ -64,18 +64,6 @@ extern int TexFormat[]; //=========================================================================== unsigned int FHardwareTexture::lastbound[FHardwareTexture::MAX_TEXTURES]; -//=========================================================================== -// -// STATIC - Gets the maximum size of hardware textures -// -//=========================================================================== -int FHardwareTexture::GetTexDimension(int value) -{ - if (value > gl.max_texturesize) return gl.max_texturesize; - return value; -} - - //=========================================================================== // // Quick'n dirty image rescaling. diff --git a/src/gl/textures/gl_hwtexture.h b/src/gl/textures/gl_hwtexture.h index 4c00af272c..96eff02643 100644 --- a/src/gl/textures/gl_hwtexture.h +++ b/src/gl/textures/gl_hwtexture.h @@ -10,6 +10,7 @@ #define DIRECT_PALETTE -2 #include "tarray.h" +#include "gl/system/gl_interface.h" class FCanvasTexture; class AActor; @@ -49,7 +50,11 @@ public: static unsigned int lastbound[MAX_TEXTURES]; - static int GetTexDimension(int value); + static int GetTexDimension(int value) + { + if (value > gl.max_texturesize) return gl.max_texturesize; + return value; + } static void InitGlobalState() { for (int i = 0; i < MAX_TEXTURES; i++) lastbound[i] = 0; }