Browse Source

Hide texture state members which are not used on ES.

Shaved eight bytes off total memory footprint, yay!
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
d772f51050
  1. 11
      src/Magnum/Implementation/TextureState.cpp
  2. 10
      src/Magnum/Implementation/TextureState.h

11
src/Magnum/Implementation/TextureState.cpp

@ -36,11 +36,18 @@
namespace Magnum { namespace Implementation {
TextureState::TextureState(Context& context, std::vector<std::string>& extensions): maxSize{}, max3DSize{}, maxArrayLayers{}, maxCubeMapSize{},
TextureState::TextureState(Context& context, std::vector<std::string>& extensions): maxSize{}, max3DSize{}, maxCubeMapSize{},
#ifndef MAGNUM_TARGET_GLES2
maxArrayLayers{},
#endif
#ifndef MAGNUM_TARGET_GLES
maxRectangleSize{}, maxBufferSize{},
#endif
maxTextureUnits(0), maxLodBias(0.0f), maxMaxAnisotropy(0.0f), currentTextureUnit(0)
maxTextureUnits(0),
#ifndef MAGNUM_TARGET_GLES
maxLodBias{0.0f},
#endif
maxMaxAnisotropy(0.0f), currentTextureUnit(0)
#ifndef MAGNUM_TARGET_GLES
, maxColorSamples(0), maxDepthSamples(0), maxIntegerSamples(0), bufferOffsetAlignment(0)
#endif

10
src/Magnum/Implementation/TextureState.h

@ -83,15 +83,19 @@ struct TextureState {
GLint maxSize,
max3DSize,
maxArrayLayers,
maxCubeMapSize;
#ifndef MAGNUM_TARGET_GLES2
GLint maxArrayLayers;
#endif
#ifndef MAGNUM_TARGET_GLES
GLint maxRectangleSize,
maxBufferSize;
#endif
GLint maxTextureUnits;
GLfloat maxLodBias,
maxMaxAnisotropy;
#ifndef MAGNUM_TARGET_GLES
GLfloat maxLodBias;
#endif
GLfloat maxMaxAnisotropy;
GLint currentTextureUnit;
#ifndef MAGNUM_TARGET_GLES
GLint maxColorSamples,

Loading…
Cancel
Save