title: Opengl nvoglv32.dll exception when doing long draws
body: <p>I'm using opengl to render fractals, which can result in very long draw calls (multiple seconds). If the draw call ends up being too long (a couple of seconds), i get this error:<br>
  Unhandled exception at 0x69A5E899 (nvoglv32.dll) in Mandelbulb.exe: Fatal program exit requested.
  Presumably opengl assumes i'm stuck in an infinite loop and therefore aborts the program.</p>
  
  <p>I've isolated the problem, as it goes away if i lower the quality. (in the example code, notice that the program runs just fine if maxiterations is set to something reasonable like 1000).<br>
  Is there any way to hint to opengl that it shouldn't abort?<br>
  Maybe using compute shaders instead will work?</p>
  
  <p>Sample code for reproducing (very stupid example, not the focus): make an opengl project, draw two triangles that overlap to form a rectangle covering the entire screen. Then use this fragment shader to color it.
  Vertex:</p>
  
  <pre><code>#version 330 core
  
  layout(location = 0) in vec4 position;
  
  out vec4 pos;
  void main()
  {
      gl_Position = position;
      pos = position;
  };
  </code></pre>
  
  <p>Fragment:</p>
  
  <pre><code>#version 330 core
  layout(location = 0) out vec4 color;
  in vec4 pos;
  const int maxIterations = 8000000;
  void main()
  {
      vec2 npos = pos.xy;
      vec2 z=vec2(0.0,0.0);
      int i = maxIterations;
      for (; i &gt; 0; i--)
      {
          float y2 = z.y * z.y;
          float x2 = z.x * z.x;
          if (x2 + y2 &gt; 4) break;
          z.y = 2*z.x*z.y+npos.y;
          z.x = x2 - y2 + npos.x;
      }
      color = vec4(float(i)/float(maxIterations));
  };
  </code></pre>
  
  <p>Edit:
  Trying what @Scheff recommended worked. However, i sadly can't accept the comment as an answer</p>