packages feed

lambdacube-engine-0.1.1: Graphics/LambdaCube/HardwareIndexBuffer.hs

module Graphics.LambdaCube.HardwareIndexBuffer where

import Data.Word
import Data.IORef
import Foreign.Ptr
import Foreign.Marshal.Alloc
import Foreign.Marshal.Utils
import Control.Monad

import Graphics.LambdaCube.HardwareBuffer

data IndexType
    = IT_16BIT
    | IT_32BIT
    deriving (Eq,Show)

class (HardwareBuffer a) => HardwareIndexBuffer a where
    getIndexType  :: a -> IndexType -- ^ Get the type of indexes used in this buffer
    getNumIndexes :: a -> Int       -- ^ Get the number of indexes in this buffer
    getIndexSize  :: a -> Int       -- ^ Get the size in bytes of each index