Browse Source

De-inline TextureState constructor/destructor.

It is heavier than it looks. Also fixed some includes in Implementation
subdir.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
17f0f7de39
  1. 1
      src/CMakeLists.txt
  2. 1
      src/Implementation/FramebufferState.h
  3. 2
      src/Implementation/ShaderProgramState.h
  4. 33
      src/Implementation/TextureState.cpp
  5. 5
      src/Implementation/TextureState.h

1
src/CMakeLists.txt

@ -66,6 +66,7 @@ set(Magnum_SRCS
Implementation/BufferState.cpp
Implementation/State.cpp
Implementation/TextureState.cpp
Trade/AbstractImageConverter.cpp
Trade/AbstractImporter.cpp

1
src/Implementation/FramebufferState.h

@ -26,6 +26,7 @@
#include "Math/Geometry/Rectangle.h"
#include "Magnum.h"
#include "OpenGL.h"
namespace Magnum { namespace Implementation {

2
src/Implementation/ShaderProgramState.h

@ -24,7 +24,7 @@
DEALINGS IN THE SOFTWARE.
*/
#include "Magnum.h"
#include "OpenGL.h"
namespace Magnum { namespace Implementation {

33
src/Implementation/TextureState.cpp

@ -0,0 +1,33 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#include "TextureState.h"
namespace Magnum { namespace Implementation {
TextureState::TextureState(): maxSupportedLayerCount(0), maxSupportedAnisotropy(0.0f), currentLayer(0) {}
TextureState::~TextureState() = default;
}}

5
src/Implementation/TextureState.h

@ -26,12 +26,13 @@
#include <vector>
#include "Magnum.h"
#include "OpenGL.h"
namespace Magnum { namespace Implementation {
struct TextureState {
inline TextureState(): maxSupportedLayerCount(0), maxSupportedAnisotropy(0.0f), currentLayer(0) {}
explicit TextureState();
~TextureState();
GLint maxSupportedLayerCount;
GLfloat maxSupportedAnisotropy;

Loading…
Cancel
Save