Commit 0c56afc7 authored by Robert Menzel's avatar Robert Menzel
Browse files

Merge branch 'master' into refactorGLobjects

parents 69098a81 488c368e
...@@ -18,13 +18,6 @@ ...@@ -18,13 +18,6 @@
#include <cmath> #include <cmath>
#include <limits> #include <limits>
/*
* Swizzling has to be defined before the glm.hpp gets first included, no not forget
* this, you should never include glm yourself, but include always our ACGL/Math.hh!
*/
#define GLM_SWIZZL
#include <glm/glm.hpp>
namespace ACGL{ namespace ACGL{
namespace Math{ namespace Math{
namespace Functions{ namespace Functions{
......
...@@ -16,24 +16,11 @@ ...@@ -16,24 +16,11 @@
* *
* Swizzling has to be defined before the glm.hpp gets first included, no not forget * Swizzling has to be defined before the glm.hpp gets first included, no not forget
* this, you should never include glm yourself, but include always our ACGL/Math.hh! * this, you should never include glm yourself, but include always our ACGL/Math.hh!
*
* Pragmas: try to ignore warnings in GLM, so warnings can be activated for ACGL builds
* and the log does not get flooded with GLM warnings that we can't fix anyway with the
* risk of not seeing ACGL warnings.
*/ */
#if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4))
# pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wtype-limits"
#define GLM_SWIZZL
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/ext.hpp> #include <glm/ext.hpp>
#if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4))
# pragma GCC diagnostic pop
#endif
#include <ACGL/Math/Constants.hh> #include <ACGL/Math/Constants.hh>
#include <ACGL/Math/Functions.hh> #include <ACGL/Math/Functions.hh>
......
...@@ -9,12 +9,15 @@ ...@@ -9,12 +9,15 @@
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/Controller/TextureDataControlFile.hh> #include <ACGL/OpenGL/Controller/TextureDataControlFile.hh>
#include <ACGL/OpenGL/InitStaticFileTypes.hh>
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class TextureDataControlFileJPG : public TextureDataControlFile class TextureDataControlFileJPG : public TextureDataControlFile
{ {
friend void initStaticFileTypes(void);
// ========================================================================================================= \/ // ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
...@@ -38,6 +41,9 @@ private: ...@@ -38,6 +41,9 @@ private:
public: public:
static int_t getTypeID(void) { return sTypeID; } static int_t getTypeID(void) { return sTypeID; }
private:
static int_t registerType(void);
// =================================================================================================== \/ // =================================================================================================== \/
// ============================================================================================ FIELDS \/ // ============================================================================================ FIELDS \/
// =================================================================================================== \/ // =================================================================================================== \/
......
...@@ -9,12 +9,15 @@ ...@@ -9,12 +9,15 @@
#include <ACGL/ACGL.hh> #include <ACGL/ACGL.hh>
#include <ACGL/OpenGL/Controller/TextureDataControlFile.hh> #include <ACGL/OpenGL/Controller/TextureDataControlFile.hh>
#include <ACGL/OpenGL/InitStaticFileTypes.hh>
namespace ACGL{ namespace ACGL{
namespace OpenGL{ namespace OpenGL{
class TextureDataControlFilePNG : public TextureDataControlFile class TextureDataControlFilePNG : public TextureDataControlFile
{ {
friend void initStaticFileTypes(void);
// ========================================================================================================= \/ // ========================================================================================================= \/
// ============================================================================================ CONSTRUCTORS \/ // ============================================================================================ CONSTRUCTORS \/
// ========================================================================================================= \/ // ========================================================================================================= \/
...@@ -38,6 +41,9 @@ private: ...@@ -38,6 +41,9 @@ private:
public: public:
static int_t getTypeID(void) { return sTypeID; } static int_t getTypeID(void) { return sTypeID; }
private:
static int_t registerType(void);
// =================================================================================================== \/ // =================================================================================================== \/
// ============================================================================================ FIELDS \/ // ============================================================================================ FIELDS \/
// =================================================================================================== \/ // =================================================================================================== \/
......
...@@ -39,4 +39,10 @@ bool TextureDataControlFileJPG::load(SharedTextureData& texture) const ...@@ -39,4 +39,10 @@ bool TextureDataControlFileJPG::load(SharedTextureData& texture) const
#endif // ACGL_COMPILE_WITH_QT #endif // ACGL_COMPILE_WITH_QT
} }
int_t TextureDataControlFileJPG::sTypeID = TextureDataControlFileFactory::the()->registerType("jpg", &TextureDataControlFileJPG::creator); int_t TextureDataControlFileJPG::registerType(void)
{
sTypeID = TextureDataControlFileFactory::the()->registerType("jpg", &TextureDataControlFileJPG::creator);
return sTypeID;
}
int_t TextureDataControlFileJPG::sTypeID = -1;
...@@ -39,4 +39,10 @@ bool TextureDataControlFilePNG::load(SharedTextureData& texture) const ...@@ -39,4 +39,10 @@ bool TextureDataControlFilePNG::load(SharedTextureData& texture) const
#endif #endif
} }
int_t TextureDataControlFilePNG::sTypeID = TextureDataControlFileFactory::the()->registerType("png", &TextureDataControlFilePNG::creator); int_t TextureDataControlFilePNG::registerType(void)
{
sTypeID = TextureDataControlFileFactory::the()->registerType("png", &TextureDataControlFilePNG::creator);
return sTypeID;
}
int_t TextureDataControlFilePNG::sTypeID = -1;
...@@ -12,7 +12,7 @@ using namespace ACGL::OpenGL; ...@@ -12,7 +12,7 @@ using namespace ACGL::OpenGL;
void ACGL::OpenGL::initStaticFileTypes(void) void ACGL::OpenGL::initStaticFileTypes(void)
{ {
ACGL::Utils::debug() << "TextureDataControlFileJPG type ID: " << TextureDataControlFileJPG::getTypeID() << std::endl; ACGL::Utils::debug() << "TextureDataControlFileJPG type ID: " << TextureDataControlFileJPG::registerType() << std::endl;
ACGL::Utils::debug() << "TextureDataControlFilePNG type ID: " << TextureDataControlFilePNG::getTypeID() << std::endl; ACGL::Utils::debug() << "TextureDataControlFilePNG type ID: " << TextureDataControlFilePNG::registerType() << std::endl;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment