コード例 #1
0
        internal void CheckStatus()
        {
            FramebufferErrorCode error = 0;

            if (graphicsDevice.OpenGLCapabilities.DirectStateAccess == DirectStateAccess.None)
            {
                graphicsDevice.BindManager.Fbo = this;
                error = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer);
            }
            else if (graphicsDevice.OpenGLCapabilities.DirectStateAccess == DirectStateAccess.Extension)
            {
                error = (FramebufferErrorCode)Ext.CheckNamedFramebufferStatus(FboID, OpenTK.Graphics.OpenGL.FramebufferTarget.Framebuffer);
            }

            if (error != FramebufferErrorCode.FramebufferComplete)
            {
                throw new GraphicsException(error.ToString());
            }
        }