Copyright | [2009..2023] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Texture references
Synopsis
- data Texture = Texture {
- normalised :: !Bool
- filtering :: !FilterMode
- addressing :: !(AddressMode, AddressMode, AddressMode)
- format :: !FormatDesc
- data FormatKind
- = Signed
- | Unsigned
- | Float
- | None
- | NV12
- | UnsignedNormalized8X1
- | UnsignedNormalized8X2
- | UnsignedNormalized8X4
- | UnsignedNormalized16X1
- | UnsignedNormalized16X2
- | UnsignedNormalized16X4
- | SignedNormalized8X1
- | SignedNormalized8X2
- | SignedNormalized8X4
- | SignedNormalized16X1
- | SignedNormalized16X2
- | SignedNormalized16X4
- | UnsignedBlockCompressed1
- | UnsignedBlockCompressed1SRGB
- | UnsignedBlockCompressed2
- | UnsignedBlockCompressed2SRGB
- | UnsignedBlockCompressed3
- | UnsignedBlockCompressed3SRGB
- | UnsignedBlockCompressed4
- | SignedBlockCompressed4
- | UnsignedBlockCompressed5
- | SignedBlockCompressed5
- | UnsignedBlockCompressed6H
- | SignedBlockCompressed6H
- | UnsignedBlockCompressed7
- | UnsignedBlockCompressed7SRGB
- data AddressMode
- data FilterMode
- data FormatDesc = FormatDesc {}
- bind :: String -> Texture -> DevicePtr a -> Int64 -> IO ()
- bind2D :: String -> Texture -> DevicePtr a -> (Int, Int) -> Int64 -> IO ()
Texture Reference Management
Texture | |
|
Instances
Storable Texture Source # | |
Show Texture Source # | |
Eq Texture Source # | |
data FormatKind Source #
Texture channel format kind
Instances
Enum FormatKind Source # | |
Defined in Foreign.CUDA.Runtime.Texture succ :: FormatKind -> FormatKind # pred :: FormatKind -> FormatKind # toEnum :: Int -> FormatKind # fromEnum :: FormatKind -> Int # enumFrom :: FormatKind -> [FormatKind] # enumFromThen :: FormatKind -> FormatKind -> [FormatKind] # enumFromTo :: FormatKind -> FormatKind -> [FormatKind] # enumFromThenTo :: FormatKind -> FormatKind -> FormatKind -> [FormatKind] # | |
Show FormatKind Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FormatKind -> ShowS # show :: FormatKind -> String # showList :: [FormatKind] -> ShowS # | |
Eq FormatKind Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FormatKind -> FormatKind -> Bool # (/=) :: FormatKind -> FormatKind -> Bool # |
data AddressMode Source #
Texture addressing mode
Instances
Enum AddressMode Source # | Texture filtering mode |
Defined in Foreign.CUDA.Runtime.Texture succ :: AddressMode -> AddressMode # pred :: AddressMode -> AddressMode # toEnum :: Int -> AddressMode # fromEnum :: AddressMode -> Int # enumFrom :: AddressMode -> [AddressMode] # enumFromThen :: AddressMode -> AddressMode -> [AddressMode] # enumFromTo :: AddressMode -> AddressMode -> [AddressMode] # enumFromThenTo :: AddressMode -> AddressMode -> AddressMode -> [AddressMode] # | |
Show AddressMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> AddressMode -> ShowS # show :: AddressMode -> String # showList :: [AddressMode] -> ShowS # | |
Eq AddressMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: AddressMode -> AddressMode -> Bool # (/=) :: AddressMode -> AddressMode -> Bool # |
data FilterMode Source #
Instances
Enum FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture succ :: FilterMode -> FilterMode # pred :: FilterMode -> FilterMode # toEnum :: Int -> FilterMode # fromEnum :: FilterMode -> Int # enumFrom :: FilterMode -> [FilterMode] # enumFromThen :: FilterMode -> FilterMode -> [FilterMode] # enumFromTo :: FilterMode -> FilterMode -> [FilterMode] # enumFromThenTo :: FilterMode -> FilterMode -> FilterMode -> [FilterMode] # | |
Show FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FilterMode -> ShowS # show :: FilterMode -> String # showList :: [FilterMode] -> ShowS # | |
Eq FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FilterMode -> FilterMode -> Bool # (/=) :: FilterMode -> FilterMode -> Bool # |
data FormatDesc Source #
A description of how memory read through the texture cache should be interpreted, including the kind of data and the number of bits of each component (x,y,z and w, respectively).
Instances
Storable FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture sizeOf :: FormatDesc -> Int # alignment :: FormatDesc -> Int # peekElemOff :: Ptr FormatDesc -> Int -> IO FormatDesc # pokeElemOff :: Ptr FormatDesc -> Int -> FormatDesc -> IO () # peekByteOff :: Ptr b -> Int -> IO FormatDesc # pokeByteOff :: Ptr b -> Int -> FormatDesc -> IO () # peek :: Ptr FormatDesc -> IO FormatDesc # poke :: Ptr FormatDesc -> FormatDesc -> IO () # | |
Show FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FormatDesc -> ShowS # show :: FormatDesc -> String # showList :: [FormatDesc] -> ShowS # | |
Eq FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FormatDesc -> FormatDesc -> Bool # (/=) :: FormatDesc -> FormatDesc -> Bool # |
bind :: String -> Texture -> DevicePtr a -> Int64 -> IO () Source #
Bind the memory area associated with the device pointer to a texture reference given by the named symbol. Any previously bound references are unbound.
bind2D :: String -> Texture -> DevicePtr a -> (Int, Int) -> Int64 -> IO () Source #
Bind the two-dimensional memory area to the texture reference associated with the given symbol. The size of the area is constrained by (width,height) in texel units, and the row pitch in bytes. Any previously bound references are unbound.