aboutsummaryrefslogtreecommitdiff
path: root/Graphics/Rendering/HelpGL.hs
blob: 3ea66ebb3b971d53c2a171a3dfe799248af5eda8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)