예제 #1
0
 public void Draw(GeometricPrimitives gp, int start, int count)
 {
     if (start < 0 || start + count > ElementCount)
     {
         throw new IndexOutOfRangeException();
     }
     Use(() => GL.DrawElements((PrimitiveType)gp, count, DrawElementsType.UnsignedInt, start));
 }
예제 #2
0
 public void Draw(GeometricPrimitives gp, int start, int count)
 {
     if (start < 0 || start + count > VertexCount)
     {
         throw new IndexOutOfRangeException();
     }
     Use(() => GL.DrawArrays((PrimitiveType)gp, start, count));
 }
예제 #3
0
        static VertexPositionTexture[] CreateQuadUv(Faces face)
        {
            var quad = GeometricPrimitives.GetQuad(face);
            var mesh = new VertexPositionTexture[quad.Length];

            for (var i = 0; i < quad.Length; i++)
            {
                mesh[i] = new VertexPositionTexture(quad[i], GeometricPrimitives.QuadUv[i]);
            }
            return(mesh);
        }
예제 #4
0
파일: Model.cs 프로젝트: pokornym/rocket
 public Model(GeometricPrimitives prim = GeometricPrimitives.Triangles) => _primitive = prim;
예제 #5
0
 public void Draw(GeometricPrimitives gp, int count)
 {
     Draw(gp, 0, count);
 }
예제 #6
0
 public void Draw(GeometricPrimitives gp)
 {
     Draw(gp, 0, ElementCount);
 }
예제 #7
0
 public void Draw(GeometricPrimitives gp)
 {
     Draw(gp, 0, VertexCount);
 }
예제 #8
0
파일: Face.cs 프로젝트: pokornym/rocket
 public Face(IVertexRenderer ic, GeometricPrimitives pr)
 {
     Indices   = ic ?? throw new ArgumentNullException(nameof(ic));
     Primitive = pr;
 }