úÎvq:$      !"# Safe+35<!Abstract 32-bit RGBA bitmap data.$6Generates the point path to display the bitmap centred%{Destructively reverse the byte order in an array. This is necessary as OpenGL reads pixel data as ABGR, rather than RGBA&2Destructively reverses the byte order in an array.'AFrees the allocated memory given to OpenGL to avoid a memory leak(AThese functions work as bit masks to isolate the Word8 components )$%&'(*+,-)$%' )$%&'(*+,-Safe+35<›An abstract color value. We keep the type abstract so we can be sure that the components are in the required range. To make a custom color use ..BHolds the color components. All components lie in the range [0..1.EMake a custom color. All components are clamped to the range [0..1].FMake a custom color. All components are clamped to the range [0..255].Make a custom color. Using this function over æ avoids clamping the components, which saves time. However, if the components are out of range then this will result in integer overflow at rendering time, and the actual picture you get will be implementation dependent. 5You'll only need to use this function when using the  gloss-raster’ package that builds a new color for every pixel. If you're just working with the Picture data type then it there is no need for raw colors.3Make a custom color, taking pre-clamped components.$Take the RGBA components of a color.8Clamp components of a raw color into the required range. .Red component.Green component.Blue component.Alpha component./../None+35<05Convert one of our Colors to OpenGL's representation.000None+35< A 2D picture $A blank picture, with nothing in it. +A convex polygon filled with a solid color. A line along an arbitrary path. A circle with the given radius. bA circle with the given thickness and radius. If the thickness is 0 then this is equivalent to  .^A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.¥A circular arc drawn counter-clockwise between two angles (in degrees), with the given radius and thickness. If the thickness is 0 then this is equivalent to .%Some text to draw with a vector font.HA bitmap image with a width, height and some 32-bit RGBA bitmap data.¤The boolean flag controls whether Gloss should cache the data between frames for speed. If you are programatically generating the image for each frame then use 1/. If you have loaded it from a file then use 2. A picture drawn with this color.6A picture translated by the given x and y coordinates.<A picture rotated clockwise by the given angle (in degrees)..A picture scaled by the given x and y factors.'A picture consisting of several others.A path through the x-y plane.2A vector can be treated as a point, and vis-versa.A point on the x-y plane. O(1). Use a 3= of RGBA data as a bitmap with the given width and height.O(size). Copy a 4? of RGBA data into a bitmap with the given width and height.¦The boolean flag controls whether Gloss should cache the data between frames for speed. If you are programatically generating the image for each frame then use 10. If you have loaded it from a file then use 2.O(size). Copy a 5 file into a bitmap.;Load an uncompressed 24 or 32bit RGBA BMP file as a bitmap.6ÿPretend a point is a number. Vectors aren't real numbers according to Haskell, because they don't support the multiply and divide field operators. We can pretend they are though, and use the (+) and (-) operators as component-wise addition and subtraction. 76   76None+35<8$A texture that we've sent to OpenGL.9Stable name derived from the  that the user gives us.:Width of the image, in pixels.;Height of the image, in pixels.< Pointer to the Raw texture data.=The OpenGL texture object.>FWhether we want to leave this in OpenGL texture memory between frames.Render options settings?Whether to use color@$Whether to force wireframe mode onlyAWhether to use alpha blendingBWhether to use line smoothingC,Cache of Textures that we've sent to OpenGL.¨A mutable render state holds references to the textures currently loaded into the OpenGL context. To ensure that textures are cached in GPU memory, pass the same  each time you call displayPicture or  renderPicture.8D9:;<=>E?@ABC8D9:;<=>E?@ABC8D9:;<=>E?@ABCNone+35<F–The OpenGL library doesn't seem to provide a nice way convert a Float to a GLfloat, even though they're the same thing under the covers. RUsing realToFrac is too slow, as it doesn't get fused in at least GHC 6.12.1G!Used for similar reasons to above gSet up the OpenGL rendering context for orthographic projection and run an action to draw the model.!`Clear the OpenGL buffer with the given background color and run an action to draw the model.FG Width and height of window.Action to perform.!Background colorAction to performFG !FG !None+35< HÿDecide how many line segments to use to render the circle. The number of segments we should use to get a nice picture depends on the size of the circle on the screen, not its intrinsic radius. If the viewport has been zoomed-in then we need to use more segments.I(Render a circle with the given thicknessJRender a circle as a line.K:Render a circle with a given thickness as a triangle stripL'Render an arc with the given thickness.MRender an arc as a line.N8Render an arc with a given thickness as a triangle stripOConvert degrees to radiansP3Normalise an angle to be between 0 and 2*pi radians HIJKLMNQRSTOPIL HIJKLMNQRSTOP None+35<"1Render a picture into the current OpenGL context..Assumes that the OpenGL matrix mode is set to  ModelviewUƒLoad a texture. If we've seen it before then use the pre-installed one from the texture cache, otherwise load it into OpenGL.VInstall a texture into OpenGL.W"If this texture does not have its cacheMe= flag set then delete it from OpenGL and free the memory.XTurn alpha blending on or offYTurn line smoothing on or off "Current rendering state.NView port scale, which controls the level of detail. Use 1.0 to start with.Picture to render.Z[\UVWXY]" "Z[\UVWXY]None+35<#VSet up the OpenGL context, clear the buffer, and render the given picture into it. This is the same as " composed with   and !J. If you want to manage your own OpenGL context then you can just call ". ªUsing this function assumes that you've already opened a window and set that to the active context. If you don't want to do your own window management then use the gloss package instead.#Window width and height.Color to clear the window with.Current rendering state.NView port scale, which controls the level of detail. Use 1.0 to start with.Picture to draw.$  !"#$ #" !#^      !"#$%&'()* +,-./01 23456789:;9:<=>?@ABCDEFGHIJKLMNOPQRSH'TUVWXYZ[\]^_`ab c d e f g h i j klgloss_4SynyeuhhhU1YEo4NNxbuXGraphics.Gloss.Rendering)Graphics.Gloss.Internals.Rendering.Bitmap#Graphics.Gloss.Internals.Data.Color(Graphics.Gloss.Internals.Rendering.Color%Graphics.Gloss.Internals.Data.Picture(Graphics.Gloss.Internals.Rendering.State)Graphics.Gloss.Internals.Rendering.Common)Graphics.Gloss.Internals.Rendering.Circle*Graphics.Gloss.Internals.Rendering.Picture BitmapDataColor makeColor makeColorI makeRawColor makeRawColorI rgbaOfColor clampColorPictureBlankPolygonLineCircle ThickCircleArcThickArcTextBitmap TranslateRotateScalePicturesPathVectorPointbitmapOfForeignPtrbitmapOfByteString bitmapOfBMPloadBMPState initState withModelviewwithClearBuffer renderPicturedisplayPicture bitmapPath reverseRGBAreverseRGBA_ptrfreeBitmapData isolateByte0 isolateByte1 isolateByte2 isolateByte3$fShowBitmapDataRGBA $fNumColorglColor4OfColorghc-prim GHC.TypesFalseTruebaseGHC.ForeignPtr ForeignPtrbytes_6elQVSg5cWdFrvRnfxTUrHData.ByteString.Internal ByteStringbmp_3glgeKBRcmxLNjYfdSEbIjCodec.BMP.BaseBMP$fNum(,)$fMonoidPictureTexturetexNametexWidth texHeighttexData texObject texCacheMe stateColorstateWireframestateBlendAlphastateLineSmooth stateTexturesgfgsizei circleSteps renderCirclerenderCircleLinerenderCircleStrip renderArc renderArcLinerenderArcStripdegToRadnormalizeAnglerenderCircleLine_steprenderCircleStrip_stepaddPointaddPointOnCircle loadTextureinstallTexture freeTexture setBlendAlpha setLineSmooth drawPicture checkErrors handleError vertexPFs