Skip to content
Snippets Groups Projects
Commit 9e2ef876 authored by Alexander Rose's avatar Alexander Rose
Browse files

don't use Mesh.uniformTriangleGroup when WebGL2 is available

parent f2342c32
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ async function createGaussianSurfaceMesh(ctx: VisualContext, unit: Unit, structu
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime)
Mesh.transformImmediate(surface, transform)
Mesh.uniformTriangleGroup(surface)
if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface)
return surface
}
......@@ -91,7 +91,7 @@ async function createStructureGaussianSurfaceMesh(ctx: VisualContext, structure:
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime)
Mesh.transformImmediate(surface, transform)
Mesh.uniformTriangleGroup(surface)
if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface)
return surface
}
......
......@@ -37,7 +37,7 @@ async function createMolecularSurfaceMesh(ctx: VisualContext, unit: Unit, struct
const surface = await computeMarchingCubesMesh(params, mesh).runAsChild(ctx.runtime)
Mesh.transformImmediate(surface, transform)
Mesh.uniformTriangleGroup(surface)
if (ctx.webgl && !ctx.webgl.isWebGL2) Mesh.uniformTriangleGroup(surface)
return surface
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment