Пример #1
0
        protected override void OnOpenGlDeinit(GlInterface gl, int fb)
        {
            DisposeRenderer();
            m_gl.BindVertexArray(0);
            m_gl.DeleteVertexArrays(1, m_vao);

            m_vao = null;
            m_gl  = null;
        }
Пример #2
0
        protected unsafe override void OnOpenGlInit(GlInterface gl, int fb)
        {
            m_gl = new GlInterfaceEx(gl);

            // hook up debug handler
            //m_debugProc = OnGlDebugMessage;
            //gl.Enable(GL_DEBUG_OUTPUT);
            //m_gl.DebugMessageCallback(m_debugProc, null);

            // allocate vertex array object (VAO)
            m_vao = new int[1];
            m_gl.GenVertexArrays(1, m_vao);
            m_gl.BindVertexArray(m_vao[0]);

            // initialize Cubism renderer
            TryUpdateRenderer();
            m_time.Restart();
        }