Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Texture = Texture {
- resource :: !(Resource Texture_)
- ordIndex :: !Int
- viewSpecification :: !TextureSpecification
- newtype Texture_ = Texture_ GLuint
- type TextureUnit = Int
- ordIndices :: IORef Int
- data TextureSpecification = TextureSpecification {}
- data Topology
- = Tex1D { }
- | Tex2D { }
- | Tex3D { }
- | Tex1DArray {
- width1DArray :: !Int
- layers1D :: !Int
- | Tex2DArray {
- width2DArray :: !Int
- height2DArray :: !Int
- layers2D :: !Int
- | Tex2DMultisample {
- width2DMS :: !Int
- height2DMS :: !Int
- samples2DMS :: !Int
- fixedSampleLocations2DMS :: !Bool
- | Tex2DMultisampleArray {
- width2DMSArray :: !Int
- height2DMSArray :: !Int
- layers2DMS :: !Int
- samples2DMSArray :: !Int
- fixedSampleLocations2DMSArray :: !Bool
- | TexCube { }
- | TexBuffer { }
- withBinding :: GLenum -> GLenum -> GLuint -> IO a -> IO a
- getTopologyBindPoints :: Topology -> (GLenum, GLenum)
- withBindingByTopology :: Texture -> (GLenum -> IO a) -> IO a
- withTextureBinding :: Texture -> TextureUnit -> IO a -> IO a
Documentation
Texture | |
|
type TextureUnit = Int Source
The type of a texture unit.
The minimum valid value is 0 and maximum is implementation dependant but in OpenGL at least 48 units will work at the same time in shaders.
ordIndices :: IORef Int Source
data TextureSpecification Source
Specification on what the texture should be like.
Use textureSpecification
and set at least topology
and imageFormat
.
Future minor versions remain compatible if you use textureSpecification
instead of the constructor directly.
TextureSpecification | |
|
Specifies a topology of a texture.
Tex1D | |
Tex2D | |
Tex3D | |
Tex1DArray | |
| |
Tex2DArray | |
| |
Tex2DMultisample | |
| |
Tex2DMultisampleArray | |
| |
TexCube | |
TexBuffer | Buffer textures, see https://www.opengl.org/wiki/Buffer_Texture |
getTopologyBindPoints :: Topology -> (GLenum, GLenum) Source
withTextureBinding :: Texture -> TextureUnit -> IO a -> IO a Source