Esempio n. 1
0
            public override void WindowCreated(GLContextSpec?spec, WindowReg reg)
            {
                var data = new WindowData
                {
                    Reg = reg
                };

                _windowData[reg.Id] = data;

                var hWnd = (HWND)Clyde._windowing !.WindowGetWin32Window(reg) !.Value;

                // todo: exception management.
                CreateSwapChain1(hWnd, data);

                _factory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);

                var rt = Clyde.RtToLoaded(reg.RenderTarget);

                rt.FlipY = true;

                if (reg.IsMainWindow)
                {
                    UpdateVSync();
                    eglMakeCurrent(_eglDisplay, data.EglBackbuffer, data.EglBackbuffer, _eglContext);
                }
            }