Esempio n. 1
0
        private void InitializeWindow()
        {
            _nativeDisplay = EGLDC.GetDC(_handle);

            IntPtr requestedRenderer = _nativeDisplay;

            /*if (requestedRenderer == RENDERER_D3D11)
             * {
             *      requestedRenderer = Hook.EGL_D3D11_ONLY_DISPLAY_ANGLE;
             * }*/

            _display = EGL.GetDisplay(requestedRenderer);

            int minor;
            int major;

            if (!EGL.Initialize(_display, out major, out minor))
            {
                throw new EGLException("Initialize failed.");
            }

            if (!EGL.BindAPI(EGL.EGL_OPENGL_ES_API))
            {
                throw new EGLException("BindAPI failed.");
            }
        }
Esempio n. 2
0
        public void Dispose()
        {
            EGL.Terminate(_display);

            EGL.DestroySurface(_display, _surface);

            EGL.DestroyContext(_display, _context);

            EGLDC.ReleaseDC(_handle, _nativeDisplay);
        }