shithub: cstory

Download patch

ref: d84f64a5a9cece9e6f5842f589db0604be537f4b
parent: eb6ab89b85684308f2e5c41c0ca70fbdb52a9bdb
author: Clownacy <[email protected]>
date: Sat Feb 1 19:10:01 EST 2020

Tweak cute_spritebatch settings

1024x1024 seems like overkill

--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -397,7 +397,6 @@
 	}
 
 	VertexBufferSlot *vertex_buffer_slot = GetVertexBufferSlot(count);
-	printf("%d\n", count);
 
 	for (int i = 0; i < count; ++i)
 	{
@@ -460,9 +459,6 @@
 {
 	(void)udata;
 
-//	printf("%d\n", w);
-//	printf("%d\n\n", h);
-
 	GLint previously_bound_texture;
 	glGetIntegerv(GL_TEXTURE_BINDING_2D, &previously_bound_texture);
 
@@ -611,7 +607,9 @@
 							spritebatch_config_t config;
 							spritebatch_set_default_config(&config);
 							config.pixel_stride = 1;
-							config.lonely_buffer_count_till_flush = 0; // Start making atlases immediately
+							config.atlas_width_in_pixels = 256;
+							config.atlas_height_in_pixels = 256;
+							config.lonely_buffer_count_till_flush = 4; // Start making atlases immediately
 							config.ticks_to_decay_texture = 100;       // If a glyph hasn't been used for the past 100 draws, destroy it
 							config.batch_callback = GlyphBatch_Draw;
 							config.get_pixels_callback = GlyphBatch_GetPixels;
--- a/src/Backends/Rendering/SDLTexture.cpp
+++ b/src/Backends/Rendering/SDLTexture.cpp
@@ -173,7 +173,9 @@
 				spritebatch_config_t config;
 				spritebatch_set_default_config(&config);
 				config.pixel_stride = 4;
-				config.lonely_buffer_count_till_flush = 0; // Start making atlases immediately
+				config.atlas_width_in_pixels = 256;
+				config.atlas_height_in_pixels = 256;
+				config.lonely_buffer_count_till_flush = 4; // Start making atlases immediately
 				config.ticks_to_decay_texture = 100;       // If a glyph hasn't been used for the past 100 draws, destroy it
 				config.batch_callback = GlyphBatch_Draw;
 				config.get_pixels_callback = GlyphBatch_GetPixels;