/usr/share/doc/libghc-opengl-doc/html/src/Graphics-Rendering-OpenGL-GLU-Initialization.html is in libghc-opengl-doc 2.8.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | <?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://code.haskell.org/~malcolm/hscolour/ -->
<title>Graphics/Rendering/OpenGL/GLU/Initialization.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.GLU.Initialization</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 chapter 2 (Initialization) of the GLU specs.</span>
<a name="line-12"></a><span class='hs-comment'>--</span>
<a name="line-13"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-14"></a>
<a name="line-15"></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'>GLU</span><span class='hs-varop'>.</span><span class='hs-conid'>Initialization</span> <span class='hs-layout'>(</span>
<a name="line-16"></a> <span class='hs-varid'>gluVersion</span><span class='hs-layout'>,</span> <span class='hs-varid'>gluExtensions</span>
<a name="line-17"></a><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-18"></a>
<a name="line-19"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span>
<a name="line-20"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span>
<a name="line-21"></a><span class='hs-keyword'>import</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'>GLU</span><span class='hs-varop'>.</span><span class='hs-conid'>Raw</span>
<a name="line-22"></a><span class='hs-keyword'>import</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'>StateVar</span>
<a name="line-23"></a><span class='hs-keyword'>import</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'>QueryUtils</span>
<a name="line-24"></a><span class='hs-keyword'>import</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'>Raw</span><span class='hs-varop'>.</span><span class='hs-conid'>Core31</span>
<a name="line-25"></a>
<a name="line-26"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-27"></a>
<a name="line-28"></a><a name="gluVersion"></a><span class='hs-definition'>gluVersion</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GettableStateVar</span> <span class='hs-conid'>String</span>
<a name="line-29"></a><span class='hs-definition'>gluVersion</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>makeGettableStateVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>getString</span> <span class='hs-varid'>glu_VERSION</span><span class='hs-layout'>)</span>
<a name="line-30"></a>
<a name="line-31"></a><a name="gluExtensions"></a><span class='hs-definition'>gluExtensions</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GettableStateVar</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>String</span><span class='hs-keyglyph'>]</span>
<a name="line-32"></a><span class='hs-definition'>gluExtensions</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>makeGettableStateVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>fmap</span> <span class='hs-varid'>words</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getString</span> <span class='hs-varid'>glu_EXTENSIONS</span><span class='hs-layout'>)</span>
<a name="line-33"></a>
<a name="line-34"></a><a name="getString"></a><span class='hs-definition'>getString</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GLenum</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>String</span>
<a name="line-35"></a><span class='hs-definition'>getString</span> <span class='hs-varid'>n</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>gluGetString</span> <span class='hs-varid'>n</span> <span class='hs-varop'>>>=</span>
<a name="line-36"></a> <span class='hs-varid'>maybeNullPtr</span> <span class='hs-layout'>(</span><span class='hs-varid'>return</span> <span class='hs-str'>""</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>peekCString</span> <span class='hs-varop'>.</span> <span class='hs-varid'>castPtr</span><span class='hs-layout'>)</span>
</pre></body>
</html>
|