From 635576972024319c15141645d3304db8cd1d1e19 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Mon, 8 Aug 2022 13:50:34 -0400 Subject: basic bezier path system added --- main.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 01b051d..da67593 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,5 @@ +#include + #include #include #if WINDOWS @@ -11,6 +13,7 @@ #include #endif + #include "imgui/imgui.h" #include "imgui/backends/imgui_impl_sdl.h" #include "imgui/backends/imgui_impl_opengl3.h" @@ -68,6 +71,8 @@ SDL_sem *Semaphore; #include "bitmap_calls.cpp" #include "createcalls.cpp" #include "my_imgui_widgets.cpp" +#include "gl_calls.cpp" + static void MainFunction(main_sdl *Main, memory *Memory, @@ -222,6 +227,7 @@ int main(int argc, char *argv[]) { InitMemoryTable(&GlobalMemory, &Memory, 10 * 1024 * 1024, P_AVInfo, "Image/video headers"); InitMemoryTable(&GlobalMemory, &Memory, 10 * 1024 * 1024, P_SourceBitmapTable, "Source bitmap tables"); + InitMemoryTable(&GlobalMemory, &Memory, 10 * 1024 * 1024, P_MiscCache, "Misc cache"); InitMemoryTable(&GlobalMemory, &Memory, 15 * 1024 * 1024, F_Layers, "Layers"); InitMemoryTable(&GlobalMemory, &Memory, 10 * 1024 * 1024, F_Effects, "Effects"); @@ -231,6 +237,8 @@ int main(int argc, char *argv[]) { InitMemoryTable(&GlobalMemory, &Memory, (uint64)200 * 1024 * 1024, B_LayerBitmaps, "Layer buffer"); InitMemoryTable(&GlobalMemory, &Memory, (uint64)200 * 1024 * 1024, B_LoadedBitmaps, "Loaded bitmap buffer"); + Memory.Scratch = AllocateMemory(&Memory, (uint64)64*1024*1024, B_LayerBitmaps); + project_state State = {}; if (SDL_HasSSE2()) { @@ -260,8 +268,6 @@ int main(int argc, char *argv[]) { effect as = {}; #endif - LoadTestFootage(&File, &State, &Memory); - uint16 BytesPerPixel = 4; comp_buffer CompBuffer = {}; CompBuffer.Width = File.Width; @@ -366,6 +372,19 @@ int main(int argc, char *argv[]) { SDL_GL_MakeCurrent(window, gl_context); SDL_GL_SetSwapInterval(1); // Enable vsync + if (!gladLoadGLLoader((GLADloadproc)SDL_GL_GetProcAddress)) + { + printf("Failed to initialize GLAD"); + return -1; + } + + TestGL_InitShader(); + TestGL_InitVerts(); + + LoadTestFootage(&File, &State, &Memory); + + SDL_GL_MakeCurrent(window, gl_context); + SDL_Event Event; IMGUI_CHECKVERSION(); @@ -401,6 +420,7 @@ int main(int argc, char *argv[]) { ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + while (State.IsRunning) { SDL_Event event; -- cgit v1.2.3