tryCreate static method

GlFinishSamplerProfiler? tryCreate(
  1. dynamic gl, {
  2. int stride = 30,
})

Attempts to create a glFinish sampler profiler if supported.

Implementation

static GlFinishSamplerProfiler? tryCreate(dynamic gl, {int stride = 30}) {
  try {
    if (gl.gl?.glFinish == null) return null;
    return GlFinishSamplerProfiler._(gl, stride);
  } catch (_) {
    return null;
  }
}