Hello,
Is there an equivalent JavaScript way to check if the hardware acceleration is enabled?
This snippet is from the WPF documentation.
Hardware-accelerated rendering check
if (sciChartSurface.RenderSurface.GetType() == typeof (VisualXcceleratorRenderSurface))
{
// Hardware-accelerated rendering is enabled!
}
If there is no hardware acceleration in the browser available we do not want to render the SciChart surface.
Best,
Kras
- Krasimir Petrov asked 5 months ago
- last edited 4 months ago
- You must login to post comments
Hello, SciChart.js uses WebGL in its core. So to prevent an unexpected error, ideally, you can add an appropriate check and handling:
import { WebGlHelper } from "scichart";
// ...
WebGlHelper.initialize()
const webGlSupport = WebGlHelper.getWebGlSupport()
if (webGlSupport === EWebGLSupport.NoWebGL) {
// ...
}
Also, FYI, we have a related task in our backlog https://abtsoftware.myjetbrains.com/youtrack/issue/SCJS-1423/Show-fallback-UI-when-WebGL-is-not-supported-or-detected-not-crash
It still requires some consideration on how it should be implemented.
Let us know if that’s what you were looking for, or otherwise, what use case you want to handle.
- Jim Risen answered 5 months ago
- You must login to post comments
Please login first to submit.