From 7cfb7ce652d1c13ab72392d95dc93d967bf505fb Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Sun, 14 Aug 2022 12:38:08 -0400 Subject: concave masking; software anti aliasing --- main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 84d3559..2153ae6 100644 --- a/main.cpp +++ b/main.cpp @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) { InitMemoryTable(&GlobalMemory, &Memory, 10 * 1024 * 1024, F_Strings, "Strings"); InitMemoryTable(&GlobalMemory, &Memory, (uint64)200 * 1024 * 1024, B_LayerBitmaps, "Layer buffer"); - InitMemoryTable(&GlobalMemory, &Memory, (uint64)200 * 1024 * 1024, B_LoadedBitmaps, "Loaded bitmap buffer"); + InitMemoryTable(&GlobalMemory, &Memory, (uint64)600 * 1024 * 1024, B_LoadedBitmaps, "Loaded bitmap buffer"); Memory.Scratch = AllocateMemory(&Memory, (uint64)64*1024*1024, B_LayerBitmaps); @@ -509,7 +509,12 @@ int main(int argc, char *argv[]) { } } #else - OutputToViewport(&CompBuffer, &State, textureID); + 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); #endif ImGui::Render(); -- cgit v1.2.3