Move projectM-opengl.h into Renderer lib

This commit is contained in:
Kai Blaschke
2025-10-11 13:45:37 +02:00
parent 4f3d062053
commit 49410adca7
16 changed files with 48 additions and 56 deletions

View File

@ -28,7 +28,6 @@ add_library(projectM_main OBJECT
TimeKeeper.hpp
Utils.cpp
Utils.hpp
projectM-opengl.h
)
target_link_libraries(projectM_main

View File

@ -1,6 +1,6 @@
#include "MilkdropStaticShaders.hpp"
#include <projectM-opengl.h>
#include <Renderer/OpenGL.h>
#include <cstring>
#include <stdexcept>

View File

@ -7,7 +7,7 @@
#include <Renderer/BlendMode.hpp>
#include <projectM-opengl.h>
#include <../Renderer/OpenGL.h>
#include <algorithm>
#include <cmath>

View File

@ -1,6 +1,6 @@
#pragma once
#include <projectM-opengl.h>
#include <Renderer/OpenGL.h>
namespace libprojectM {
namespace Renderer {

View File

@ -31,6 +31,7 @@ add_library(Renderer OBJECT
Mesh.hpp
MilkdropNoise.cpp
MilkdropNoise.hpp
OpenGL.h
Point.hpp
PresetTransition.cpp
PresetTransition.hpp

View File

@ -1,9 +1,9 @@
#pragma once
#include <projectM-opengl.h>
#include "Renderer/OpenGL.h"
#include <cstdint>
#include <cmath>
#include <cstdint>
namespace libprojectM {
namespace Renderer {

View File

@ -1,6 +1,6 @@
#include "Renderer/MilkdropNoise.hpp"
#include "projectM-opengl.h"
#include "Renderer/OpenGL.h"
#include <chrono>
#include <random>

View File

@ -0,0 +1,34 @@
/**
* @file OpenGL.h
* @brief Includes the appropriate OpenGL headers for each platform.
*/
#pragma once
#ifdef __APPLE__ /* macOS */
#include <OpenGL/gl3.h>
#include <OpenGL/gl3ext.h>
#elif defined(EYETUNE_WINRT) /* Universal Windows Platform */
#define GL_GLEXT_PROTOTYPES
#define GLM_FORCE_CXX03
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES3/gl3.h>
#include <GLES3/gl31.h>
#elif defined(_WIN32) /* Windows Desktop */
#define GLM_FORCE_CXX03
#include <GL/glew.h>
#include <GL/wglew.h>
#include <windows.h>
#else /* Linux, BSD, Android, emscripten etc. */
#ifdef USE_GLES
#include <GLES3/gl3.h>
#else
#if !defined(GL_GLEXT_PROTOTYPES)
#define GL_GLEXT_PROTOTYPES
#endif
#include <GL/gl.h>
#include <GL/glext.h>
#endif
#endif

View File

@ -1,6 +1,6 @@
#pragma once
#include <projectM-opengl.h>
#include "Renderer/OpenGL.h"
#include <cstdint>

View File

@ -4,7 +4,7 @@
*/
#pragma once
#include <projectM-opengl.h>
#include <Renderer/OpenGL.h>
#include <memory>

View File

@ -1,6 +1,6 @@
#pragma once
#include <projectM-opengl.h>
#include "Renderer/OpenGL.h"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#pragma once
#include <projectM-opengl.h>
#include "Renderer/OpenGL.h"
namespace libprojectM {
namespace Renderer {

View File

@ -1,9 +1,8 @@
#pragma once
#include "Renderer/OpenGL.h"
#include "Renderer/VertexBufferUsage.hpp"
#include <projectM-opengl.h>
#include <cstddef>
#include <vector>

View File

@ -1,6 +1,6 @@
#pragma once
#include <projectM-opengl.h>
#include "Renderer/OpenGL.h"
namespace libprojectM {
namespace Renderer {

View File

@ -1,9 +1,8 @@
#pragma once
#include "Renderer/OpenGL.h"
#include "Renderer/VertexBufferUsage.hpp"
#include <projectM-opengl.h>
#include <cstddef>
#include <cstdint>
#include <vector>

View File

@ -1,40 +0,0 @@
/**
Include appropriate OpenGL headers for this platform.
**/
#pragma once
// Enable openGL extra checks, better not be enabled in release build
#define OGL_DEBUG 0
// Unlock FPS for rendering benchmarks, it disables Vblank/Vsync and prints drawn frame count within a 5s test run
#define UNLOCK_FPS 0
#ifdef __APPLE__
# include <OpenGL/gl3.h>
# include <OpenGL/gl3ext.h>
#elif defined(EYETUNE_WINRT)
# define GL_GLEXT_PROTOTYPES
# define GLM_FORCE_CXX03
# include <GLES3/gl31.h>
# include <GLES3/gl3.h>
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# include <EGL/egl.h>
# include <EGL/eglext.h>
#elif defined(_WIN32)
# define GLM_FORCE_CXX03
# include <windows.h>
# include <GL/glew.h>
# include <GL/wglew.h>
#else /* linux/unix/other */
# ifdef USE_GLES
# include <GLES3/gl3.h>
# else
# if !defined(GL_GLEXT_PROTOTYPES)
# define GL_GLEXT_PROTOTYPES
# endif
# include <GL/gl.h>
# include <GL/glext.h>
# endif
#endif