From e083553a455d30374f21aa0c34d9ae827470d490 Mon Sep 17 00:00:00 2001 From: Joshua Rahm Date: Fri, 4 Apr 2014 19:38:15 -0600 Subject: intiial commit --- Graphics/Rendering/HelpGL.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Graphics/Rendering/HelpGL.hs (limited to 'Graphics/Rendering/HelpGL.hs') 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) -- cgit