huww98 / TimeChart

An chart library specialized for large-scale time-series data, built on WebGL.
https://huww98.github.io/TimeChart
MIT License
365 stars 31 forks source link

Chart rendering broken on Mac #57

Closed leonard84 closed 2 years ago

leonard84 commented 2 years ago

The changes in #53 seems to have broken rendering on mac for FF and Chrome.

I tested it with the latest FF 105.0.3 and Chrome 106.0.5249.103 on Mac and it doesn't show up. It works with Safari 16.0 (17614.1.25.9.10, 17614) on Mac, or FF on windows.

Chrome chrome://gpu report for mac says WebGL2 is enabled.

Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Metal: Disabled
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Disabled

I can also see the spinning cube in a webgl 2 test page https://get.webgl.org/webgl2/

leonard84 commented 2 years ago

Here is an example, it does render the current value point though. The result is the same, regardless of which line style was selected.

FF

image

Chrome

image
huww98 commented 2 years ago

Could you please share the error message from console? I don't have Mac to reproduce this issue

leonard84 commented 2 years ago

There is only a warning

FF: WebGL warning: drawArraysInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE.

Chrome: line_style.html:1 [.WebGL-0x12400dd9c00] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small.

huww98 commented 2 years ago

OK, I think I know the problem. Will try to fix it soon.

huww98 commented 2 years ago

I've just pushed a new version to master. Please verify whether it fixes this issue.

huww98 commented 2 years ago

it does render the current value point though

Because that small circle is rendered by SVG. The lines are rendered by WebGL

leonard84 commented 2 years ago

The fix works, thanks.

Could you release a new beta version with the fix?