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