Graphics.Rendering.OpenGL.GL.Texturing.Specification

OpenGL-2.13.1.0: A binding for the OpenGL graphics system

Copyright | (c) Sven Panne 2002-2013
License | BSD3
Maintainer | Sven Panne <svenpanne@gmail.com>
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Graphics.Rendering.OpenGL.GL.Texturing.Specification

Contents

- Texture Targets
  - One-Dimensional Texture Targets
  - Two-Dimensional Texture Targets
  - Three-Dimensional Texture Targets
  - Texture Buffer Target
  - Texture Target Classification
- Texture-related Data Types
- Texture Image Specification
- Alternate Texture Image Specification Commands
- Compressed Texture Images
- Multisample 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 TextureTarget1D = Texture1D
- data TextureTarget2D
  - = Texture2D
  - | Texture1DArray
  - | TextureRectangle
- data TextureTarget2DMultisample = Texture2DMultisample
- data TextureTargetCubeMap = TextureCubeMap
- data TextureTargetCubeMapFace
  - = TextureCubeMapPositiveX
  - | TextureCubeMapNegativeX
  - | TextureCubeMapPositiveY
  - | TextureCubeMapNegativeY
  - | TextureCubeMapPositiveZ
  - | TextureCubeMapNegativeZ
- data TextureTarget3D
  - = Texture3D
  - | Texture2DArray
  - | TextureCubeMapArray
- data TextureTarget2DMultisampleArray = Texture2DMultisampleArray
- data TextureTargetBuffer = TextureBuffer'
- class BindableTextureTarget t
- class ParameterizedTextureTarget t
- class OneDimensionalTextureTarget t
- class TwoDimensionalTextureTarget t
- class ThreeDimensionalTextureTarget t
- class QueryableTextureTarget t
- class GettableTextureTarget t
- 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 :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()
- texImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()
- texImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()
- copyTexImage1D :: OneDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()
- copyTexImage2D :: TwoDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()
- texSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()
- texSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()
- texSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()
- getTexImage :: GettableTextureTarget t => t -> Level -> PixelData a -> IO ()
- copyTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()
- copyTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()
- copyTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()
- newtype CompressedTextureFormat = CompressedTextureFormat GLenum
- compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]
- data CompressedPixelData a = CompressedPixelData !CompressedTextureFormat GLsizei (Ptr a)
- compressedTexImage1D :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()
- compressedTexImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()
- compressedTexImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()
- compressedTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()
- compressedTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()
- compressedTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()
- getCompressedTexImage :: GettableTextureTarget t => t -> Level -> Ptr a -> IO ()
- data SampleLocations
  - = FlexibleSampleLocations
  - | FixedSampleLocations
- texImage2DMultisample :: TextureTarget2DMultisample -> Proxy -> Samples -> PixelInternalFormat -> TextureSize2D -> SampleLocations -> IO ()
- texImage3DMultisample :: TextureTarget2DMultisampleArray -> Proxy -> Samples -> PixelInternalFormat -> TextureSize3D -> SampleLocations -> IO ()
- maxTextureSize :: GettableStateVar GLsizei
- maxCubeMapTextureSize :: GettableStateVar GLsizei
- maxRectangleTextureSize :: GettableStateVar GLsizei
- max3DTextureSize :: GettableStateVar GLsizei
- maxArrayTextureLayers :: GettableStateVar GLsizei
- maxSampleMaskWords :: GettableStateVar GLsizei
- maxColorTextureSamples :: GettableStateVar GLsizei
- maxDepthTextureSamples :: GettableStateVar GLsizei
- maxIntegerSamples :: GettableStateVar GLsizei

# Texture Targets

## One-Dimensional Texture Targets

data TextureTarget1D

Constructors

Texture1D |

Instances

Eq TextureTarget1D |
Ord TextureTarget1D |
Show TextureTarget1D |
GettableTextureTarget TextureTarget1D |
QueryableTextureTarget TextureTarget1D |
OneDimensionalTextureTarget TextureTarget1D |
ParameterizedTextureTarget TextureTarget1D |
BindableTextureTarget TextureTarget1D |

## Two-Dimensional Texture Targets

data TextureTarget2D

Constructors

Texture2D |
Texture1DArray |
TextureRectangle |

Instances

