diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-18 23:11:29 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-18 23:11:29 -0400 |
commit | 8c5f06c37f3c267ecd8f867cd49765c366b5f47c (patch) | |
tree | f8ec31daa1e050c0f5205d32cebe68ce5df65f6f /main.cpp | |
parent | 9062e0aae9f2f576b7a237c28028aa6b09feee5e (diff) |
many additions
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 30 |
1 files changed, 4 insertions, 26 deletions
@@ -14,7 +14,6 @@ #include <smmintrin.h> #endif - #include "imgui/imgui.h" #include "imgui/backends/imgui_impl_sdl.h" #include "imgui/backends/imgui_impl_opengl3.h" @@ -33,13 +32,6 @@ #define STBI_FAILURE_USERMSG #include "lib/stb_image.h" -#if 0 -#include <iacaMarks.h> -#else -#define IACA_START -#define IACA_END -#endif - #include "defines.h" #include "my_math.h" #include "main.h" @@ -67,7 +59,6 @@ SDL_sem *Semaphore; #include "bezier.cpp" #if THREADED #include "threading.cpp" -#else #endif #include "prenderer.cpp" #include "ffmpeg_backend.cpp" @@ -508,26 +499,13 @@ int main(int argc, char *argv[]) { } C = SDL_AtomicGet(&CompletedEntries); if (C == 16) { - Bitmap_ConvertPacking(CompBuffer.PackedBuffer, CompBuffer.UnpackedBuffer, - CompBuffer.Width, CompBuffer.Height, CompBuffer.BytesPerPixel, 1); - EndRenderState(&State); - glBindTexture(GL_TEXTURE_2D, textureID); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, CompBuffer.Width, CompBuffer.Height, GL_RGBA, GL_UNSIGNED_BYTE, - CompBuffer.UnpackedBuffer); - - // shmp->shared_framenumber = File.CurrentFrame; - // if (sem_post(&shmp->sem2) == -1) - // Assert(0); - + FinishRenderAndUpload(&State, &CompBuffer, textureID); } } #else - Bitmap_ConvertPacking(CompBuffer.PackedBuffer, CompBuffer.UnpackedBuffer, - CompBuffer.Width, CompBuffer.Height, CompBuffer.BytesPerPixel, 1); - EndRenderState(&State); - glBindTexture(GL_TEXTURE_2D, textureID); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, CompBuffer.Width, CompBuffer.Height, GL_RGBA, GL_UNSIGNED_BYTE, - CompBuffer.UnpackedBuffer); + if (IsRendering) { + FinishRenderAndUpload(&State, &CompBuffer, textureID); + } #endif ImGui::Render(); |