Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2cca44f12eb8ef579d4d0baff7068f29 > files > 360

ghc-OpenGL-devel-2.2.3.0-7.fc15.i686.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->
<title>Graphics/Rendering/OpenGL/GL/FlushFinish.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-2"></a><span class='hs-comment'>-- |</span>
<a name="line-3"></a><span class='hs-comment'>-- Module      :  Graphics.Rendering.OpenGL.GL.FlushFinish</span>
<a name="line-4"></a><span class='hs-comment'>-- Copyright   :  (c) Sven Panne 2002-2009</span>
<a name="line-5"></a><span class='hs-comment'>-- License     :  BSD-style (see the file libraries/OpenGL/LICENSE)</span>
<a name="line-6"></a><span class='hs-comment'>-- </span>
<a name="line-7"></a><span class='hs-comment'>-- Maintainer  :  sven.panne@aedion.de</span>
<a name="line-8"></a><span class='hs-comment'>-- Stability   :  stable</span>
<a name="line-9"></a><span class='hs-comment'>-- Portability :  portable</span>
<a name="line-10"></a><span class='hs-comment'>--</span>
<a name="line-11"></a><span class='hs-comment'>-- This module corresponds to section 5.5 (Flush and Finish) of the OpenGL 2.1</span>
<a name="line-12"></a><span class='hs-comment'>-- specs.</span>
<a name="line-13"></a><span class='hs-comment'>--</span>
<a name="line-14"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-15"></a>
<a name="line-16"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>Rendering</span><span class='hs-varop'>.</span><span class='hs-conid'>OpenGL</span><span class='hs-varop'>.</span><span class='hs-conid'>GL</span><span class='hs-varop'>.</span><span class='hs-conid'>FlushFinish</span> <span class='hs-layout'>(</span>
<a name="line-17"></a>   <span class='hs-varid'>flush</span><span class='hs-layout'>,</span> <span class='hs-varid'>finish</span>      
<a name="line-18"></a><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-19"></a>
<a name="line-20"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-21"></a>
<a name="line-22"></a><span class='hs-comment'>-- | Different GL implementations buffer commands in several different</span>
<a name="line-23"></a><span class='hs-comment'>-- locations, including network buffers and the graphics accelerator itself.</span>
<a name="line-24"></a><span class='hs-comment'>-- 'flush' empties all of these buffers, causing all issued commands to be</span>
<a name="line-25"></a><span class='hs-comment'>-- executed as quickly as they are accepted by the actual rendering engine.</span>
<a name="line-26"></a><span class='hs-comment'>-- Though this execution may not be completed in any particular time period, it</span>
<a name="line-27"></a><span class='hs-comment'>-- does complete in finite time.</span>
<a name="line-28"></a><span class='hs-comment'>-- </span>
<a name="line-29"></a><span class='hs-comment'>-- Because any GL program might be executed over a network, or on an accelerator</span>
<a name="line-30"></a><span class='hs-comment'>-- that buffers commands, all programs should call 'flush' whenever they count</span>
<a name="line-31"></a><span class='hs-comment'>-- on having all of their previously issued commands completed. For example,</span>
<a name="line-32"></a><span class='hs-comment'>-- call 'flush' before waiting for user input that depends on the generated</span>
<a name="line-33"></a><span class='hs-comment'>-- image.</span>
<a name="line-34"></a><span class='hs-comment'>-- </span>
<a name="line-35"></a><span class='hs-comment'>-- Note that 'flush' can return at any time. It does not wait until the</span>
<a name="line-36"></a><span class='hs-comment'>-- execution of all previously issued GL commands is complete.</span>
<a name="line-37"></a>
<a name="line-38"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-conid'>CALLCONV</span> <span class='hs-keyword'>unsafe</span> <span class='hs-str'>"glFlush"</span> <span class='hs-varid'>flush</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-39"></a>
<a name="line-40"></a><span class='hs-comment'>-- | 'finish' does not return until the effects of all previously called GL</span>
<a name="line-41"></a><span class='hs-comment'>-- commands are complete. Such effects include all changes to GL state, all</span>
<a name="line-42"></a><span class='hs-comment'>-- changes to connection state, and all changes to the frame buffer contents.</span>
<a name="line-43"></a><span class='hs-comment'>-- </span>
<a name="line-44"></a><span class='hs-comment'>-- Note that 'finish' requires a round trip to the server.</span>
<a name="line-45"></a>
<a name="line-46"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-conid'>CALLCONV</span> <span class='hs-keyword'>unsafe</span> <span class='hs-str'>"glFinish"</span> <span class='hs-varid'>finish</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
</pre></body>
</html>