Browse Source

Platform: display max texture size in magnum-info.

pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
f16a607a6f
  1. 56
      src/Magnum/Platform/magnum-info.cpp

56
src/Magnum/Platform/magnum-info.cpp

@ -40,8 +40,16 @@
#include "Magnum/Extensions.h" #include "Magnum/Extensions.h"
#include "Magnum/Framebuffer.h" #include "Magnum/Framebuffer.h"
#include "Magnum/Mesh.h" #include "Magnum/Mesh.h"
#ifndef MAGNUM_TARGET_GLES
#include "Magnum/MultisampleTexture.h"
#include "Magnum/RectangleTexture.h"
#endif
#include "Magnum/Renderbuffer.h" #include "Magnum/Renderbuffer.h"
#include "Magnum/Shader.h" #include "Magnum/Shader.h"
#include "Magnum/Texture.h"
#ifndef MAGNUM_TARGET_GLES2
#include "Magnum/TextureArray.h"
#endif
#ifndef CORRADE_TARGET_NACL #ifndef CORRADE_TARGET_NACL
#include "Magnum/Platform/WindowlessGlxApplication.h" #include "Magnum/Platform/WindowlessGlxApplication.h"
#else #else
@ -252,6 +260,13 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_l(AbstractTexture::maxLodBias()) _l(AbstractTexture::maxLodBias())
#endif #endif
#ifndef MAGNUM_TARGET_GLES
_l(Texture1D::maxSize())
#endif
_l(Texture2D::maxSize())
#ifndef MAGNUM_TARGET_GLES2
_l(Texture3D::maxSize())
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(c->isExtensionSupported<Extensions::GL::ARB::blend_func_extended>()) { if(c->isExtensionSupported<Extensions::GL::ARB::blend_func_extended>()) {
@ -337,11 +352,30 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
_l(Shader::maxTessellationEvaluationOutputComponents()) _l(Shader::maxTessellationEvaluationOutputComponents())
} }
if(c->isExtensionSupported<Extensions::GL::ARB::texture_buffer_object>()) {
_h(ARB::texture_buffer_object)
_l(BufferTexture::maxSize())
}
if(c->isExtensionSupported<Extensions::GL::ARB::texture_buffer_range>()) { if(c->isExtensionSupported<Extensions::GL::ARB::texture_buffer_range>()) {
_h(ARB::texture_buffer_range) _h(ARB::texture_buffer_range)
_l(BufferTexture::offsetAlignment()) _l(BufferTexture::offsetAlignment())
} }
if(c->isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) {
_h(ARB::texture_multisample)
_l(MultisampleTexture2D::maxSize())
_l(MultisampleTexture2DArray::maxSize())
}
if(c->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>()) {
_h(ARB::texture_rectangle)
_l(RectangleTexture::maxSize())
}
#endif #endif
/** @todo Somehow sort the following into previous list for ES3 */ /** @todo Somehow sort the following into previous list for ES3 */
@ -387,6 +421,20 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
_l(AbstractShaderProgram::minTexelOffset()) _l(AbstractShaderProgram::minTexelOffset())
_l(AbstractShaderProgram::maxTexelOffset()) _l(AbstractShaderProgram::maxTexelOffset())
} }
#ifndef MAGNUM_TARGET_GLES
if(c->isExtensionSupported<Extensions::GL::EXT::texture_array>())
#endif
{
#ifndef MAGNUM_TARGET_GLES
_h(EXT::texture_array)
#endif
#ifndef MAGNUM_TARGET_GLES
_l(Texture1DArray::maxSize())
#endif
_l(Texture2DArray::maxSize())
}
#endif #endif
if(c->isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) { if(c->isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) {
@ -403,6 +451,14 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
_l(DebugMessage::maxMessageLength()) _l(DebugMessage::maxMessageLength())
} }
#ifdef MAGNUM_TARGET_GLES2
if(c->isExtensionSupported<Extensions::GL::OES::texture_3D>()) {
_h(OES::texture_3D)
_l(Texture3D::maxSize())
}
#endif
#undef _l #undef _l
#undef _h #undef _h
} }

Loading…
Cancel
Save