Eq TextureTarget2D |
Ord TextureTarget2D |
Show TextureTarget2D |
GettableTextureTarget TextureTarget2D |
QueryableTextureTarget TextureTarget2D |
TwoDimensionalTextureTarget TextureTarget2D |
ParameterizedTextureTarget TextureTarget2D |
BindableTextureTarget TextureTarget2D |

data TextureTarget2DMultisample

Constructors

Texture2DMultisample |

Instances

Eq TextureTarget2DMultisample |
Ord TextureTarget2DMultisample |
Show TextureTarget2DMultisample |
QueryableTextureTarget TextureTarget2DMultisample |
ParameterizedTextureTarget TextureTarget2DMultisample |
BindableTextureTarget TextureTarget2DMultisample |

data TextureTargetCubeMap

Constructors

TextureCubeMap |

Instances

Eq TextureTargetCubeMap |
Ord TextureTargetCubeMap |
Show TextureTargetCubeMap |
TwoDimensionalTextureTarget TextureTargetCubeMap |
ParameterizedTextureTarget TextureTargetCubeMap |
BindableTextureTarget TextureTargetCubeMap |

data TextureTargetCubeMapFace

Constructors

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

Instances

Eq TextureTargetCubeMapFace |
Ord TextureTargetCubeMapFace |
Show TextureTargetCubeMapFace |
GettableTextureTarget TextureTargetCubeMapFace |
QueryableTextureTarget TextureTargetCubeMapFace |
TwoDimensionalTextureTarget TextureTargetCubeMapFace |

## Three-Dimensional Texture Targets

data TextureTarget3D

Constructors

Texture3D |
Texture2DArray |
TextureCubeMapArray |

Instances

Eq TextureTarget3D |
Ord TextureTarget3D |
Show TextureTarget3D |
GettableTextureTarget TextureTarget3D |
QueryableTextureTarget TextureTarget3D |
ThreeDimensionalTextureTarget TextureTarget3D |
ParameterizedTextureTarget TextureTarget3D |
BindableTextureTarget TextureTarget3D |

data TextureTarget2DMultisampleArray

Constructors

Texture2DMultisampleArray |

Instances

Eq TextureTarget2DMultisampleArray |
Ord TextureTarget2DMultisampleArray |
Show TextureTarget2DMultisampleArray |
QueryableTextureTarget TextureTarget2DMultisampleArray |
ParameterizedTextureTarget TextureTarget2DMultisampleArray |
BindableTextureTarget TextureTarget2DMultisampleArray |

## Texture Buffer Target

data TextureTargetBuffer

Constructors

TextureBuffer' |

Instances

Eq TextureTargetBuffer |
Ord TextureTargetBuffer |
Show TextureTargetBuffer |
BindableTextureTarget TextureTargetBuffer |

## Texture Target Classification

class BindableTextureTarget t

Minimal complete definition

marshalBindableTextureTarget, marshalBindableTextureTargetPName1I

Instances

BindableTextureTarget TextureTargetBuffer |
BindableTextureTarget TextureTarget2DMultisampleArray |
BindableTextureTarget TextureTarget3D |
BindableTextureTarget TextureTargetCubeMap |
BindableTextureTarget TextureTarget2DMultisample |
BindableTextureTarget TextureTarget2D |
BindableTextureTarget TextureTarget1D |

class ParameterizedTextureTarget t

Minimal complete definition

marshalParameterizedTextureTarget, marshalParameterizedTextureTargetProxy, marshalParameterizedTextureTargetEnableCap

Instances

ParameterizedTextureTarget TextureTarget2DMultisampleArray |
ParameterizedTextureTarget TextureTarget3D |
ParameterizedTextureTarget TextureTargetCubeMap |
ParameterizedTextureTarget TextureTarget2DMultisample |
ParameterizedTextureTarget TextureTarget2D |
ParameterizedTextureTarget TextureTarget1D |

class OneDimensionalTextureTarget t

Minimal complete definition

marshalOneDimensionalTextureTarget

Instances

OneDimensionalTextureTarget TextureTarget1D |

class TwoDimensionalTextureTarget t

Minimal complete definition

marshalTwoDimensionalTextureTarget

Instances

TwoDimensionalTextureTarget TextureTargetCubeMapFace |
TwoDimensionalTextureTarget TextureTargetCubeMap |
TwoDimensionalTextureTarget TextureTarget2D |

class ThreeDimensionalTextureTarget t

Minimal complete definition

marshalThreeDimensionalTextureTarget

Instances

ThreeDimensionalTextureTarget TextureTarget3D |

class QueryableTextureTarget t

