Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Texture = Texture {}
- newtype Texture_ = Texture_ GLuint
- type TextureUnit = 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 :: (MonadIO m, MonadMask m) => GLenum -> GLenum -> GLuint -> m a -> m a
- bindingQueryPoint :: GLenum -> GLenum
- getTopologyBindPoints :: Topology -> (GLenum, GLenum)
- withBindingByTopology :: (MonadIO m, MonadMask m) => Texture -> (GLenum -> m a) -> m a
- withTextureBinding :: (MonadIO m, MonadMask m) => Texture -> TextureUnit -> m a -> m 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.
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 |
bindingQueryPoint :: GLenum -> GLenum Source
Given a bind location (such as gl_TEXTURE_3D), returns the query enum that retrieves the current binding from glGetIntegerv (such as gl_TEXTURE_BINDING_3D).
getTopologyBindPoints :: Topology -> (GLenum, GLenum) Source
withTextureBinding :: (MonadIO m, MonadMask m) => Texture -> TextureUnit -> m a -> m a Source