Pre loader

Hardware accelerated rendering check in JavaScript

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

Version
3.3.592
  • You must to post comments
0
0

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.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.