Skip to content

WIP - more .h cleanup #7596

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 9 commits into from
Aug 12, 2023
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
1 change: 1 addition & 0 deletions addons/ofxAssimpModelLoader/src/ofxAssimpTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ofxAssimpTexture.h"
#include "ofLog.h"
#include "ofUtils.h"

void ofxAssimpTexture::setup(const ofTexture & texture, const of::filesystem::path & texturePath, bool bTexRepeat) {
this->texture = texture;
Expand Down
4 changes: 4 additions & 0 deletions libs/openFrameworks/gl/ofCubeMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ofGLUtils.h"
#include "ofGLProgrammableRenderer.h"
#include "ofCubeMapShaders.h"
#include "ofFbo.h"
#include "ofConstants.h"

#define GLM_FORCE_CTOR_INIT
Expand All @@ -31,6 +32,9 @@ ofVboMesh ofCubeMap::sCubeMesh;
ofShader ofCubeMap::shaderBrdfLUT;
ofTexture ofCubeMap::sBrdfLutTex;

void ofCubeMap::setExposure(float aExposure) {
data->exposure=ofClamp(aExposure, 0.0f, 1.0f);
}

// texture management copied from ofTexture
static std::map<GLuint,int> & getTexturesIndex(){
Expand Down
11 changes: 6 additions & 5 deletions libs/openFrameworks/gl/ofCubeMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

#pragma once

#include "ofFbo.h"
#include "ofVboMesh.h"
#include "glm/mat4x4.hpp"

class ofVboMesh;

class ofShader;
class ofGLProgrammableRenderer;
Expand All @@ -16,8 +17,8 @@ class ofCubeMap {
public:

struct ofCubeMapSettings {
of::filesystem::path filePath = "";
of::filesystem::path cacheDirectory = "";
of::filesystem::path filePath { "" };
of::filesystem::path cacheDirectory { "" };

bool overwriteCache = false;
bool useCache = false;
Expand Down Expand Up @@ -105,7 +106,7 @@ class ofCubeMap {
GLuint getTextureId();
bool isHdr();

void setExposure(float aExposure) {data->exposure=ofClamp(aExposure, 0.0f, 1.0f);}
void setExposure(float aExposure);
float getExposure() { return data->exposure; }

void setUseBrdfLutTexture( bool ab );
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/gl/ofFbo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

// depthBufferTex only
#include "ofTexture.h"
#include "ofGLBaseTypes.h"

Expand Down
1 change: 0 additions & 1 deletion libs/openFrameworks/gl/ofShader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
make sure to catch and report that error.
*/

#include "ofFileUtils.h"
#include "ofConstants.h"
#include "glm/fwd.hpp"
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofFileUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "ofFileUtils.h"
#include "ofLog.h"
#include "ofUtils.h"

#ifndef TARGET_WIN32
#include <pwd.h>
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofFpsCounter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

// ofTime only
#include "ofUtils.h"
#include "ofConstants.h"
#include <queue>
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworks/utils/ofLog.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "ofFileUtils.h"
#include "ofUtils.h"
#include "ofConstants.h"
#include "ofUtils.h" // ofVAArgsToString
#include <sstream>

/// \file
Expand Down
26 changes: 13 additions & 13 deletions libs/openFrameworks/utils/ofSystemUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
/// \class ofFileDialogResult
/// \brief file dialog box selection or save result
class ofFileDialogResult{
public:
ofFileDialogResult();
/// \return the name of the selected file or directory, if set
/// currently returns only 1 file, this may change in the future
std::string getName();
/// \return the full path of the selected file or directory, if set
std::string getPath();
std::string filePath; ///< full path to selected file or directory
std::string fileName; ///< selected file or directory name
bool bSuccess; ///< true if the dialog action was successful, aka file select not cancel
public:
ofFileDialogResult();

/// \return the name of the selected file or directory, if set
/// currently returns only 1 file, this may change in the future
std::string getName();

/// \return the full path of the selected file or directory, if set
std::string getPath();

std::string filePath; ///< full path to selected file or directory
std::string fileName; ///< selected file or directory name
bool bSuccess; ///< true if the dialog action was successful, aka file select not cancel
};

/// \brief show an error message in an alert dialog box
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/utils/ofURLFileLoader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "ofEvents.h"
// ofBuffer only
#include "ofFileUtils.h"
#include "ofConstants.h"
#include <map>
Expand Down
1 change: 0 additions & 1 deletion libs/openFrameworks/utils/ofXml.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "ofParameter.h"
#include "ofConstants.h"
#include "pugixml.hpp"

template<typename It>
Expand Down