diff --git a/PCK-Studio/Rendering/Shader.cs b/PCK-Studio/Rendering/Shader.cs index 8a542cc6..67f2f613 100644 --- a/PCK-Studio/Rendering/Shader.cs +++ b/PCK-Studio/Rendering/Shader.cs @@ -114,12 +114,16 @@ namespace PckStudio.Rendering public bool Validate() { +#if DEBUG GL.ValidateProgram(_programId); GL.GetProgram(_programId, GetProgramParameterName.ValidateStatus, out int status); bool success = status != 0; if (!success) Debug.WriteLine(GL.GetProgramInfoLog(_programId), category: nameof(Shader)); return success; +#else + return true; +#endif } public static Shader Create(params ShaderSource[] shaderSources) diff --git a/PCK-Studio/Rendering/Texture/CubeTexture.cs b/PCK-Studio/Rendering/Texture/CubeTexture.cs index 50cda69b..2f5acadb 100644 --- a/PCK-Studio/Rendering/Texture/CubeTexture.cs +++ b/PCK-Studio/Rendering/Texture/CubeTexture.cs @@ -57,7 +57,6 @@ namespace PckStudio.Rendering.Texture BitmapData data = texture.LockBits(new Rectangle(Point.Empty, texture.Size), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); GL.TexImage2D(TextureTarget.TextureCubeMapPositiveX + i, 0, PixelInternalFormat.Rgb8, widthPerFace, heightPerFace, 0, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0); } - Unbind(); } } }