Copyright | [2009..2017] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Texture management for low-level driver interface
- newtype Texture = Texture {
- useTexture :: Ptr ()
- data Format
- data AddressMode
- data FilterMode
- data ReadMode
- bind :: Texture -> DevicePtr a -> Int64 -> IO ()
- bind2D :: Texture -> Format -> Int -> DevicePtr a -> (Int, Int) -> Int64 -> IO ()
- getAddressMode :: Texture -> Int -> IO AddressMode
- getFilterMode :: Texture -> IO FilterMode
- getFormat :: Texture -> IO (Format, Int)
- setAddressMode :: Texture -> Int -> AddressMode -> IO ()
- setFilterMode :: Texture -> FilterMode -> IO ()
- setFormat :: Texture -> Format -> Int -> IO ()
- setReadMode :: Texture -> ReadMode -> IO ()
- create :: IO Texture
- destroy :: Texture -> IO ()
Texture Reference Management
A texture reference
Texture | |
|
Texture data formats
data AddressMode Source #
Texture reference addressing modes
data FilterMode Source #
Texture reference filtering mode
Texture read mode options
bind :: Texture -> DevicePtr a -> Int64 -> IO () Source #
Bind a linear array address of the given size (bytes) as a texture reference. Any previously bound references are unbound.
bind2D :: Texture -> Format -> Int -> DevicePtr a -> (Int, Int) -> Int64 -> IO () Source #
getAddressMode :: Texture -> Int -> IO AddressMode Source #
Get the addressing mode used by a texture reference, corresponding to the given dimension (currently the only supported dimension values are 0 or 1).
getFilterMode :: Texture -> IO FilterMode Source #
Get the filtering mode used by a texture reference.
getFormat :: Texture -> IO (Format, Int) Source #
Get the data format and number of channel components of the bound texture.
setAddressMode :: Texture -> Int -> AddressMode -> IO () Source #
Specify the addressing mode for the given dimension of a texture reference.
setFilterMode :: Texture -> FilterMode -> IO () Source #
Specify the filtering mode to be used when reading memory through a texture reference.
setFormat :: Texture -> Format -> Int -> IO () Source #
Specify the format of the data and number of packed components per element to be read by the texture reference.
setReadMode :: Texture -> ReadMode -> IO () Source #
Specify additional characteristics for reading and indexing the texture reference.
Deprecated: as of CUDA version 3.2
Create a new texture reference. Once created, the application must call
setPtr
to associate the reference with allocated memory. Other texture
reference functions are used to specify the format and interpretation to be
used when the memory is read through this reference.