-- | Simplify common drawing commands.
module Graphics.GLUtil.Drawing where
import Foreign.Ptr (nullPtr)
import Graphics.Rendering.OpenGL

-- | @drawIndexedTris n@ draws @n@ 'Triangles' using vertex data from
-- the currently bound 'ArrayBuffer' and indices from the beginning of
-- the currently bound 'ElementArrayBuffer'. Note that there must be
-- at least @n * 3@ indices in the 'ElementArrayBuffer'!
drawIndexedTris :: GLsizei -> IO ()
drawIndexedTris :: GLsizei -> IO ()
drawIndexedTris n :: GLsizei
n = PrimitiveMode -> GLsizei -> DataType -> Ptr Any -> IO ()
forall a. PrimitiveMode -> GLsizei -> DataType -> Ptr a -> IO ()
drawElements PrimitiveMode
Triangles (GLsizei
nGLsizei -> GLsizei -> GLsizei
forall a. Num a => a -> a -> a
*3) DataType
UnsignedInt Ptr Any
forall a. Ptr a
nullPtr