Browse Source

MSVC 2013 compatibility: fix memory corruption.

The quality of this compiler just reached a new low. Getting memory
corruption just because I didn't include the header which isn't needed
by any other compiler?!  What?!
Vladimír Vondruš 12 years ago
parent
commit
eb66de657b
  1. 6
      src/Magnum/Implementation/FramebufferState.h
  2. 6
      src/Magnum/Implementation/ShaderProgramState.h
  3. 10
      src/Magnum/Implementation/TextureState.h

6
src/Magnum/Implementation/FramebufferState.h

@ -34,6 +34,12 @@
#include "Magnum/RenderbufferFormat.h"
#endif
/* We did't get memory corruption like in e.g. TextureState here, but include
the header just to be sure */
#ifndef CORRADE_MSVC2013_COMPATIBILITY
#include "Magnum/Renderbuffer.h"
#endif
namespace Magnum { namespace Implementation {
struct FramebufferState {

6
src/Magnum/Implementation/ShaderProgramState.h

@ -31,6 +31,12 @@
#include "Magnum/Magnum.h"
#include "Magnum/OpenGL.h"
/* Otherwise we get a pretty nice memory corruption without any warning or
error whatsoever (!) */
#ifdef CORRADE_MSVC2013_COMPATIBILITY
#include "Magnum/AbstractShaderProgram.h"
#endif
namespace Magnum { namespace Implementation {
struct ShaderProgramState {

10
src/Magnum/Implementation/TextureState.h

@ -39,6 +39,16 @@
#include "Magnum/TextureFormat.h"
#endif
/* Otherwise we get a pretty nice memory corruption only with a warning about
architecture-dependent alignment of `setBufferImplementation` variable */
#ifdef CORRADE_MSVC2013_COMPATIBILITY
#ifndef MAGNUM_TARGET_GLES
#include "Magnum/BufferTexture.h"
#else
#include "Magnum/AbstractTexture.h"
#endif
#endif
namespace Magnum { namespace Implementation {
struct TextureState {

Loading…
Cancel
Save