예제 #1
0
        public BasicFbo(RenderTargetManager textureManager, Vector2I size)
        {
            AttachTexture(FramebufferAttachment.DepthAttachment, textureManager.Get <RenderTargetDepthTexture>(size)); // Must be first due to error checking
            AttachTexture(FramebufferAttachment.ColorAttachment0, textureManager.Get <RenderTargetColorTexture>(size));

            FramebufferErrorCode err = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer);

            Debug.Assert(err == FramebufferErrorCode.FramebufferComplete, "Framebuffer error: " + err);
        }
예제 #2
0
        public BasicFboMultisample(RenderTargetManager renderTargetManager, Vector2I size, int multisampleCount)
        {
            MultisampleCount = multisampleCount;

            AttachTexture(FramebufferAttachment.DepthAttachment, renderTargetManager.Get <RenderTargetDepthTextureMultisample>(size, multisampleCount)); // Must be first due to error checking
            AttachTexture(FramebufferAttachment.ColorAttachment0, renderTargetManager.Get <RenderTargetColorTextureMultisample>(size, multisampleCount));

            FramebufferErrorCode err = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer);

            Debug.Assert(err == FramebufferErrorCode.FramebufferComplete, "Framebuffer error: " + err);
        }