示例#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();
        }
示例#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();
        }
示例#3
0
        public void Shutdown()
        {
            _veldridComponents.ReleaseResources();

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