Add Emscripten to the draw cache decrease size assumption

This commit is contained in:
Yousef Khadadeh 2025-08-20 13:30:59 +03:00
parent ccec9c01eb
commit 9bcfcde0ed

View file

@ -230,7 +230,8 @@ void DrawingProgramCache::build_bvh_node_coords_and_resolution(DrawingProgramCac
// NOTE: We're assuming that devices using OpenGLES are mobile devices have less VRAM, so we decrease the size of the draw cache
// This isn't necessarily true, but it can improve performance on those devices without adding more settings
#ifdef USE_BACKEND_OPENGLES_3_0
// Emscripten has less RAM to work with, so this is a good assumption to make
#if defined(__EMSCRIPTEN__) || defined(USE_BACKEND_OPENGLES_3_0)
const int MAX_DIMENSION_RESOLUTION = 1024;
#else
const int MAX_DIMENSION_RESOLUTION = 2048;