Skip to content

Commit a6444a1

Browse files
authored
Merge branch 'openframeworks:master' into squared
2 parents ac8e845 + 900b98d commit a6444a1

28 files changed

Lines changed: 112 additions & 61 deletions

examples/sound/soundBufferExample/src/ofApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void ofApp::update(){
2424
// "lastBuffer" is shared between update() and audioOut(), which are called
2525
// on two different threads. This lock makes sure we don't use lastBuffer
2626
// from both threads simultaneously (see the corresponding lock in audioOut())
27-
unique_lock<mutex> lock(audioMutex);
27+
std::unique_lock<std::mutex> lock(audioMutex);
2828

2929
// this loop is building up a polyline representing the audio contained in
3030
// the left channel of the buffer
@@ -92,7 +92,7 @@ void ofApp::audioOut(ofSoundBuffer &outBuffer) {
9292
pulsePhase += pulsePhaseStep;
9393
}
9494

95-
unique_lock<mutex> lock(audioMutex);
95+
std::unique_lock<std::mutex> lock(audioMutex);
9696
lastBuffer = outBuffer;
9797
}
9898

libs/openFrameworks/3d/of3dUtils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "ofAppRunner.h"
33
#include "ofGraphicsBaseTypes.h"
44

5+
#define GLM_FORCE_CTOR_INIT
6+
#define GLM_ENABLE_EXPERIMENTAL
7+
#include <glm/vec3.hpp>
8+
59
//--------------------------------------------------------------
610
void ofDrawAxis(float size) {
711
ofGetCurrentRenderer()->drawAxis(size);

libs/openFrameworks/3d/of3dUtils.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#pragma once
22

3-
#define GLM_FORCE_CTOR_INIT
4-
#define GLM_ENABLE_EXPERIMENTAL
5-
#include <glm/vec3.hpp>
3+
#include <glm/detail/qualifier.hpp>
4+
namespace glm {
5+
typedef vec<3, float, defaultp> vec3;
6+
}
67

78
/// \brief Draws x,y,z axes representing the current reference frame.
89
///

libs/openFrameworks/3d/ofMesh.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ const std::vector<ofMeshFace_<V,N,C,T>> & ofMesh_<V,N,C,T>::getUniqueFaces() con
16571657
bool bHasTexcoords = hasTexCoords();
16581658

16591659
if( getMode() == OF_PRIMITIVE_TRIANGLES) {
1660-
for(std::size_t j = 0; j < indices.size(); j += 3) {
1660+
for(ofIndexType j = 0; j < indices.size(); j += 3) {
16611661
ofMeshFace_<V,N,C,T> & tri = faces[triindex];
16621662
for(std::size_t k = 0; k < 3; k++) {
16631663
index = indices[j+k];

libs/openFrameworks/3d/ofNode.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "ofNode.h"
33
#include "of3dGraphics.h"
44

5+
#define GLM_FORCE_CTOR_INIT
6+
#define GLM_ENABLE_EXPERIMENTAL
7+
#include <glm/mat4x4.hpp>
8+
59
//----------------------------------------
610
ofNode::ofNode()
711
:parent(nullptr)

libs/openFrameworks/3d/ofNode.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#define GLM_FORCE_CTOR_INIT
77
#define GLM_ENABLE_EXPERIMENTAL
8-
#include <glm/mat4x4.hpp>
98
#include <glm/gtc/quaternion.hpp>
109

1110
#include <array>

libs/openFrameworks/app/ofAppEGLWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "ofFileUtils.h"
77
#include "ofGLProgrammableRenderer.h"
88
#include "ofGLRenderer.h"
9-
#include "ofVectorMath.h"
9+
// #include "ofVectorMath.h"
1010
#include <assert.h>
1111
// x11
1212
#include <X11/Xutil.h>

libs/openFrameworks/gl/ofShader.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@
1010
// MARK: ofConstants Targets
1111
#include "ofConstants.h"
1212

13-
#define GLM_FORCE_CTOR_INIT
14-
#define GLM_ENABLE_EXPERIMENTAL
15-
#include <glm/fwd.hpp>
13+
#include <glm/detail/qualifier.hpp>
14+
namespace glm {
15+
typedef vec<2, float, defaultp> vec2;
16+
typedef vec<3, float, defaultp> vec3;
17+
typedef vec<4, float, defaultp> vec4;
18+
19+
typedef float f32;
20+
typedef mat<3, 3, f32, defaultp> mat3;
21+
typedef mat<4, 4, f32, defaultp> mat4;
22+
}
1623

1724
#include <unordered_map>
1825

libs/openFrameworks/graphics/ofGraphics.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
#include "ofConstants.h"
44
#include "ofGraphicsBaseTypes.h"
55

6-
#define GLM_FORCE_CTOR_INIT
7-
#define GLM_ENABLE_EXPERIMENTAL
8-
#include <glm/fwd.hpp>
6+
#include <glm/detail/qualifier.hpp>
7+
namespace glm {
8+
typedef vec<2, float, defaultp> vec2;
9+
typedef vec<3, float, defaultp> vec3;
10+
}
911

1012
class ofVec3f;
1113
class ofVec2f;

0 commit comments

Comments
 (0)