Skip to content
Snippets Groups Projects
Commit fb110f19 authored by Armin Co's avatar Armin Co
Browse files

Fixed warnings and includes according to new CMake structure.

parent 0d960b80
Branches
No related tags found
No related merge requests found
...@@ -5,14 +5,13 @@ ...@@ -5,14 +5,13 @@
#include <GL/gl3w.h> #include <GL/gl3w.h>
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include <imgui/imgui.h> #include <imgui.h>
#include <glm/gtc/type_ptr.hpp> #include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include <GuiCore/Log.hpp>
#include <GuiCore/Input.hpp>
#include <GuiCore/Glyphs.hpp> #include <GuiCore/Glyphs.hpp>
#include <GuiCore/Input.hpp>
#include <GuiCore/Timer.hpp> #include <GuiCore/Timer.hpp>
#include "GameLayer.hpp" #include "GameLayer.hpp"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "MainMenuLayer.hpp" #include "MainMenuLayer.hpp"
#include <imgui/imgui.h> #include <imgui.h>
#include <GuiCore/Application.hpp> #include <GuiCore/Application.hpp>
#include "Log.hpp" #include "Log.hpp"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include <imgui/imgui.h> #include <imgui.h>
#include <imgui/backends/imgui_impl_glfw.h> #include <imgui/backends/imgui_impl_glfw.h>
#include <imgui/backends/imgui_impl_opengl3.h> #include <imgui/backends/imgui_impl_opengl3.h>
......
...@@ -86,7 +86,7 @@ namespace GuiCore ...@@ -86,7 +86,7 @@ namespace GuiCore
glLinkProgram(program); glLinkProgram(program);
GLint isLinked = 0; GLint isLinked = 0;
glGetProgramiv(program, GL_LINK_STATUS, (int*)&isLinked); glGetProgramiv(program, GL_LINK_STATUS, static_cast<int*>(&isLinked));
if (isLinked == GL_FALSE) if (isLinked == GL_FALSE)
{ {
GLint maxLength = 0; GLint maxLength = 0;
......
...@@ -3,15 +3,13 @@ ...@@ -3,15 +3,13 @@
/// ///
#include <complex> #include <complex>
#include <App/Log.hpp>
#include <GuiCore/Timer.hpp>
#include "Particle.hpp" #include "Particle.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include "Log.hpp" #include "Workers.hpp"
#include "Worker.hpp"
#include <imgui.h>
#include <GuiCore/Timer.hpp>
using namespace QPong; using namespace QPong;
...@@ -89,9 +87,15 @@ Particle::Particle(Properties properties, GameOptions &options, Player &playerOn ...@@ -89,9 +87,15 @@ Particle::Particle(Properties properties, GameOptions &options, Player &playerOn
fftw_init_threads(); fftw_init_threads();
fftw_plan_with_nthreads(m_properties.threads); fftw_plan_with_nthreads(m_properties.threads);
m_planForward = fftw_plan_dft_2d(m_properties.size, m_properties.size, (fftw_complex *)m_psi, (fftw_complex *)m_psi, FFTW_FORWARD, FFTW_MEASURE); m_planForward = fftw_plan_dft_2d(
m_properties.size,
m_properties.size,
reinterpret_cast<fftw_complex*>(m_psi),
reinterpret_cast<fftw_complex*>(m_psi),
FFTW_FORWARD,
FFTW_MEASURE);
fftw_plan_with_nthreads(m_properties.threads); fftw_plan_with_nthreads(m_properties.threads);
m_planBackwards = fftw_plan_dft_2d(m_properties.size, m_properties.size, (fftw_complex *)m_psi, (fftw_complex *)m_psi, FFTW_BACKWARD, FFTW_MEASURE); m_planBackwards = fftw_plan_dft_2d(m_properties.size, m_properties.size, reinterpret_cast<fftw_complex*>(m_psi), reinterpret_cast<fftw_complex*>(m_psi), FFTW_BACKWARD, FFTW_MEASURE);
int numberOfThreads = m_properties.threads; int numberOfThreads = m_properties.threads;
for (int i = 0; i < numberOfThreads; i++) for (int i = 0; i < numberOfThreads; i++)
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include "Bat.hpp" #include "Bat.hpp"
#include "Player.hpp" #include <App/Player.hpp>
namespace QPong namespace QPong
{ {
class WorkerParticle; class WorkerParticle;
...@@ -37,7 +38,7 @@ namespace QPong ...@@ -37,7 +38,7 @@ namespace QPong
double startValue; double startValue;
double hbar; double hbar;
int threads; int threads;
const int elements() const {return size * size;} int elements() const {return size * size;}
}; };
struct GameOptions struct GameOptions
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/// @author Armin Co /// @author Armin Co
/// ///
#include "Worker.hpp" #include "Workers.hpp"
#include <chrono> #include <chrono>
using namespace QPong; using namespace QPong;
...@@ -12,8 +12,8 @@ WorkerParticle::WorkerParticle(Particle *particle, int startIndex, int stopIndex ...@@ -12,8 +12,8 @@ WorkerParticle::WorkerParticle(Particle *particle, int startIndex, int stopIndex
, m_startIndex {startIndex} , m_startIndex {startIndex}
, m_stopIndex {stopIndex} , m_stopIndex {stopIndex}
, m_currentDt {0.0} , m_currentDt {0.0}
, m_isWorking {false}
, m_running {true} , m_running {true}
, m_isWorking {false}
{ {
} }
......
File moved
...@@ -7,12 +7,10 @@ git clone https://gitlab.cvh-server.de/aco/qpong --recursive ...@@ -7,12 +7,10 @@ git clone https://gitlab.cvh-server.de/aco/qpong --recursive
``` ```
## Build ## Build
The required packages are listed in the `dependencies` file. List of dependencies:
On Debian based systems you can run the following command to install all the required packages.
``` ``` build-essential cmake libfreetype-dev libopengl-dev libglx-dev libglfw3-dev libglm-dev libfftw3-dev ```
cd qpong
cat dependencies | xargs sudo apt install -y
```
Please let me know if you needed to install any additional packages on your specific system. Please let me know if you needed to install any additional packages on your specific system.
......
build-essential
cmake
libfreetype-dev
libopengl-dev
libglx-dev
libglfw3-dev
libglm-dev
libfftw3-dev
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment