Example #1
0
        /// <summary>
        /// Create an empty framebuffer object.
        /// </summary>
        public Framebuffer()
        {
            if (glGenFramebuffers == null)
            {
                glGenFramebuffers      = OpenGL.GetDelegateFor <OpenGL.glGenFramebuffers>();
                glBindFramebuffer      = OpenGL.GetDelegateFor <OpenGL.glBindFramebuffer>();
                glFramebufferTexture2D = OpenGL.GetDelegateFor <OpenGL.glFramebufferTexture2D>();
                //glDrawBuffers = OpenGL.GetDelegateFor<OpenGL.glDrawBuffers>();
                glFramebufferRenderbuffer = OpenGL.GetDelegateFor <OpenGL.glFramebufferRenderbuffer>();
                glFramebufferParameteri   = OpenGL.GetDelegateFor <OpenGL.glFramebufferParameteri>();
                glCheckFramebufferStatus  = OpenGL.GetDelegateFor <OpenGL.glCheckFramebufferStatus>();
            }

            glGenFramebuffers(1, frameBuffer);
        }
Example #2
0
        /// <summary>
        /// Create an empty framebuffer object.
        /// </summary>
        public Framebuffer()
        {
            if (glGenFramebuffers == null)
            {
                glGenFramebuffers = OpenGL.GetDelegateFor<OpenGL.glGenFramebuffers>();
                glBindFramebuffer = OpenGL.GetDelegateFor<OpenGL.glBindFramebuffer>();
                glFramebufferTexture2D = OpenGL.GetDelegateFor<OpenGL.glFramebufferTexture2D>();
                //glDrawBuffers = OpenGL.GetDelegateFor<OpenGL.glDrawBuffers>();
                glFramebufferRenderbuffer = OpenGL.GetDelegateFor<OpenGL.glFramebufferRenderbuffer>();
                glFramebufferParameteri = OpenGL.GetDelegateFor<OpenGL.glFramebufferParameteri>();
                glCheckFramebufferStatus = OpenGL.GetDelegateFor<OpenGL.glCheckFramebufferStatus>();
            }

            glGenFramebuffers(1, frameBuffer);
        }