<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.Rendering.OpenGL.GL.FlushFinish</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Graphics-Rendering-OpenGL-GL-FlushFinish.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Rendering-OpenGL-GL-FlushFinish.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">OpenGL-2.2.3.0: A binding for the OpenGL graphics system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>stable</td></tr><tr><th>Maintainer</th><td>sven.panne@aedion.de</td></tr></table><p class="caption">Graphics.Rendering.OpenGL.GL.FlushFinish</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module corresponds to section 5.5 (Flush and Finish) of the OpenGL 2.1 specs. </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:flush">flush</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:finish">finish</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:flush" class="def">flush</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-Rendering-OpenGL-GL-FlushFinish.html#flush" class="link">Source</a></p><div class="doc"><p>Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. <code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:flush">flush</a></code> empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine. Though this execution may not be completed in any particular time period, it does complete in finite time. </p><p>Because any GL program might be executed over a network, or on an accelerator that buffers commands, all programs should call <code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:flush">flush</a></code> whenever they count on having all of their previously issued commands completed. For example, call <code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:flush">flush</a></code> before waiting for user input that depends on the generated image. </p><p>Note that <code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:flush">flush</a></code> can return at any time. It does not wait until the execution of all previously issued GL commands is complete. </p></div></div><div class="top"><p class="src"><a name="v:finish" class="def">finish</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-Rendering-OpenGL-GL-FlushFinish.html#finish" class="link">Source</a></p><div class="doc"><p><code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:finish">finish</a></code> does not return until the effects of all previously called GL commands are complete. Such effects include all changes to GL state, all changes to connection state, and all changes to the frame buffer contents. </p><p>Note that <code><a href="Graphics-Rendering-OpenGL-GL-FlushFinish.html#v:finish">finish</a></code> requires a round trip to the server. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>