diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-08 13:50:34 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-08 13:50:34 -0400 |
commit | 635576972024319c15141645d3304db8cd1d1e19 (patch) | |
tree | 425bcebd621449cd89973fbf4803c22a9b83a335 /main.cpp | |
parent | bccb1d61907fea45c5e84b29499989f7cee104a5 (diff) |
basic bezier path system added
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -1,3 +1,5 @@ +#include <glad/glad.h> + #include <unistd.h> #include <stdio.h> #if WINDOWS @@ -11,6 +13,7 @@ #include <smmintrin.h> #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; |