caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.Texture.Internal

Synopsis

Documentation

data Texture Source

Instances

Eq Texture Source 
Ord Texture Source 
OpenGLResource GLuint Texture Source

If you use finalize, be careful of any resource that might refer to the texture.

newtype Texture_ Source

Constructors

Texture_ GLuint 

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.

Constructors

TextureSpecification 

Fields

topology :: Topology
 
imageFormat :: ImageFormat
 
mipmapLevels :: Int

How many mipmap levels including the base level? Must be at least 1.

Ignored and not evaluated for multisampling textures.

data Topology Source

Specifies a topology of a texture.

Constructors

Tex1D 

Fields

width1D :: !Int
 
Tex2D 

Fields

width2D :: !Int
 
height2D :: !Int
 
Tex3D 

Fields

width3D :: !Int
 
height3D :: !Int
 
depth3D :: !Int
 
Tex1DArray 

Fields

width1DArray :: !Int
 
layers1D :: !Int
 
Tex2DArray 
Tex2DMultisample

Multisampling is available if OpenGL version >= 3.2 or GL_ARB_texture_multisample is available.

Tex2DMultisampleArray 
TexCube 

Fields

widthCube :: Int
 
TexBuffer

Buffer textures, see https://www.opengl.org/wiki/Buffer_Texture

Available if OpenGL version >= 3.1 or GL_ARB_texture_buffer_object is available.

Fields

texBuffer :: !Buffer
 

withBinding :: (MonadIO m, MonadMask m) => GLenum -> GLenum -> GLuint -> m a -> m a Source

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).