Пример #1
0
        public void FromValidSource()
        {
            var source = RenderTestUtils.ResourceShaders.GetShaderSource("valid.frag");
            var shader = new ShaderObject(source, ShaderType.FragmentShader);

            Assert.AreEqual("", shader.GetInfoLog());
        }
Пример #2
0
        public void FromInvalidSource()
        {
            // The logs are driver dependent, so just check that it produces some sort of error message.
            var source = RenderTestUtils.ResourceShaders.GetShaderSource("invalid.frag");
            var shader = new ShaderObject(source, ShaderType.FragmentShader);

            Assert.IsTrue(shader.GetInfoLog().ToLower().Contains("error"));
        }
Пример #3
0
        public void FromNullSource()
        {
            var shader = new ShaderObject("", ShaderType.FragmentShader);

            Assert.AreEqual("", shader.GetInfoLog());
        }