Initial ReWindow
This commit is contained in:
@@ -45,13 +45,23 @@ CPMAddPackage(
|
||||
GIT_TAG 0.9.9.8
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/vA0.2.zip
|
||||
)
|
||||
|
||||
if(ReWindow_ADDED)
|
||||
set(REWINDOW_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/_deps/rewindow-src/include)
|
||||
endif()
|
||||
find_package(SDL2 REQUIRED)
|
||||
include_directories(${SDL2_INCLUDE_DIRS})
|
||||
include_directories(${REWINDOW_INCLUDE_DIRS})
|
||||
#find_package(SDL2_image REQUIRED)
|
||||
#include_directories(${SDL2_IMAGE_INCLUDE_DIRS})
|
||||
find_package(OpenGL REQUIRED)
|
||||
include_directories({$OPENGL_INCLUDE_DIRS})
|
||||
find_package(glm REQUIRED)
|
||||
target_link_libraries(SDL3D PUBLIC glm::glm SDL2::SDL2 ${OPENGL_LIBRARIES})
|
||||
find_package(ReWindow REQUIRED)
|
||||
target_link_libraries(SDL3D PUBLIC glm::glm SDL2::SDL2 ReWindow ${OPENGL_LIBRARIES})
|
||||
add_executable(SDL3D_Demo "include/demo/main.cpp")
|
||||
target_link_libraries(SDL3D_Demo PUBLIC SDL3D)
|
@@ -5,7 +5,7 @@
|
||||
class App
|
||||
{
|
||||
public:
|
||||
int Status;
|
||||
int status;
|
||||
virtual void Run()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
int main(int argc, char** argv) {
|
||||
auto* app = new glDemoGameApp();
|
||||
app->Run();
|
||||
return app->Status;
|
||||
return app->status;
|
||||
}
|
||||
|
||||
#define WINDOWS_SMH
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include <fstream>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include <rewindow/types/window.h>
|
||||
enum class GAMESTATE: uint8_t {
|
||||
NORMAL = 0, //Gameplay.
|
||||
IN_MAIN_MENU = 1,
|
||||
@@ -17,6 +17,7 @@ enum class GAMESTATE: uint8_t {
|
||||
|
||||
class Engine {
|
||||
public:
|
||||
RWindow window1;
|
||||
GAMESTATE gameState = GAMESTATE::NORMAL;
|
||||
bool debug = true;
|
||||
SDL_Window *window = nullptr;
|
||||
|
@@ -7,7 +7,6 @@
|
||||
#include <types/skybox.h>
|
||||
#include <types/entityList.h>
|
||||
|
||||
|
||||
void process_sdl_events() {
|
||||
while (SDL_PollEvent(&engine->event)) {
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include <glm/glm.hpp>
|
||||
#include "entityList.h"
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "glm/ext/matrix_transform.hpp"
|
||||
|
||||
enum class CameraMode: uint8_t {
|
||||
|
Reference in New Issue
Block a user