fix text issue

This commit is contained in:
John Alanbrook 2024-09-07 00:11:34 -05:00
parent ec5e9249f0
commit 188c55a8e0
2 changed files with 5 additions and 5 deletions

View file

@ -842,7 +842,7 @@ render.flush_text = function()
if (textssbos.length < tdraw)
textssbos.push(render.make_textssbo());
var textssbo = textssbos.last();
var textssbo = textssbos[tdraw-1];
var amt = render.flushtext(textssbo); // load from buffer into ssbo
if (amt === 0) {
@ -873,11 +873,11 @@ render.cross.doc = "Draw a cross centered at pos, with arm length size.";
render.arrow.doc = "Draw an arrow from start to end, with wings of length wingspan at angle wingangle.";
render.rectangle.doc = "Draw a rectangle, with its corners at lowerleft and upperright.";
render.draw = function render_draw(mesh, ssbo, inst = 1)
render.draw = function render_draw(mesh, ssbo, inst = 1, e_start = 0)
{
sg_bind(mesh, ssbo);
profile.frame("gpu");
render.spdraw(cur.bind.count, inst);
render.spdraw(e_start, cur.bind.count, inst);
profile.endframe();
}

View file

@ -1135,7 +1135,7 @@ JSC_CCALL(render_make_t_ssbo,
)
JSC_CCALL(render_spdraw,
sg_draw(0,js2number(argv[0]),js2number(argv[1]));
sg_draw(js2number(argv[0]),js2number(argv[1]),js2number(argv[2]));
)
JSC_CCALL(render_setpipeline,
@ -1168,7 +1168,7 @@ static const JSCFunctionListEntry js_render_funcs[] = {
MIST_FUNC_DEF(render, pipeline, 1),
MIST_FUNC_DEF(render, setuniv3, 2),
MIST_FUNC_DEF(render, setuniv, 2),
MIST_FUNC_DEF(render, spdraw, 2),
MIST_FUNC_DEF(render, spdraw, 3),
MIST_FUNC_DEF(render, setunibones, 3),
MIST_FUNC_DEF(render, setbind, 1),
MIST_FUNC_DEF(render, setuniproj, 2),