Esempio n. 1
0
            private void BlitThreadInit(WindowData reg)
            {
                Clyde._windowing !.GLMakeContextCurrent(reg.Reg);
                Clyde._windowing.GLSwapInterval(0);

                if (!Clyde._isGLES)
                {
                    GL.Enable(EnableCap.FramebufferSrgb);
                }

                var vao = GL.GenVertexArray();

                GL.BindVertexArray(vao);
                GL.BindBuffer(BufferTarget.ArrayBuffer, Clyde.WindowVBO.ObjectHandle);
                // Vertex Coords
                GL.VertexAttribPointer(0, 2, VertexAttribPointerType.Float, false, Vertex2D.SizeOf, 0);
                GL.EnableVertexAttribArray(0);
                // Texture Coords.
                GL.VertexAttribPointer(1, 2, VertexAttribPointerType.Float, false, Vertex2D.SizeOf, 2 * sizeof(float));
                GL.EnableVertexAttribArray(1);

                var program = Clyde._compileProgram(
                    Clyde._winBlitShaderVert,
                    Clyde._winBlitShaderFrag,
                    new (string, uint)[]