Minimal complete definition

marshalQueryableTextureTarget

Instances

QueryableTextureTarget TextureTarget2DMultisampleArray |
QueryableTextureTarget TextureTarget3D |
QueryableTextureTarget TextureTargetCubeMapFace |
QueryableTextureTarget TextureTarget2DMultisample |
QueryableTextureTarget TextureTarget2D |
QueryableTextureTarget TextureTarget1D |

class GettableTextureTarget t

Minimal complete definition

marshalGettableTextureTarget

Instances

GettableTextureTarget TextureTarget3D |
GettableTextureTarget TextureTargetCubeMapFace |
GettableTextureTarget TextureTarget2D |
GettableTextureTarget TextureTarget1D |

# Texture-related Data Types

type Level = GLint

type Border = GLint

newtype TexturePosition1D

Constructors

TexturePosition1D GLint |

Instances

Eq TexturePosition1D |
Ord TexturePosition1D |
Show TexturePosition1D |

data TexturePosition2D

Constructors

TexturePosition2D !GLint !GLint |

Instances

Eq TexturePosition2D |
Ord TexturePosition2D |
Show TexturePosition2D |

data TexturePosition3D

Constructors

TexturePosition3D !GLint !GLint !GLint |

Instances

Eq TexturePosition3D |
Ord TexturePosition3D |
Show TexturePosition3D |

newtype TextureSize1D

Constructors

TextureSize1D GLsizei |

Instances

Eq TextureSize1D |
Ord TextureSize1D |
Show TextureSize1D |

data TextureSize2D

Constructors

TextureSize2D !GLsizei !GLsizei |

Instances

Eq TextureSize2D |
Ord TextureSize2D |
Show TextureSize2D |

data TextureSize3D

Constructors

TextureSize3D !GLsizei !GLsizei !GLsizei |

Instances

Eq TextureSize3D |
Ord TextureSize3D |
Show TextureSize3D |

# Texture Image Specification

texImage1D :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()

texImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()

texImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()

copyTexImage1D :: OneDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()

copyTexImage2D :: TwoDimensionalTextureTarget t => t -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()

texSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()

texSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()

texSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()

getTexImage :: GettableTextureTarget t => t -> Level -> PixelData a -> IO ()

# Alternate Texture Image Specification Commands

copyTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()

copyTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()

copyTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()

# Compressed Texture Images

newtype CompressedTextureFormat

Constructors

CompressedTextureFormat GLenum |

Instances

Eq CompressedTextureFormat |
Ord CompressedTextureFormat |
Show CompressedTextureFormat |

compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]

data CompressedPixelData a

Constructors

CompressedPixelData !CompressedTextureFormat GLsizei (Ptr a) |

Instances

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

compressedTexImage1D :: OneDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()

compressedTexImage2D :: TwoDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()

compressedTexImage3D :: ThreeDimensionalTextureTarget t => t -> Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()

compressedTexSubImage1D :: OneDimensionalTextureTarget t => t -> Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()

compressedTexSubImage2D :: TwoDimensionalTextureTarget t => t -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()

compressedTexSubImage3D :: ThreeDimensionalTextureTarget t => t -> Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()

getCompressedTexImage :: GettableTextureTarget t => t -> Level -> Ptr a -> IO ()

# Multisample Texture Images

data SampleLocations

Constructors

FlexibleSampleLocations |
FixedSampleLocations |

Instances

Eq SampleLocations |
Ord SampleLocations |
Show SampleLocations |

texImage2DMultisample :: TextureTarget2DMultisample -> Proxy -> Samples -> PixelInternalFormat -> TextureSize2D -> SampleLocations -> IO ()

texImage3DMultisample :: TextureTarget2DMultisampleArray -> Proxy -> Samples -> PixelInternalFormat -> TextureSize3D -> SampleLocations -> IO ()

# Implementation-Dependent Limits

maxTextureSize :: GettableStateVar GLsizei

maxCubeMapTextureSize :: GettableStateVar GLsizei

maxRectangleTextureSize :: GettableStateVar GLsizei

max3DTextureSize :: GettableStateVar GLsizei

maxArrayTextureLayers :: GettableStateVar GLsizei

maxSampleMaskWords :: GettableStateVar GLsizei

maxColorTextureSamples :: GettableStateVar GLsizei

maxDepthTextureSamples :: GettableStateVar GLsizei

maxIntegerSamples :: GettableStateVar GLsizei