current changes
This commit is contained in:
@@ -3,6 +3,11 @@ project(DarkRP2D)
|
|||||||
set (CMAKE_CXX_STANDARD 11)
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
add_definitions(-DNDEBUG)
|
||||||
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
# Download automatically, you can also just copy the conan.cmake file
|
# Download automatically, you can also just copy the conan.cmake file
|
||||||
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
|
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
|
||||||
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
|
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
|
||||||
@@ -16,10 +21,6 @@ conan_cmake_run(CONANFILE conanfile.txt
|
|||||||
BASIC_SETUP CMAKE_TARGETS
|
BASIC_SETUP CMAKE_TARGETS
|
||||||
BUILD missing)
|
BUILD missing)
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
|
||||||
add_definitions(-DNDEBUG)
|
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
|
||||||
|
|
||||||
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
|
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
|
||||||
MESSAGE( STATUS "DarkRP2D_SOURCE_DIR: " ${DarkRP2D_SOURCE_DIR} )
|
MESSAGE( STATUS "DarkRP2D_SOURCE_DIR: " ${DarkRP2D_SOURCE_DIR} )
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[requires]
|
[requires]
|
||||||
|
GameEngine/0.0.1@gulum/stable
|
||||||
box2d/2.3.1@conan/stable
|
box2d/2.3.1@conan/stable
|
||||||
glm/0.9.9.1@g-truc/stable
|
glm/0.9.9.1@g-truc/stable
|
||||||
EntityX/1.1.2@gulum/stable
|
EntityX/1.1.2@gulum/stable
|
||||||
@@ -7,9 +8,11 @@ sdl2/2.0.9@bincrafters/stable
|
|||||||
sdl2_image/2.0.4@bincrafters/stable
|
sdl2_image/2.0.4@bincrafters/stable
|
||||||
glew/2.1.0@bincrafters/stable
|
glew/2.1.0@bincrafters/stable
|
||||||
imgui/1.63@bincrafters/stable
|
imgui/1.63@bincrafters/stable
|
||||||
|
vscodepropertiesgen/0.1@mkovalchik/stable
|
||||||
|
|
||||||
[generators]
|
[generators]
|
||||||
cmake
|
cmake
|
||||||
|
VSCodeProperties
|
||||||
|
|
||||||
[imports]
|
[imports]
|
||||||
bin, *.dll -> ./bin # Copies all dll files from packages bin folder to my "./" folder
|
bin, *.dll -> ./bin # Copies all dll files from packages bin folder to my "./" folder
|
||||||
@@ -80,7 +80,6 @@ void DarkRP2D::render(unsigned int delta)
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
ImGui_ImplSdlGL3_NewFrame(gWindow);
|
ImGui_ImplSdlGL3_NewFrame(gWindow);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//texttest
|
//texttest
|
||||||
Shader bitmapShader = assets->getShader("bitmapShader");
|
Shader bitmapShader = assets->getShader("bitmapShader");
|
||||||
font->drawText(bitmapShader, "Hallo du noob", 25.0f, 25.0f, 1.f, glm::vec3(0.5f, 0.8f, 0.2f));
|
font->drawText(bitmapShader, "Hallo du noob", 25.0f, 25.0f, 1.f, glm::vec3(0.5f, 0.8f, 0.2f));
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#include "DarkRP2D.h"
|
#include "DarkRP2D.h"
|
||||||
#include "Utility.h"
|
#include "Utility.h"
|
||||||
|
|
||||||
|
#include <GameEngine.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static SDL_Window *gWindow = NULL;
|
static SDL_Window *gWindow = NULL;
|
||||||
@@ -17,7 +19,35 @@ static bool gameQuit = false;
|
|||||||
void dispose();
|
void dispose();
|
||||||
bool initSDL();
|
bool initSDL();
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
class DarkRP2DD : public GE::Application
|
||||||
|
{
|
||||||
|
void create() override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void update() override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void render() override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void resize() override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GE::Application* CreateApplication()
|
||||||
|
{
|
||||||
|
return new DarkRP2DD();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//Init SDL_Window, SDL_Surface, SDL_Renderer
|
//Init SDL_Window, SDL_Surface, SDL_Renderer
|
||||||
if (!initSDL())
|
if (!initSDL())
|
||||||
@@ -40,7 +70,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
dispose();
|
dispose();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void Game::exit()
|
void Game::exit()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -85,8 +85,6 @@ void Utility::Debug::ImGuiLogger::Draw(const char *title, bool *p_open)
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //NDEBUG
|
|
||||||
|
|
||||||
void APIENTRY Utility::openglCallbackFunction(GLenum source,
|
void APIENTRY Utility::openglCallbackFunction(GLenum source,
|
||||||
GLenum type,
|
GLenum type,
|
||||||
GLuint id,
|
GLuint id,
|
||||||
@@ -153,6 +151,7 @@ void APIENTRY Utility::openglCallbackFunction(GLenum source,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif //NDEBUG
|
||||||
|
|
||||||
static const char *Errornames[] = {"OpenGL", "SDL", "GLEW", "Other"};
|
static const char *Errornames[] = {"OpenGL", "SDL", "GLEW", "Other"};
|
||||||
void Utility::printWarning(ERROR_TYPE type, std::string msg)
|
void Utility::printWarning(ERROR_TYPE type, std::string msg)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef UTILITY_H
|
#pragma once
|
||||||
#define UTILITY_H
|
|
||||||
|
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -13,10 +12,10 @@
|
|||||||
namespace Utility
|
namespace Utility
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
namespace Debug
|
namespace Debug
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
// Usage:
|
// Usage:
|
||||||
// static ExampleAppLog my_log;
|
// static ExampleAppLog my_log;
|
||||||
// my_log.AddLog("Hello %d world\n", 123);
|
// my_log.AddLog("Hello %d world\n", 123);
|
||||||
@@ -45,9 +44,9 @@ struct ImGuiLogger
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern ImGuiLogger openGLLogger;
|
extern ImGuiLogger openGLLogger;
|
||||||
|
|
||||||
} // namespace Debug
|
|
||||||
#endif //NDEBUG
|
#endif //NDEBUG
|
||||||
|
} // namespace Debug
|
||||||
|
|
||||||
|
|
||||||
enum ERROR_TYPE
|
enum ERROR_TYPE
|
||||||
{
|
{
|
||||||
@@ -72,4 +71,3 @@ void printError(ERROR_TYPE type, std::string msg);
|
|||||||
void printInfo(ERROR_TYPE type, std::string msg);
|
void printInfo(ERROR_TYPE type, std::string msg);
|
||||||
|
|
||||||
} // namespace Utility
|
} // namespace Utility
|
||||||
#endif // UTILITY_H
|
|
||||||
|
|||||||
Reference in New Issue
Block a user