mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-04 10:25:29 +00:00
Move projectM-opengl.h into Renderer lib
This commit is contained in:
@ -28,7 +28,6 @@ add_library(projectM_main OBJECT
|
||||
TimeKeeper.hpp
|
||||
Utils.cpp
|
||||
Utils.hpp
|
||||
projectM-opengl.h
|
||||
)
|
||||
|
||||
target_link_libraries(projectM_main
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "MilkdropStaticShaders.hpp"
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include <Renderer/OpenGL.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include <Renderer/BlendMode.hpp>
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include <../Renderer/OpenGL.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include <Renderer/OpenGL.h>
|
||||
|
||||
namespace libprojectM {
|
||||
namespace Renderer {
|
||||
|
||||
@ -31,6 +31,7 @@ add_library(Renderer OBJECT
|
||||
Mesh.hpp
|
||||
MilkdropNoise.cpp
|
||||
MilkdropNoise.hpp
|
||||
OpenGL.h
|
||||
Point.hpp
|
||||
PresetTransition.cpp
|
||||
PresetTransition.hpp
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
|
||||
namespace libprojectM {
|
||||
namespace Renderer {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "Renderer/MilkdropNoise.hpp"
|
||||
|
||||
#include "projectM-opengl.h"
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <random>
|
||||
|
||||
34
src/libprojectM/Renderer/OpenGL.h
Normal file
34
src/libprojectM/Renderer/OpenGL.h
Normal 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
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include <Renderer/OpenGL.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
namespace libprojectM {
|
||||
namespace Renderer {
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Renderer/OpenGL.h"
|
||||
#include "Renderer/VertexBufferUsage.hpp"
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
#include "Renderer/OpenGL.h"
|
||||
|
||||
namespace libprojectM {
|
||||
namespace Renderer {
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Renderer/OpenGL.h"
|
||||
#include "Renderer/VertexBufferUsage.hpp"
|
||||
|
||||
#include <projectM-opengl.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
@ -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
|
||||
Reference in New Issue
Block a user