コード例 #1
0
ファイル: VertexDeclTest.cs プロジェクト: HaKDMoDz/Irelia
        public void VertexDecl_CreateTest()
        {
            VertexDecl vdecl = new VertexDecl(device, null);
            Assert.IsNull(vdecl.RawDecl);

            // Vertex elements without VertexDeclarationEnd
            VertexElement[] vertexElems = new[] {
                new VertexElement(0, 0, DeclarationType.Float4, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0)};
            vdecl = new VertexDecl(device, vertexElems);
            Assert.IsNull(vdecl.RawDecl);
        }
コード例 #2
0
ファイル: VertexDeclTest.cs プロジェクト: HaKDMoDz/Irelia
        public void VertexDecl_ConstructorTest()
        {
            VertexElement[] vertexElems = new[] {
                new VertexElement(0, 0, DeclarationType.Float4, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0),
                new VertexElement(0, 16, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0),
                VertexElement.VertexDeclarationEnd
            };

            VertexDecl vdecl = new VertexDecl(device, vertexElems);
            Assert.IsNotNull(vdecl.RawDecl);
        }