Cleanup of code regarding ANSI C standard (mostly adding newlines at the end of files)

Updating SGCT and Ghoul references
This commit is contained in:
Alexander Bock
2016-08-17 16:26:14 +02:00
parent c9cd968d34
commit c93d882ea6
38 changed files with 61 additions and 52 deletions

View File

@@ -42,7 +42,7 @@ public:
bool windowHasResized() const override;
double averageDeltaTime() const override;
double deltaTime() const override;
double deltaTime() const override;
glm::vec2 mousePosition() const override;
uint32_t mouseButtons(int maxNumber) const override;
glm::ivec2 currentWindowSize() const override;

View File

@@ -50,4 +50,4 @@ protected:
} // namespace interaction
} // namespace openspace
#endif // __CONTROLLER_H__
#endif // __CONTROLLER_H__

View File

@@ -52,4 +52,4 @@ private:
} // namespace openspace
#endif
#endif

View File

@@ -26,4 +26,4 @@ protected:
} // namespace openspace
#endif
#endif

View File

@@ -162,4 +162,4 @@ namespace openspace{
} // namespace openspace
#endif // __MESSAGESTRUCTURES_H__
#endif // __MESSAGESTRUCTURES_H__

View File

@@ -75,4 +75,4 @@ private:
} // namespace openspace
#endif // __NETWORKENGINE_H__
#endif // __NETWORKENGINE_H__

View File

@@ -205,4 +205,4 @@ namespace openspace{
} // namespace openspace
#endif // __OSPARALLELCONNECTION_H__
#endif // __OSPARALLELCONNECTION_H__

View File

@@ -125,4 +125,4 @@ private:
} // namespace properties
} // namespace openspace
#endif // __STRINGPROPERTY_H__
#endif // __STRINGPROPERTY_H__

View File

@@ -79,4 +79,4 @@ bool PropertyDelegate<TemplateProperty<std::vector<int>>>::toString(std::string&
} // namespace properties
} // namespace openspace
#endif // __SELECTIONPROPERTY_H__
#endif // __SELECTIONPROPERTY_H__

View File

@@ -35,4 +35,4 @@ REGISTER_TEMPLATEPROPERTY_HEADER(StringProperty, std::string);
} // namespace properties
} // namespace openspace
#endif // __STRINGPROPERTY_H__
#endif // __STRINGPROPERTY_H__

View File

@@ -48,4 +48,4 @@ std::vector<properties::Property*> allProperties();
} // namespace
#endif // __QUERY_H__
#endif // __QUERY_H__

View File

@@ -68,15 +68,15 @@ public:
Post
};
enum class FrametimeType {
DtTimeAvg = 0,
FPS,
FPSAvg
};
enum class FrametimeType {
DtTimeAvg = 0,
FPS,
FPSAvg
};
static const std::string KeyFontMono;
static const std::string KeyFontLight;
static const std::vector<FrametimeType> FrametimeTypes;
static const std::vector<FrametimeType> FrametimeTypes;
RenderEngine();
~RenderEngine();
@@ -104,7 +104,7 @@ public:
void takeScreenshot();
void toggleInfoText(bool b);
void toggleFrametimeType(int t);
void toggleFrametimeType(int t);
// Performance measurements
void setPerformanceMeasurements(bool performanceMeasurements);

View File

@@ -214,4 +214,4 @@ namespace openspace {
};
} // namespace openspace
#endif // __CAMERA_H__
#endif // __CAMERA_H__

View File

@@ -116,4 +116,4 @@ private:
} // namespace openspace
#endif // SYNCBUFFER_H
#endif // SYNCBUFFER_H

View File

@@ -216,4 +216,4 @@ private:
} // namespace openspace
#endif // __RENDERABLEPLANET_H__
#endif // __RENDERABLEPLANET_H__

View File

@@ -28,6 +28,7 @@
#include <openspace/engine/wrapper/windowwrapper.h>
#include <openspace/rendering/renderengine.h>
#include <ghoul/opengl/programobject.h>
#include <ghoul/io/texture/texturereader.h>
#include <ghoul/filesystem/filesystem>

View File

@@ -32,9 +32,7 @@ in vec4 vs_position;
#include "fragment.glsl"
#include "PowerScaling/powerScaling_fs.hglsl"
Fragment getFragment(){
Fragment getFragment() {
Fragment frag;
// power scale coordinates for depth. w value is set to 1.0.
@@ -44,6 +42,7 @@ Fragment getFragment(){
if(frag.color.a == 0.0f){
discard;
}
frag.depth = denormalizeFloat(depth);
return frag;

View File

@@ -36,6 +36,6 @@ out vec4 vs_position;
void main(){
vs_st = in_st;
vs_position = ViewProjectionMatrix*ModelTransform*in_position;
vs_position = ViewProjectionMatrix * ModelTransform * in_position;
gl_Position = vec4(vs_position);
}
}

View File

@@ -42,6 +42,7 @@
#include <modules/globebrowsing/chunk/chunknode.h>
#include <ghoul/opengl/textureunit.h>
namespace ghoul {

View File

@@ -96,4 +96,4 @@ namespace openspace {
} // namespace openspace
#endif // __AABB_H__
#endif // __AABB_H__

View File

@@ -71,4 +71,4 @@ protected:
const int _ySegments;
};
} // namespace openspace
#endif // __GRIDGEOMETRY_H__
#endif // __GRIDGEOMETRY_H__

View File

@@ -175,4 +175,4 @@ void TriangleSoup::drawUsingActiveProgram() {
glBindVertexArray(0);
}
} // namespace openspace
} // namespace openspace

