diff --git a/src/rendering/twn_draw_c.h b/src/rendering/twn_draw_c.h index 26264f9..9029341 100644 --- a/src/rendering/twn_draw_c.h +++ b/src/rendering/twn_draw_c.h @@ -37,6 +37,8 @@ enum { TWN_UNSIGNED_BYTE, }; +/* note: they're separate as on some targets they are not interchangeable like in opengl */ +/* emscripten legacy gl emulation, for example, assumes first bind to be decisive in its future usage */ typedef uint32_t VertexBuffer; typedef uint32_t IndexBuffer; diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index 79a70f4..ea80333 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -14,6 +14,10 @@ #endif #include +/* note: care must be taken to always have interleaved VBOs with all data, */ +/* as it is optimized in emscripten legacy gl emulation. */ +/* constant color isn't supported there, so care must be given to provide alternative path with VBO as well. */ + static TextureMode texture_mode_last_used = TEXTURE_MODE_UNKNOWN; static Pipeline pipeline_last_used = PIPELINE_NO;