On Tuesday, 1 October 2019 at 12:45:35 UTC, Adam D. Ruppe wrote:
On Monday, 30 September 2019 at 23:52:27 UTC, Murilo wrote:
    {​
        window.redrawOpenGlSceneNow;​

like I said on email, this is the ONLY thing you should to in the event loop to trigger the redraw.

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT);​
        glLoadIdentity;​
        ship.draw(20, 20, 41, 47);​

All this actual drawing stuff should be attached to the `window.redrawOpenGlScene` delegate. Just do `window.redrawOpenGlScene = { that stuff } ` after creating the window but before the event loop to set it up.

It worked! :D Thank you so much man. Now I will finish refactoring the code and then I will be able to finish your tutorial.

Reply via email to