GLControl似乎不会一次刷新它自己

时间:2017-06-19 15:53:56

标签: c# forms opengl opentk

我正在使用OpenTK.GameWindow类来绘制我的场景 现在,我想使用GLControl在其上绘制我的场景,但Paint事件不会被多次调用!!

我知道,因为我正在调用一种在场景中移动的方法,但实际上没有任何反应!!

Event assignment to glControl (Picture)

    private void glControl_OnRenderFrame(object sender, PaintEventArgs e)
    {
        GL.ClearColor(Color.Black);
        GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

        // Move The Camera ...
        // Draw Stuff ... 

        glControl.SwapBuffers();
    }

0 个答案:

没有答案