Skip to content

GLM Preprocessor Definitions to Project #8352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions libs/openFrameworks/3d/ofEasyCam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
#include "ofUtils.h"
#include "ofGraphicsBaseTypes.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtx/vector_angle.hpp>
#include <limits>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/3d/ofEasyCam.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ class ofEventListeners;
class ofEventArgs;
class ofRectangle;

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtc/quaternion.hpp>

/// \brief A super simple camera for interacting with objects in 3D space.
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/3d/ofNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
#include "ofNode.h"
#include "of3dGraphics.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat4x4.hpp>
#include "ofVectorMath.h"

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/app/ofWindowSettings.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#pragma once

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>

#include <string>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/events/ofEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
#include "ofTimerFps.h"
#include "ofConstants.h" // FS Only

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>

#include <set>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofCubeMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
#include "ofAppAndroidWindow.h"
#endif

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtx/transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <map>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofCubeMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

#include "ofShader.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat4x4.hpp>

class ofVboMesh;
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
#include "ofGLUtils.h"
#include "ofColor.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtc/quaternion.hpp>

#include <map>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
#include "ofImage.h"
#include "ofGLProgrammableRenderer.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>
#include <glm/gtx/transform.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
#include "ofMaterialBaseTypes.h"
#include "ofShader.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/fwd.hpp>
#include <glm/vec2.hpp>
#include <glm/mat4x4.hpp>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofShadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
// MARK: ofConstants Targets
#include "ofConstants.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtx/transform.hpp>
#include <glm/gtc/quaternion.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/gl/ofTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
// MARK: Targets, some can be moved to cpp, GLEW also
#include "ofConstants.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat4x4.hpp>
#include "ofGLUtils.h"

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/graphics/ofGraphicsBaseTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include "ofGraphicsBaseTypes.h"
#include "ofRectangle.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>
#include <glm/trigonometric.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/graphics/ofGraphicsBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ struct ofBoundingBox{
glm::vec3 max { 0, 0, 0 };
};

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat4x4.hpp>

/// \brief Contains general information about the style of ofGraphics
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofMatrix3x3.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@

#pragma once

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat3x3.hpp>

#include <iostream>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofMatrix4x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
#include "ofVec4f.h"
#include "ofQuaternion.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/mat4x4.hpp>

class ofVec3f;
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofQuaternion.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#include "ofQuaternion.h"
#include "ofMatrix4x4.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtc/quaternion.hpp>

//----------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofVec2f.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

#include <iostream>

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif

#include <glm/vec2.hpp>
#include <glm/fwd.hpp>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofVec3f.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
#include "ofVec2f.h"
#include "ofVec4f.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec3.hpp>

/// \brief ofVec3f is a class for storing a three dimensional vector.
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofVec4f.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
#include "ofVec3f.h"
#include "ofVec4f.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/math/ofVectorMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ class ofMatrix3x3;
#include "ofMatrix4x4.h"
#include "ofQuaternion.h"

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
Expand Down
4 changes: 3 additions & 1 deletion libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

#ifdef OF_SOUND_PLAYER_OPENAL

#define GLM_FORCE_CTOR_INIT
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#include <glm/gtc/constants.hpp>
#include <glm/ext/scalar_common.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/sound/ofSoundBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
#include "ofSoundUtils.h"
#include "ofLog.h"
#include "ofMath.h"
#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/trigonometric.hpp>
#include <limits>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/sound/ofSoundPlayer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "ofSoundPlayer.h"
#include "ofLog.h"
#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/ext/scalar_common.hpp>

#ifdef OF_SOUND_PLAYER_AV_ENGINE
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/sound/ofSoundUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

#pragma once

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/gtc/constants.hpp>
#include <glm/ext/scalar_common.hpp>

Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/types/ofColor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#pragma once

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/ext/scalar_common.hpp>
#include <glm/vec3.hpp>
#include <iostream>
Expand Down
8 changes: 6 additions & 2 deletions libs/openFrameworks/types/ofRectangle.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#pragma once

#define GLM_FORCE_CTOR_INIT
#define GLM_ENABLE_EXPERIMENTAL
#if !defined(GLM_FORCE_CTOR_INIT)
#define GLM_FORCE_CTOR_INIT
#endif
#if !defined(GLM_ENABLE_EXPERIMENTAL)
#define GLM_ENABLE_EXPERIMENTAL
#endif
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <iostream>
Expand Down
Loading