see ya later allocator
This commit is contained in:
parent
d7bc7e10ab
commit
aa53a4addb
44 changed files with 32 additions and 1693 deletions
|
|
@ -10,7 +10,7 @@ file(GLOB HEADERS "./public/*.hpp")
|
|||
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ./public/)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${BINDINGS_INCLUDE})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Math Allocators)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Math)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${BINDINGS_LIBS})
|
||||
|
||||
### -------------------------- Examples -------------------------- ###
|
||||
|
|
|
|||
|
|
@ -21,18 +21,6 @@ public:
|
|||
};
|
||||
|
||||
int main() {
|
||||
|
||||
ModuleManifest* deps[] = { &gModuleGraphics, nullptr };
|
||||
ModuleManifest module("Eample", nullptr, nullptr, deps);
|
||||
|
||||
if (!module.initialize()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
ExampleApplication app;
|
||||
app.run();
|
||||
}
|
||||
|
||||
module.deinitialize();
|
||||
ExampleApplication app;
|
||||
app.run();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
#include "Window.hpp"
|
||||
#include "WindowContext.hpp"
|
||||
|
||||
#include "Allocators.hpp"
|
||||
|
||||
#include "Graphics.hpp"
|
||||
|
||||
// -------- Debug UI -------- //
|
||||
|
|
@ -50,13 +48,9 @@ DebugGUI::~DebugGUI() {
|
|||
}
|
||||
|
||||
void DebugGUI::drawBegin() {
|
||||
tp::HeapAllocGlobal::startIgnore();
|
||||
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
tp::HeapAllocGlobal::stopIgnore();
|
||||
}
|
||||
|
||||
void DebugGUI::drawEnd() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
#include "Window.hpp"
|
||||
#include "WindowContext.hpp"
|
||||
#include "Allocators.hpp"
|
||||
|
||||
#include "Rect.hpp"
|
||||
|
||||
|
|
@ -18,11 +17,6 @@
|
|||
#include <GLFW/glfw3.h>
|
||||
#include <cstdio>
|
||||
|
||||
namespace tp {
|
||||
static ModuleManifest* deps[] = { &gModuleAllocators, nullptr };
|
||||
ModuleManifest gModuleGraphics = ModuleManifest("Graphics", nullptr, nullptr, deps);
|
||||
}
|
||||
|
||||
using namespace tp;
|
||||
|
||||
static void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
||||
|
|
@ -62,8 +56,6 @@ Window::~Window() {
|
|||
}
|
||||
|
||||
Window* Window::createWindow(Vec2F size, const char* title) {
|
||||
HeapAllocGlobal::startIgnore();
|
||||
|
||||
static int count = 1;
|
||||
if (!count) {
|
||||
printf("Window class is a singleton\n");
|
||||
|
|
@ -82,7 +74,6 @@ Window* Window::createWindow(Vec2F size, const char* title) {
|
|||
|
||||
auto out = new Window(size, title);
|
||||
|
||||
HeapAllocGlobal::stopIgnore();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
#include "EventHandler.hpp"
|
||||
|
||||
namespace tp {
|
||||
|
||||
extern ModuleManifest gModuleGraphics;
|
||||
|
||||
class Window {
|
||||
class Context;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue