diff options
Diffstat (limited to 'Graphics/Rendering')
| -rw-r--r-- | Graphics/Rendering/HelpGL.hs | 17 |
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) |