aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Rendering
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2014-04-04 19:38:15 -0600
committerJoshua Rahm <joshua.rahm@colorado.edu>2014-04-04 19:38:15 -0600
commite083553a455d30374f21aa0c34d9ae827470d490 (patch)
tree0313b29e5ff36efa76a53dbe63169c9d18b4433f /Graphics/Rendering
downloadterralloc-e083553a455d30374f21aa0c34d9ae827470d490.tar.gz
terralloc-e083553a455d30374f21aa0c34d9ae827470d490.tar.bz2
terralloc-e083553a455d30374f21aa0c34d9ae827470d490.zip
intiial commit
Diffstat (limited to 'Graphics/Rendering')
-rw-r--r--Graphics/Rendering/HelpGL.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Graphics/Rendering/HelpGL.hs b/Graphics/Rendering/HelpGL.hs
new file mode 100644
index 0000000..3ea66eb
--- /dev/null
+++ b/Graphics/Rendering/HelpGL.hs
@@ -0,0 +1,17 @@
+module Graphics.Rendering.HelpGL
+( emptyRGBATexture )
+where
+
+import Graphics.Rendering.OpenGL as GL
+import Graphics.Rendering.OpenGL.Raw.Core31
+import Foreign.Ptr
+
+import Foreign.Marshal.Array
+
+(?) :: (Integral a, Num b) => () -> a -> b
+(?) _ = fromIntegral
+
+
+emptyRGBATexture :: Int -> Int -> IO ()
+emptyRGBATexture w h =
+ texImage2D Texture2D NoProxy 0 RGBA' (TextureSize2D (()?w) (()?h)) 0 (PixelData RGBA UnsignedByte nullPtr)