private void GroupContainersCreateRenderMeshes(List <IndexedVertexData <MeleeVertex> > vertexContainers) { var optimizedContainers = MeshBatchUtils.GroupContainersByPrimitiveType(vertexContainers); foreach (var container in optimizedContainers) { MeleeMesh meleeMesh = new MeleeMesh(container.Vertices, container.Indices, container.PrimitiveType); renderMeshes.Add(meleeMesh); } }
private static void DrawModelSelection(MeleeMesh mesh, Shader shader) { //This part needs to be reworked for proper outline. Currently would make model disappear mesh.Draw(shader); GL.Enable(EnableCap.StencilTest); // use vertex color for wireframe color shader.SetInt("colorOverride", 1); GL.PolygonMode(MaterialFace.Back, PolygonMode.Line); GL.Enable(EnableCap.LineSmooth); GL.LineWidth(1.5f); mesh.Draw(shader); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill); shader.SetInt("colorOverride", 0); GL.Enable(EnableCap.DepthTest); }