/usr/share/doc/libghc-opengl-doc/html/src/Graphics-Rendering-OpenGL-GL-PixelRectangles-Histogram.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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | <?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/GL/PixelRectangles/Histogram.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.PixelRectangles.Histogram</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 a part of section 3.6.1 (Pixel Storage Modes) of</span>
<a name="line-12"></a><span class='hs-comment'>-- the OpenGL 2.1 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'>PixelRectangles</span><span class='hs-varop'>.</span><span class='hs-conid'>Histogram</span> <span class='hs-layout'>(</span>
<a name="line-17"></a> <span class='hs-conid'>Sink</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-varid'>histogram</span><span class='hs-layout'>,</span> <span class='hs-conid'>Reset</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-varid'>getHistogram</span><span class='hs-layout'>,</span> <span class='hs-varid'>resetHistogram</span><span class='hs-layout'>,</span>
<a name="line-18"></a> <span class='hs-varid'>histogramRGBASizes</span><span class='hs-layout'>,</span> <span class='hs-varid'>histogramLuminanceSize</span>
<a name="line-19"></a><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-20"></a>
<a name="line-21"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Marshal</span><span class='hs-varop'>.</span><span class='hs-conid'>Alloc</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'>Capability</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'>GL</span><span class='hs-varop'>.</span><span class='hs-conid'>PeekPoke</span>
<a name="line-25"></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'>PixelData</span>
<a name="line-26"></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'>PixelRectangles</span><span class='hs-varop'>.</span><span class='hs-conid'>ColorTable</span>
<a name="line-27"></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'>PixelRectangles</span><span class='hs-varop'>.</span><span class='hs-conid'>Reset</span>
<a name="line-28"></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'>PixelRectangles</span><span class='hs-varop'>.</span><span class='hs-conid'>Sink</span>
<a name="line-29"></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'>Texturing</span><span class='hs-varop'>.</span><span class='hs-conid'>PixelInternalFormat</span>
<a name="line-30"></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'>VertexSpec</span>
<a name="line-31"></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'>ARB</span><span class='hs-varop'>.</span><span class='hs-conid'>Compatibility</span> <span class='hs-layout'>(</span>
<a name="line-32"></a> <span class='hs-varid'>glGetHistogram</span><span class='hs-layout'>,</span> <span class='hs-varid'>glGetHistogramParameteriv</span><span class='hs-layout'>,</span> <span class='hs-varid'>glHistogram</span><span class='hs-layout'>,</span> <span class='hs-varid'>glResetHistogram</span><span class='hs-layout'>,</span>
<a name="line-33"></a> <span class='hs-varid'>gl_HISTOGRAM</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_ALPHA_SIZE</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_BLUE_SIZE</span><span class='hs-layout'>,</span>
<a name="line-34"></a> <span class='hs-varid'>gl_HISTOGRAM_FORMAT</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_GREEN_SIZE</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_LUMINANCE_SIZE</span><span class='hs-layout'>,</span>
<a name="line-35"></a> <span class='hs-varid'>gl_HISTOGRAM_RED_SIZE</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_SINK</span><span class='hs-layout'>,</span> <span class='hs-varid'>gl_HISTOGRAM_WIDTH</span><span class='hs-layout'>,</span>
<a name="line-36"></a> <span class='hs-varid'>gl_PROXY_HISTOGRAM</span> <span class='hs-layout'>)</span>
<a name="line-37"></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-38"></a>
<a name="line-39"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-40"></a>
<a name="line-41"></a><a name="HistogramTarget"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>HistogramTarget</span> <span class='hs-keyglyph'>=</span>
<a name="line-42"></a> <span class='hs-conid'>Histogram</span>
<a name="line-43"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>ProxyHistogram</span>
<a name="line-44"></a>
<a name="line-45"></a><a name="marshalHistogramTarget"></a><span class='hs-definition'>marshalHistogramTarget</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>HistogramTarget</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>GLenum</span>
<a name="line-46"></a><span class='hs-definition'>marshalHistogramTarget</span> <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>x</span> <span class='hs-keyword'>of</span>
<a name="line-47"></a> <span class='hs-conid'>Histogram</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM</span>
<a name="line-48"></a> <span class='hs-conid'>ProxyHistogram</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_PROXY_HISTOGRAM</span>
<a name="line-49"></a>
<a name="line-50"></a><a name="proxyToHistogramTarget"></a><span class='hs-definition'>proxyToHistogramTarget</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>HistogramTarget</span>
<a name="line-51"></a><span class='hs-definition'>proxyToHistogramTarget</span> <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>x</span> <span class='hs-keyword'>of</span>
<a name="line-52"></a> <span class='hs-conid'>NoProxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Histogram</span>
<a name="line-53"></a> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>ProxyHistogram</span>
<a name="line-54"></a>
<a name="line-55"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-56"></a>
<a name="line-57"></a><a name="histogram"></a><span class='hs-definition'>histogram</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>StateVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>GLsizei</span><span class='hs-layout'>,</span> <span class='hs-conid'>PixelInternalFormat</span><span class='hs-layout'>,</span> <span class='hs-conid'>Sink</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-58"></a><span class='hs-definition'>histogram</span> <span class='hs-varid'>proxy</span> <span class='hs-keyglyph'>=</span>
<a name="line-59"></a> <span class='hs-varid'>makeStateVarMaybe</span>
<a name="line-60"></a> <span class='hs-layout'>(</span><span class='hs-varid'>return</span> <span class='hs-conid'>CapHistogram</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>getHistogram'</span> <span class='hs-varid'>proxy</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>setHistogram</span> <span class='hs-varid'>proxy</span><span class='hs-layout'>)</span>
<a name="line-61"></a>
<a name="line-62"></a><a name="getHistogram'"></a><span class='hs-definition'>getHistogram'</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>GLsizei</span><span class='hs-layout'>,</span> <span class='hs-conid'>PixelInternalFormat</span><span class='hs-layout'>,</span> <span class='hs-conid'>Sink</span><span class='hs-layout'>)</span>
<a name="line-63"></a><span class='hs-definition'>getHistogram'</span> <span class='hs-varid'>proxy</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-64"></a> <span class='hs-varid'>w</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramWidth</span>
<a name="line-65"></a> <span class='hs-varid'>f</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>unmarshalPixelInternalFormat</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramFormat</span>
<a name="line-66"></a> <span class='hs-varid'>s</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>unmarshalSink</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramSink</span>
<a name="line-67"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>w</span><span class='hs-layout'>,</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span>
<a name="line-68"></a>
<a name="line-69"></a><a name="getHistogramParameteri"></a><span class='hs-definition'>getHistogramParameteri</span> <span class='hs-keyglyph'>::</span>
<a name="line-70"></a> <span class='hs-layout'>(</span><span class='hs-conid'>GLint</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>GetHistogramParameterPName</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
<a name="line-71"></a><span class='hs-definition'>getHistogramParameteri</span> <span class='hs-varid'>f</span> <span class='hs-varid'>proxy</span> <span class='hs-varid'>p</span> <span class='hs-keyglyph'>=</span>
<a name="line-72"></a> <span class='hs-varid'>alloca</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>buf</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
<a name="line-73"></a> <span class='hs-varid'>glGetHistogramParameteriv</span>
<a name="line-74"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalHistogramTarget</span> <span class='hs-layout'>(</span><span class='hs-varid'>proxyToHistogramTarget</span> <span class='hs-varid'>proxy</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-75"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalGetHistogramParameterPName</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span>
<a name="line-76"></a> <span class='hs-varid'>buf</span>
<a name="line-77"></a> <span class='hs-varid'>peek1</span> <span class='hs-varid'>f</span> <span class='hs-varid'>buf</span>
<a name="line-78"></a>
<a name="line-79"></a><a name="setHistogram"></a><span class='hs-definition'>setHistogram</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>GLsizei</span><span class='hs-layout'>,</span> <span class='hs-conid'>PixelInternalFormat</span><span class='hs-layout'>,</span> <span class='hs-conid'>Sink</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-80"></a><span class='hs-definition'>setHistogram</span> <span class='hs-varid'>proxy</span> <span class='hs-layout'>(</span><span class='hs-varid'>w</span><span class='hs-layout'>,</span> <span class='hs-varid'>int</span><span class='hs-layout'>,</span> <span class='hs-varid'>sink</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-81"></a> <span class='hs-varid'>glHistogram</span>
<a name="line-82"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalHistogramTarget</span> <span class='hs-layout'>(</span><span class='hs-varid'>proxyToHistogramTarget</span> <span class='hs-varid'>proxy</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-83"></a> <span class='hs-varid'>w</span>
<a name="line-84"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalPixelInternalFormat'</span> <span class='hs-varid'>int</span><span class='hs-layout'>)</span>
<a name="line-85"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalSink</span> <span class='hs-varid'>sink</span><span class='hs-layout'>)</span>
<a name="line-86"></a>
<a name="line-87"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-88"></a>
<a name="line-89"></a><a name="getHistogram"></a><span class='hs-definition'>getHistogram</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Reset</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>PixelData</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-90"></a><span class='hs-definition'>getHistogram</span> <span class='hs-varid'>reset</span> <span class='hs-varid'>pd</span> <span class='hs-keyglyph'>=</span>
<a name="line-91"></a> <span class='hs-varid'>withPixelData</span> <span class='hs-varid'>pd</span> <span class='hs-varop'>$</span>
<a name="line-92"></a> <span class='hs-varid'>glGetHistogram</span>
<a name="line-93"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalHistogramTarget</span> <span class='hs-conid'>Histogram</span><span class='hs-layout'>)</span>
<a name="line-94"></a> <span class='hs-layout'>(</span><span class='hs-varid'>marshalReset</span> <span class='hs-varid'>reset</span><span class='hs-layout'>)</span>
<a name="line-95"></a>
<a name="line-96"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-97"></a>
<a name="line-98"></a><a name="resetHistogram"></a><span class='hs-definition'>resetHistogram</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-99"></a><span class='hs-definition'>resetHistogram</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>glResetHistogram</span> <span class='hs-layout'>(</span><span class='hs-varid'>marshalHistogramTarget</span> <span class='hs-conid'>Histogram</span><span class='hs-layout'>)</span>
<a name="line-100"></a>
<a name="line-101"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-102"></a>
<a name="line-103"></a><a name="GetHistogramParameterPName"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>GetHistogramParameterPName</span> <span class='hs-keyglyph'>=</span>
<a name="line-104"></a> <span class='hs-conid'>HistogramWidth</span>
<a name="line-105"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramFormat</span>
<a name="line-106"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramRedSize</span>
<a name="line-107"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramGreenSize</span>
<a name="line-108"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramBlueSize</span>
<a name="line-109"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramAlphaSize</span>
<a name="line-110"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramLuminanceSize</span>
<a name="line-111"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>HistogramSink</span>
<a name="line-112"></a>
<a name="line-113"></a><a name="marshalGetHistogramParameterPName"></a><span class='hs-definition'>marshalGetHistogramParameterPName</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GetHistogramParameterPName</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>GLenum</span>
<a name="line-114"></a><span class='hs-definition'>marshalGetHistogramParameterPName</span> <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>x</span> <span class='hs-keyword'>of</span>
<a name="line-115"></a> <span class='hs-conid'>HistogramWidth</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_WIDTH</span>
<a name="line-116"></a> <span class='hs-conid'>HistogramFormat</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_FORMAT</span>
<a name="line-117"></a> <span class='hs-conid'>HistogramRedSize</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_RED_SIZE</span>
<a name="line-118"></a> <span class='hs-conid'>HistogramGreenSize</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_GREEN_SIZE</span>
<a name="line-119"></a> <span class='hs-conid'>HistogramBlueSize</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_BLUE_SIZE</span>
<a name="line-120"></a> <span class='hs-conid'>HistogramAlphaSize</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_ALPHA_SIZE</span>
<a name="line-121"></a> <span class='hs-conid'>HistogramLuminanceSize</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_LUMINANCE_SIZE</span>
<a name="line-122"></a> <span class='hs-conid'>HistogramSink</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>gl_HISTOGRAM_SINK</span>
<a name="line-123"></a>
<a name="line-124"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
<a name="line-125"></a>
<a name="line-126"></a><a name="histogramRGBASizes"></a><span class='hs-definition'>histogramRGBASizes</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>GettableStateVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>Color4</span> <span class='hs-conid'>GLsizei</span><span class='hs-layout'>)</span>
<a name="line-127"></a><span class='hs-definition'>histogramRGBASizes</span> <span class='hs-varid'>proxy</span> <span class='hs-keyglyph'>=</span>
<a name="line-128"></a> <span class='hs-varid'>makeGettableStateVar</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
<a name="line-129"></a> <span class='hs-varid'>r</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramRedSize</span>
<a name="line-130"></a> <span class='hs-varid'>g</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramGreenSize</span>
<a name="line-131"></a> <span class='hs-varid'>b</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramBlueSize</span>
<a name="line-132"></a> <span class='hs-varid'>a</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramAlphaSize</span>
<a name="line-133"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Color4</span> <span class='hs-varid'>r</span> <span class='hs-varid'>g</span> <span class='hs-varid'>b</span> <span class='hs-varid'>a</span>
<a name="line-134"></a>
<a name="line-135"></a><a name="histogramLuminanceSize"></a><span class='hs-definition'>histogramLuminanceSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Proxy</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>GettableStateVar</span> <span class='hs-conid'>GLsizei</span>
<a name="line-136"></a><span class='hs-definition'>histogramLuminanceSize</span> <span class='hs-varid'>proxy</span> <span class='hs-keyglyph'>=</span>
<a name="line-137"></a> <span class='hs-varid'>makeGettableStateVar</span> <span class='hs-varop'>$</span>
<a name="line-138"></a> <span class='hs-varid'>getHistogramParameteri</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>proxy</span> <span class='hs-conid'>HistogramLuminanceSize</span>
</pre></body>
</html>
|