Ejemplo n.º 1
0
        public void RoundUp_2Bytes_2_2()
        {
            const ulong ELEMENT_SIZE = 2UL;
            var         actual       = MgOptimizedStoragePartitionVerifier.UpperBounded(2UL, ELEMENT_SIZE);

            Assert.AreEqual(2UL, actual);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //const string modelFilePath = "glTF/TriangleWithoutIndices.gltf";
            const string modelFilePath = "glTF/Triangle.gltf";

            // collate attributes to allocations
            var partition = new MockPartition();

            partition.ReturnValue = 0;
            partition.IsValid     = true;
            IMgGraphicsConfiguration config = new MockGraphicsConfiguration(partition);

            IMgPlatformMemoryLayout              layout    = new WGLPlatformMemoryLayout();
            IMgOptimizedStoragePartitioner       segmenter = new MgOptimizedStoragePartitioner(layout);
            IMgOptimizedStoragePartitionVerifier verifier  = new MgOptimizedStoragePartitionVerifier(config);
            var builder = new MgOptimizedStorageBuilder(
                config,
                segmenter,
                verifier);

            IGltfModelLoader loader = new GltfModelLoader(config, builder);
            var effect = new OrdinaryEffect();

            loader.Load(effect, modelFilePath);

            Console.ReadKey();
        }
Ejemplo n.º 3
0
        public void RoundUp_4Bytes_63_64()
        {
            const ulong ELEMENT_SIZE = 4UL;
            var         actual       = MgOptimizedStoragePartitionVerifier.UpperBounded(63, ELEMENT_SIZE);

            Assert.AreEqual(64UL, actual);
        }