diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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(); |