コード例 #1
0
ファイル: FrameBuffer.cs プロジェクト: Phyyl/Vildmark
        protected FrameBuffer(int width, int height, FramebufferAttachment framebufferAttachment, TextureOptions options)
        {
            GLFramebuffer = new GLFramebuffer();
            GLTexture     = new GLTexture2D(width, height, options: options);

            GLFramebuffer.Bind();
            GLFramebuffer.SetTexture(GLTexture, framebufferAttachment);
            InitializeReadBuffer(width, height);
            InitializeDrawBuffer(width, height);
            GLFramebuffer.Unbind();
        }
コード例 #2
0
ファイル: FrameBuffer.cs プロジェクト: Phyyl/Vildmark
        public void Bind()
        {
            GLFramebuffer.Bind();

            GL.Viewport(0, 0, GLTexture.Width, GLTexture.Height);
        }