Skip to content

Commit 2c11d7e

Browse files
committed
Merge branch 'master' of github.com:openframeworks/openFrameworks
2 parents d0e3305 + f674cc4 commit 2c11d7e

File tree

23 files changed

+270
-108
lines changed

23 files changed

+270
-108
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: build-web-examples
2+
3+
4+
# make the action not run on the local repo if the branch is also in a pull request to OF/OF
5+
#on:
6+
# workflow_dispatch:
7+
# inputs:
8+
# release:
9+
# description: 'release'
10+
# required: true
11+
# default: 'nightly'
12+
on:
13+
push:
14+
if: github.event_name == 'push' && github.event.pull_request == null
15+
paths-ignore:
16+
- '**/*.md'
17+
- 'examples/**'
18+
pull_request:
19+
if: github.event_name == 'pull_request' && github.repository == 'openframeworks/openFrameworks'
20+
paths-ignore:
21+
- '**/*.md'
22+
- 'examples/**'
23+
jobs:
24+
build-web-examples:
25+
runs-on: ubuntu-20.04
26+
strategy:
27+
matrix:
28+
cfg:
29+
- target: emscripten
30+
env:
31+
TARGET: ${{matrix.cfg.target}}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Docker Step
35+
run: docker run -di --name emscripten -v $PWD:/src emscripten/emsdk:3.1.21 bash
36+
- name: Download libs
37+
run: ./scripts/$TARGET/download_libs.sh
38+
- name: Install dependencies
39+
run: ./scripts/ci/$TARGET/install_web_examples.sh
40+
- name: Build
41+
run: docker exec -e GA_EXAMPLES_USER=${{ secrets.SSH_USER }} -e GA_EXAMPLES_SERVER=${{ secrets.SSH_SERVER }} -e GA_EXAMPLES_KEY=${{ secrets.SSH_KEY }} -e GH_HEAD_REF=${{ github.head_ref }} -e GH_BRANCH=${{ github.ref_name }} -e GH_ACTIONS=true -i emscripten sh -c "scripts/ci/$TARGET/examples_to_build.sh"
42+
env:
43+
GA_EXAMPLES_USER: ${{ secrets.SSH_USER }}
44+
GA_EXAMPLES_SERVER: ${{ secrets.SSH_SERVER }}
45+
GA_EXAMPLES_KEY: ${{ secrets.SSH_KEY }}
46+
GH_HEAD_REF: ${{ github.head_ref }}
47+
GH_BRANCH: ${{ github.ref_name }}
48+
GH_ACTIONS: "true"

libs/openFrameworks/3d/ofNode.h

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#pragma once
33

