diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 32e0e0041..fcf2b41f5 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1661,13 +1661,10 @@ Graphics::Stats Graphics::getStats() const double Graphics::getSystemLimit(SystemLimit limittype) const { - GLfloat limits[2]; - switch (limittype) { case Graphics::LIMIT_POINT_SIZE: - glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, limits); - return (double) limits[1]; + return (double) gl.getMaxPointSize(); case Graphics::LIMIT_TEXTURE_SIZE: return (double) gl.getMaxTextureSize(); case Graphics::LIMIT_MULTI_CANVAS: diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 42319a291..358633abf 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -289,6 +289,10 @@ void OpenGL::initMaxValues() maxRenderbufferSamples = 0; glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits); + + GLfloat limits[2]; + glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, limits); + maxPointSize = limits[1]; } void OpenGL::initMatrices() diff --git a/src/modules/graphics/opengl/OpenGL.h b/src/modules/graphics/opengl/OpenGL.h index 7ec940936..e4496fde4 100644 --- a/src/modules/graphics/opengl/OpenGL.h +++ b/src/modules/graphics/opengl/OpenGL.h @@ -377,6 +377,12 @@ public: **/ int getMaxTextureUnits() const; + /** + * Returns the maximum point size. + **/ + float getMaxPointSize() const; + + void updateTextureMemorySize(size_t oldsize, size_t newsize); /** @@ -408,6 +414,7 @@ private: int maxRenderTargets; int maxRenderbufferSamples; int maxTextureUnits; + float maxPointSize; Vendor vendor;