View File

@@ -100,4 +100,4 @@ private:
} // namespace openspace
#endif // __TRIANGLESOUP_H__
#endif // __TRIANGLESOUP_H__

View File

@@ -21,9 +21,11 @@
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/iswa/rendering/textureplane.h>
#include <openspace/engine/openspaceengine.h>
#include <ghoul/opengl/texture.h>
#include <ghoul/opengl/textureunit.h>
namespace {
const std::string _loggerCat = "TexturePlane";

View File

@@ -76,4 +76,5 @@ protected:
};
} // namespace openspace
#endif //__DATAPROCESSOR_H__
#endif //__DATAPROCESSOR_H__

View File

@@ -75,4 +75,4 @@ private:
};
}
#endif //__HONGKANGPARSER_H__
#endif //__HONGKANGPARSER_H__

View File

@@ -73,4 +73,4 @@ std::vector<std::string> InstrumentDecoder::getTranslation(){
return _spiceIDs;
}
} // namespace openspace
} // namespace openspace

View File

@@ -75,4 +75,4 @@ private:
bool _badDecoding;
};
}
#endif //__LABELPARSER_H__
#endif //__LABELPARSER_H__

View File

@@ -50,4 +50,4 @@ void ScannerDecoder::setStopCommand(std::string stopCommand){
_abort = stopCommand;
}
} // namespace openspace
} // namespace openspace

View File

@@ -48,4 +48,4 @@ std::vector<std::string> TargetDecoder::getTranslation(){
return _names;
}
} // namespace openspace
} // namespace openspace

View File

@@ -63,7 +63,7 @@ double SGCTWindowWrapper::averageDeltaTime() const {
}
double SGCTWindowWrapper::deltaTime() const {
return sgct::Engine::instance()->getDt();
return sgct::Engine::instance()->getDt();
}
glm::vec2 SGCTWindowWrapper::mousePosition() const {

View File

@@ -107,9 +107,9 @@ namespace openspace {
const std::string RenderEngine::KeyFontMono = "Mono";
const std::string RenderEngine::KeyFontLight = "Light";
const std::vector<RenderEngine::FrametimeType> RenderEngine::FrametimeTypes({
RenderEngine::FrametimeType::DtTimeAvg,
RenderEngine::FrametimeType::FPS,
RenderEngine::FrametimeType::FPSAvg
RenderEngine::FrametimeType::DtTimeAvg,
RenderEngine::FrametimeType::FPS,
RenderEngine::FrametimeType::FPSAvg
});
RenderEngine::RenderEngine()
@@ -734,12 +734,12 @@ scripting::LuaLibrary RenderEngine::luaLibrary() {
"bool",
"Toggles the showing of render information on-screen text"
},
{
"toggleFrametimeType",
&luascriptfunctions::toggleFrametimeType,
"int",
"Toggle showing FPS or Average Frametime in heads up info"
},
{
"toggleFrametimeType",
&luascriptfunctions::toggleFrametimeType,
"int",
"Toggle showing FPS or Average Frametime in heads up info"
},
{
"setPerformanceMeasurement",
&luascriptfunctions::setPerformanceMeasurement,

View File

@@ -64,4 +64,4 @@ bool Ephemeris::initialize() {
void Ephemeris::update(const UpdateData& data) {}
} // namespace openspace
} // namespace openspace

View File

@@ -55,4 +55,4 @@ void ProgressBar::print(int current) {
_previous = iprogress;
};
} // namespace openspace
} // namespace openspace

View File

@@ -65,4 +65,4 @@ const std::vector<ScreenLog::LogEntry>& ScreenLog::entries() const {
return _entries;
}
} // namespace openspace
} // namespace openspace

View File

@@ -68,7 +68,12 @@ function (set_compile_settings project)
set_property(TARGET ${project} PROPERTY CXX_STANDARD_REQUIRED On)
if (MSVC)
target_compile_options(${project} PUBLIC "/MP" "/ZI" "/wd4201" "/wd4127")
target_compile_options(${project} PUBLIC
"/MP" # Multi-threading support
"/ZI" # Edit and continue support
"/wd4201" # Disable nameless struct warning
"/wd4127" # Disable conditional expression is constant warning
)
if (OPENSPACE_WARNINGS_AS_ERRORS)
target_compile_options(${project} PUBLIC "/WX")
endif ()