44
#include "ofParameter.h"
5-
// FIXME: deprecated and ctor
6-
#include "ofConstants.h"
5+
6+
#define GLM_FORCE_CTOR_INIT
77
#include "glm/mat4x4.hpp"
88
#include <glm/gtc/quaternion.hpp>
99
#include <array>
@@ -100,9 +100,15 @@ class ofNode {
100100
/// \returns A normalized 3D vector of the node's local y axis direction.
101101
glm::vec3 getUpDir() const;
102102

103-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", float getPitch() const);
104-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", float getHeading() const);
105-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", float getRoll() const);
103+
104+
[[deprecated ("Use Deg/Rad versions.")]]
105+
float getPitch() const;
106+
107+
[[deprecated ("Use Deg/Rad versions.")]]
108+
float getHeading() const;
109+
110+
[[deprecated ("Use Deg/Rad versions.")]]
111+
float getRoll() const;
106112

107113
/// \brief Get pitch of node, aka the rotation along local x axis.
108114
/// \returns The rotation around the local x axis in degrees, as a float.
@@ -131,8 +137,9 @@ class ofNode {
131137
/// \brief Get the local orientation of the node as a quaternion.
132138
/// \returns A quaternion of local orientation (useful for complex rotations)
133139
glm::quat getOrientationQuat() const;
134-
135-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", glm::vec3 getOrientationEuler() const);
140+
141+
[[deprecated ("Use Deg/Rad versions.")]]
142+
glm::vec3 getOrientationEuler() const;
136143

137144
/// \brief Get local orientation of node in degrees around x, y, and z axes.
138145
/// \returns The local x, y and z axes orientation in degrees, as a 3D vector.
@@ -298,7 +305,8 @@ class ofNode {
298305
/// \param amount Desired relative position change along local z axis as float.
299306
void dolly(float amount);
300307

301-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void tilt(float degrees));
308+
[[deprecated ("Use Deg/Rad versions.")]]
309+
void tilt(float degrees);
302310

303311
/// \brief Tilt up+down relative to current orientation (around local x axis).
304312
///
@@ -310,7 +318,8 @@ class ofNode {
310318
/// \param radians Desired relative rotation change along local x axis in radians as float.
311319
void tiltRad(float radians);
312320

313-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void pan(float degrees));
321+
[[deprecated ("Use Deg/Rad versions.")]]
322+
void pan(float degrees);
314323

315324
/// \brief Rotate left+right relative to current orientation (around local y axis).
316325
///
@@ -322,7 +331,8 @@ class ofNode {
322331
/// \param radians Desired relative rotation change along local y axis in radians as float.
323332
void panRad(float radians);
324333

325-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void roll(float degrees));
334+
[[deprecated ("Use Deg/Rad versions.")]]
335+
void roll(float degrees);
326336

327337
/// \brief Roll left+right relative to current orientation (around local z axis).
328338
///
@@ -339,7 +349,8 @@ class ofNode {
339349
/// \param q Desired relative rotation change as a ref to quaternion.
340350
void rotate(const glm::quat& q);
341351

342-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void rotate(float degrees, const glm::vec3& v));
352+
[[deprecated ("Use Deg/Rad versions.")]]
353+
void rotate(float degrees, const glm::vec3& v);
343354

344355
/// \brief Rotate relative to current orientation around arbitrary axis.
345356
///
@@ -353,7 +364,8 @@ class ofNode {
353364
/// \param v Desired axis to rotate around as a ref to cartesian 3D Vector.
354365
void rotateRad(float radians, const glm::vec3& v);
355366

356-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void rotate(float degrees, float vx, float vy, float vz));
367+
[[deprecated ("Use Deg/Rad versions.")]]
368+
void rotate(float degrees, float vx, float vy, float vz);
357369

358370
/// \brief Rotate relative to current orientation around arbitrary axis.
359371
///
@@ -377,7 +389,8 @@ class ofNode {
377389
/// \param point Point to rotate around in local xyz coordinates as ref to 3D vector.
378390
void rotateAround(const glm::quat& q, const glm::vec3& point);
379391

380-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void rotateAround(float degrees, const glm::vec3& axis, const glm::vec3& point));
392+
[[deprecated ("Use Deg/Rad versions.")]]
393+
void rotateAround(float degrees, const glm::vec3& axis, const glm::vec3& point);
381394

382395
/// \brief Rotate relative to current orientation around arbitrary axis around point.
383396
///
@@ -417,8 +430,11 @@ class ofNode {
417430
/// \param upVector The desired up axis as a ref to cartesian 3D vector.
418431
void lookAt(const ofNode& lookAtNode, const glm::vec3& upVector);
419432

420-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void orbit(float longitude, float latitude, float radius, const glm::vec3& centerPoint = glm::vec3(0, 0, 0)));
421-
OF_DEPRECATED_MSG("Use the Deg/Rad version.", void orbit(float longitude, float latitude, float radius, ofNode& centerNode));
433+
[[deprecated ("Use Deg/Rad versions.")]]
434+
void orbit(float longitude, float latitude, float radius, const glm::vec3& centerPoint = glm::vec3(0, 0, 0));
435+
436+
[[deprecated ("Use Deg/Rad versions.")]]
437+
void orbit(float longitude, float latitude, float radius, ofNode& centerNode);
422438

423439
/// \brief Orbit node around a global position at a specific radius.
424440
///

libs/openFrameworks/events/ofEvent.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include <iostream>
1616
#include <array>
1717

18-
// FIXME: constants deprecated only
19-
#include "ofConstants.h"
20-
2118

2219
/*! \cond PRIVATE */
2320
namespace of{
@@ -421,7 +418,8 @@ class ofEventListeners{
421418
listeners.emplace_back(std::move(listener));
422419
}
423420

424-
OF_DEPRECATED_MSG("Don't use this method. If you need granular control over each listener, then use individual ofEventListener instances for each.", void unsubscribe(std::size_t pos));
421+
[[deprecated("Don't use this method. If you need granular control over each listener, then use individual ofEventListener instances for each.")]]
422+
void unsubscribe(std::size_t pos);
425423

426424
void unsubscribeAll(){
427425
listeners.clear();

libs/openFrameworks/gl/ofLight.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "of3dUtils.h"
1414
#include "ofGLBaseTypes.h"
1515
#include "ofGLUtils.h"
16-
#include "ofConstants.h"
1716
#include "ofColor.h"
17+
#define GLM_FORCE_CTOR_INIT
1818
#include <glm/gtc/quaternion.hpp>
1919
#include <map>
2020

libs/openFrameworks/gl/ofMaterial.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
#include "ofMaterialBaseTypes.h"
44
#include "ofShader.h"
5-
// FIXME: constants deprecated only and ctor
6-
#include "ofConstants.h"
75

6+
#define GLM_FORCE_CTOR_INIT
87
#include "glm/fwd.hpp"
98
#include "glm/vec2.hpp"
109
#include <map>
@@ -344,11 +343,13 @@ class ofMaterial : public ofBaseMaterial {
344343
float getNormalGeomToNormalMapMix() const;
345344

346345
typedef ofMaterialSettings Data;
347-
OF_DEPRECATED_MSG("Use getSettings() instead", Data getData() const);
346+
[[deprecated("Use getSettings() instead")]]
347+
Data getData() const;
348348
ofMaterialSettings getSettings() const;
349349

350350
/// \brief set the material color properties data struct
351-
OF_DEPRECATED_MSG("Use setup(settings) instead", void setData(const ofMaterial::Data & data));
351+
[[deprecated("Use setup(settings) instead")]]
352+
void setData(const ofMaterial::Data & data);
352353

353354
// documented in ofBaseMaterial
354355
void begin() const;

libs/openFrameworks/gl/ofShader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
make sure to catch and report that error.
88
*/
99

10+
// FIXME: Targets CTOR
1011
#include "ofConstants.h"
1112
#include "glm/fwd.hpp"
1213
#include <unordered_map>

libs/openFrameworks/gl/ofShadow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "ofGLUtils.h"
1212
#include "ofLight.h"
1313
#include "ofGLProgrammableRenderer.h"
14+
// FIXME: Targets
1415
#include "ofConstants.h"
1516

1617
#define GLM_FORCE_CTOR_INIT

libs/openFrameworks/graphics/ofPath.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "ofPolyline.h"
44
#include "ofVboMesh.h"
55
#include "ofTessellator.h"
6+
// FIXME: deprecated and targets
67
#include "ofConstants.h"
78

89
template<typename T>

libs/openFrameworks/graphics/ofPixels.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "ofUtils.h"
44
#include "ofLog.h"
55
#include "ofMath.h"
6-
#include "ofConstants.h"
76

87
template<typename T>
98
class ofColor_;
@@ -315,8 +314,12 @@ class ofPixels_ {
315314
/// \returns A raw pointer to the pixel data.
316315
PixelType * getData();
317316
const PixelType * getData() const;
318-
OF_DEPRECATED_MSG("Use getData instead",PixelType * getPixels());
319-
OF_DEPRECATED_MSG("Use getData instead",const PixelType * getPixels() const);
317+
318+
[[deprecated("Use getData instead")]]
319+
PixelType * getPixels();
320+
321+
[[deprecated("Use getData instead")]]
322+
const PixelType * getPixels() const;
320323

321324
/// \brief Get the pixel index at a x,y position
322325
///

libs/openFrameworks/graphics/ofPolyline.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
#ifndef OF_POLYLINE_H
44
#define OF_POLYLINE_H
55

6-
#include "ofConstants.h"
6+
#define GLM_FORCE_CTOR_INIT
77
#include "glm/fwd.hpp"
88
#include <deque>
9+
#include <vector>
910

1011
/// \file
1112
/// ofPolyLine allows you to combine multiple points into a single vector data
@@ -367,13 +368,15 @@ class ofPolyline_ {
367368

368369
void rotateDeg(float degrees, const glm::vec3& axis);
369370
void rotateRad(float radians, const glm::vec3& axis);
370-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", void rotate(float degrees, const glm::vec3& axis));
371+
[[deprecated("Use Deg/Rad versions.")]]
372+
void rotate(float degrees, const glm::vec3& axis);
371373

372374
void translate(const glm::vec3 & p);
373375

374376
void rotateDeg(float degrees, const glm::vec2& axis);
375377
void rotateRad(float radians, const glm::vec2& axis);
376-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", void rotate(float degrees, const glm::vec2& axis));
378+
[[deprecated("Use Deg/Rad versions.")]]
379+
void rotate(float degrees, const glm::vec2& axis);
377380

378381
void translate(const glm::vec2 & p);
379382

@@ -471,11 +474,13 @@ class ofPolyline_ {
471474
T getPointAtIndexInterpolated(float findex) const;
472475

473476
/// \brief Get angle (degrees) of the path at index
474-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", float getAngleAtIndex(int index) const);
477+
[[deprecated("Use Deg/Rad versions.")]]
478+
float getAngleAtIndex(int index) const;
475479

476480
/// \brief Get angle (degrees) at interpolated index (interpolated between
477481
/// neighboring indices)
478-
OF_DEPRECATED_MSG("Use Deg/Rad versions.", float getAngleAtIndexInterpolated(float findex) const);
482+
[[deprecated("Use Deg/Rad versions.")]]
483+
float getAngleAtIndexInterpolated(float findex) const;
479484

480485
/// \brief Get rotation vector at index (magnitude is sine of angle)
481486
T getRotationAtIndex(int index) const;

0 commit comments

Comments
 (0)