I'm getting some repeating lags in my opengl application.
I'm using the win32 api to create the window and I'm also creating a 2.2 context.
So the main loop of the program is very simple:


Clearing the color buffer
Drawing a triangle
Swapping the buffers.


The triangle is rotating, that's the way I can see the lag.
Also my frame time isn't smooth which may be the problem.
But I'm very very sure the delta time calculation is correct because I've tried plenty ways.

Do you think it could be a graphic driver problem?
Because a friend of mine run almost the exactly same program except I do less calculations + I'm using the standard opengl shader.
Also, His program use more CPU power than mine and the CPU % is smoother than mine.

I should also add:
On my laptop I get same lag every ~1 second, so I can see some kind of pattern.


Question: Solution disappearance responsive navigation after open/close
Answer: Well, the problem is that your fadeToggle sets your nav &gt; ul to style="display: none". Styles set directly overrides any stylesheets, unless you use !important.

As such, and combining with NMindz answer, try this:

@media all and (min-width: 1000px) {
  nav ul { 
    display: block !important;
    top: 60px;
  }
}


You could also try a pure css solution that would probably be better. Something like

nav ul.show {
    display: block;
}


And for the javascript

$(function() {
    $('.nav-btn').click(function(event) {
        $('nav ul').toggleClass("show");
    });
});