Example #1
0
        public virtual float GetDepth(int x, int y)
        {
            float val;

            _context.Capture();
            _context.glReadPixels(x, Height - y, 1, 1, GLPixelDataFormat.DEPTH_COMPONENT, GLPixelDataType.FLOAT, &val);
            return(val);
        }
Example #2
0
        protected override void OnLoad(EventArgs e)
        {
            _context = GLContext.Attach(this);

            _context.Capture();
            OnInit();
            _context.Release();

            base.OnLoad(e);
        }