Пример #1
0
        private void Glview_Load(object sender, EventArgs e)
        {
            ViewContext.VerifyContext(glview);
            ViewContext.Context.MakeCurrent(glview.WindowInfo);

            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);

            if (quad == null)
            {
                quad = new FullScreenQuad();
            }

            if (processor == null)
            {
                processor = new PreviewProcessor();
            }

            blankTexture = new GLTextuer2D(GLInterfaces.PixelInternalFormat.Rgb);
            blankTexture.Bind();
            blankTexture.SetData(IntPtr.Zero, GLInterfaces.PixelFormat.Rgb, 16, 16);
            GLTextuer2D.Unbind();

            Invalidate();
        }
Пример #2
0
        private void Glview_Load(object sender, EventArgs e)
        {
            ViewContext.VerifyContext(glview);
            ViewContext.Context.MakeCurrent(glview.WindowInfo);

            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);

            if (quad == null)
            {
                quad = new FullScreenQuad();
            }

            if (processor == null)
            {
                processor = new PreviewProcessor();
            }

            Invalidate();
        }