zhobo63 / imgui-ts

JavaScript bindings for Dear ImGui using Emscripten and TypeScript, modularized with webpack
MIT License
32 stars 6 forks source link

WebGL 1 broken rendering because gl.UNSIGNED_INT is not supported without extension. #10

Open wadim-al opened 1 month ago

wadim-al commented 1 month ago

ImDrawIdxSize: number = 4 in imgui.ts causes switch(ImGui.DrawIdxSize) to select ixU=new Uint32Array which is not available in WebGl1. This results in garbled or invisible rendering when integrating into existing webgl1 context.

Uint16Array should be selected for webgl 1

Also if OES_element_index_uint extension is available, that path is not checked too.

zhobo63 commented 1 month ago

thanks. I haven't test webgl1 yet T_T