Ejemplo n.º 1
0
        public void FloatTextureBuilder_CatchesNullInput_ThrowsException()
        {
            ISystemComponents components = Substitute.For <ISystemComponents>();

            IFloatTextureBuilder builder = new FloatTextureBuilder(components);

            Assert.Throws <Yak2DException>(() => { builder.GenerateFloat32VeldridTextureFromPixelData(null, 100, 100); });

            components.ReleaseResources();
        }
Ejemplo n.º 2
0
        public void FloatTextureBuilder_CatchesInvalidInput_ThrowsExceptionIfDataSetAndSizesDoNotMatch()
        {
            ISystemComponents components = Substitute.For <ISystemComponents>();

            IFloatTextureBuilder builder = new FloatTextureBuilder(components);

            Assert.Throws <Yak2DException>(() => { builder.GenerateFloat32VeldridTextureFromPixelData(new float[100], 10, 9); });

            components.ReleaseResources();
        }
Ejemplo n.º 3
0
        public void Shutdown()
        {
            _veldridComponents.ReleaseResources();

            _frameworkMessenger.Shutdown();
            _fontManager.Shutdown();
            _graphicsShutdownManager.Shutdown();
            _gpuSurfaceManager.Shutdown();
            _sdl2EventProcessor.Shutdown();
        }