Move-around Backend files
Hoping to introduce some degree of grouping
This commit is contained in:
parent
ee7cf6799b
commit
40464a9fc0
13 changed files with 25 additions and 14 deletions
|
@ -326,22 +326,22 @@ else()
|
|||
endif()
|
||||
|
||||
if(BACKEND_PLATFORM MATCHES "SDL2")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Platform/SDL2.cpp" "src/Backends/Controller/SDL2.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/SDL2/Controller.cpp" "src/Backends/SDL2/Misc.cpp" "src/Backends/SDL2/SDL2.h")
|
||||
elseif(BACKEND_PLATFORM MATCHES "GLFW3")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Platform/GLFW3.cpp" "src/Backends/Controller/GLFW3.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/GLFW3/Controller.cpp" "src/Backends/GLFW3/Misc.cpp" "src/Backends/GLFW3/GLFW3.h")
|
||||
endif()
|
||||
|
||||
if(BACKEND_PLATFORM MATCHES "SDL2" AND BACKEND_RENDERER MATCHES "OpenGL3")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Window/SDL2-OpenGL3.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/SDL2/Window-OpenGL3.cpp")
|
||||
elseif(BACKEND_PLATFORM MATCHES "SDL2" AND BACKEND_RENDERER MATCHES "OpenGLES2")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Window/SDL2-OpenGLES2.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/SDL2/Window-OpenGLES2.cpp")
|
||||
elseif(BACKEND_PLATFORM MATCHES "SDL2" AND BACKEND_RENDERER MATCHES "SDLTexture")
|
||||
elseif(BACKEND_PLATFORM MATCHES "SDL2" AND BACKEND_RENDERER MATCHES "SDLSurface")
|
||||
elseif(BACKEND_PLATFORM MATCHES "SDL2" AND BACKEND_RENDERER MATCHES "Software")
|
||||
elseif(BACKEND_PLATFORM MATCHES "GLFW3" AND BACKEND_RENDERER MATCHES "OpenGL3")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Window/GLFW3-OpenGL3.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/GLFW3/Window-OpenGL3.cpp")
|
||||
elseif(BACKEND_PLATFORM MATCHES "GLFW3" AND BACKEND_RENDERER MATCHES "OpenGLES2")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/Window/GLFW3-OpenGLES2.cpp")
|
||||
target_sources(CSE2 PRIVATE "src/Backends/GLFW3/Window-OpenGLES2.cpp")
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid BACKEND_PLATFORM/BACKEND_RENDERER combination")
|
||||
endif()
|
||||
|
|
7
src/Backends/GLFW3/GLFW3.h
Normal file
7
src/Backends/GLFW3/GLFW3.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
#undef GLFW_INCLUDE_NONE
|
||||
|
||||
extern GLFWwindow *window;
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "../../WindowsWrapper.h"
|
||||
|
||||
#include "GLFW3.h"
|
||||
#include "../../KeyControl.h"
|
||||
#include "../../Main.h"
|
||||
#include "../../Organya.h"
|
|
@ -1,4 +1,4 @@
|
|||
#include "../Window.h"
|
||||
#include "../Window-OpenGL.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -13,9 +13,7 @@
|
|||
#include "../../WindowsWrapper.h"
|
||||
|
||||
#include "../Platform.h"
|
||||
|
||||
// Horrible hack
|
||||
extern GLFWwindow *window;
|
||||
#include "GLFW3.h"
|
||||
|
||||
BOOL WindowBackend_OpenGL_CreateWindow(const char *window_title, int *screen_width, int *screen_height, BOOL fullscreen)
|
||||
{
|
|
@ -19,7 +19,7 @@
|
|||
#include "../../WindowsWrapper.h"
|
||||
|
||||
#include "../Platform.h"
|
||||
#include "../Window.h"
|
||||
#include "../Window-OpenGL.h"
|
||||
#include "../../Resource.h"
|
||||
|
||||
#define TOTAL_VBOS 8
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "../../WindowsWrapper.h"
|
||||
|
||||
#include "../SDL2.h"
|
||||
#include "../../KeyControl.h"
|
||||
#include "../../Main.h"
|
||||
#include "../../Organya.h"
|
5
src/Backends/SDL2/SDL2.h
Normal file
5
src/Backends/SDL2/SDL2.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
extern SDL_Window *window;
|
|
@ -1,4 +1,4 @@
|
|||
#include "../Window.h"
|
||||
#include "../Window-OpenGL.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -12,10 +12,9 @@
|
|||
#include "../../WindowsWrapper.h"
|
||||
|
||||
#include "../Platform.h"
|
||||
#include "../SDL2.h"
|
||||
#include "../../Resource.h"
|
||||
|
||||
extern SDL_Window *window;
|
||||
|
||||
static SDL_GLContext context;
|
||||
|
||||
BOOL WindowBackend_OpenGL_CreateWindow(const char *window_title, int *screen_width, int *screen_height, BOOL fullscreen)
|
Loading…
Add table
Reference in a new issue