OpenGL-2.8.0.0: A binding for the OpenGL graphics system

Portability | portable
Stability | stable
Maintainer | sven.panne@aedion.de
Safe Haskell | None

Graphics.Rendering.OpenGL.GL.Texturing.Specification

Contents

- Texture-related Data Types
- Texture Image Specification
- Alternate Texture Image Specification Commands
- Compressed Texture Images
- Implementation-Dependent Limits

Description

This module corresponds to section 3.8.1 (Texture Image Specification), section 3.8.2 (Alternate Texture Image Specification Commands), and section 3.8.3 (Compressed Texture Images) of the OpenGL 2.1 specs.

Synopsis

- data TextureTarget
  - = Texture1D
  - | Texture2D
  - | Texture3D
  - | TextureCubeMap
  - | TextureRectangle
- data CubeMapTarget
  - = TextureCubeMapPositiveX
  - | TextureCubeMapNegativeX
  - | TextureCubeMapPositiveY
  - | TextureCubeMapNegativeY
  - | TextureCubeMapPositiveZ
  - | TextureCubeMapNegativeZ
- type Level = GLint
- type Border = GLint
- newtype TexturePosition1D = TexturePosition1D GLint
- data TexturePosition2D = TexturePosition2D !GLint !GLint
- data TexturePosition3D = TexturePosition3D !GLint !GLint !GLint
- newtype TextureSize1D = TextureSize1D GLsizei
- data TextureSize2D = TextureSize2D !GLsizei !GLsizei
- data TextureSize3D = TextureSize3D !GLsizei !GLsizei !GLsizei
- texImage1D :: Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()
- texImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()
- texImage3D :: Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()
- copyTexImage1D :: Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()
- copyTexImage2D :: Maybe CubeMapTarget -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()
- texSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()
- texSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()
- texSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()
- getTexImage :: Either TextureTarget CubeMapTarget -> Level -> PixelData a -> IO ()
- copyTexSubImage1D :: Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()
- copyTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()
- copyTexSubImage3D :: Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()
- newtype CompressedTextureFormat = CompressedTextureFormat GLenum
- compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]
- data CompressedPixelData a = CompressedPixelData !CompressedTextureFormat GLsizei (Ptr a)
- compressedTexImage1D :: Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()
- compressedTexImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()
- compressedTexImage3D :: Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()
- compressedTexSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()
- compressedTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()
- compressedTexSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()
- getCompressedTexImage :: Either TextureTarget CubeMapTarget -> Level -> Ptr a -> IO ()
- maxTextureSize :: TextureTarget -> GettableStateVar GLsizei

# Texture-related Data Types

data TextureTarget Source

Constructors

Texture1D |
Texture2D |
Texture3D |
TextureCubeMap |
TextureRectangle |

Instances

Eq TextureTarget |
Ord TextureTarget |
Show TextureTarget |

data CubeMapTarget Source

Constructors

TextureCubeMapPositiveX |
TextureCubeMapNegativeX |
TextureCubeMapPositiveY |
TextureCubeMapNegativeY |
TextureCubeMapPositiveZ |
TextureCubeMapNegativeZ |

Instances

Eq CubeMapTarget |
Ord CubeMapTarget |
Show CubeMapTarget |

type Level = GLint Source

type Border = GLint Source

newtype TexturePosition1D Source

Constructors

TexturePosition1D GLint |

Instances

Eq TexturePosition1D |
Ord TexturePosition1D |
Show TexturePosition1D |

data TexturePosition2D Source

Constructors

TexturePosition2D !GLint !GLint |

Instances

Eq TexturePosition2D |
Ord TexturePosition2D |
Show TexturePosition2D |

data TexturePosition3D Source

Constructors

TexturePosition3D !GLint !GLint !GLint |

Instances

Eq TexturePosition3D |
Ord TexturePosition3D |
Show TexturePosition3D |

newtype TextureSize1D Source

Constructors

TextureSize1D GLsizei |

Instances

Eq TextureSize1D |
Ord TextureSize1D |
Show TextureSize1D |

data TextureSize2D Source

Constructors

TextureSize2D !GLsizei !GLsizei |

Instances

Eq TextureSize2D |
Ord TextureSize2D |
Show TextureSize2D |

data TextureSize3D Source

Constructors

TextureSize3D !GLsizei !GLsizei !GLsizei |

Instances

Eq TextureSize3D |
Ord TextureSize3D |
Show TextureSize3D |

# Texture Image Specification

texImage1D :: Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()Source

texImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()Source

texImage3D :: Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()Source

copyTexImage1D :: Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()Source

copyTexImage2D :: Maybe CubeMapTarget -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()Source

texSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()Source

texSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()Source

texSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()Source

getTexImage :: Either TextureTarget CubeMapTarget -> Level -> PixelData a -> IO ()Source

# Alternate Texture Image Specification Commands

copyTexSubImage1D :: Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()Source

copyTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()Source

copyTexSubImage3D :: Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()Source

# Compressed Texture Images

newtype CompressedTextureFormat Source

Constructors

CompressedTextureFormat GLenum |

Instances

Eq CompressedTextureFormat |
Ord CompressedTextureFormat |
Show CompressedTextureFormat |

compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]Source

data CompressedPixelData a Source

Constructors

CompressedPixelData !CompressedTextureFormat GLsizei (Ptr a) |

Instances

Eq (CompressedPixelData a) |
Ord (CompressedPixelData a) |
Show (CompressedPixelData a) |

compressedTexImage1D :: Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()Source

compressedTexImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()Source

compressedTexImage3D :: Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()Source

compressedTexSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()Source

compressedTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()Source

compressedTexSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()Source

getCompressedTexImage :: Either TextureTarget CubeMapTarget -> Level -> Ptr a -> IO ()Source

# Implementation-Dependent Limits

maxTextureSize :: TextureTarget -> GettableStateVar GLsizei Source