module Graphics.Rendering.OpenGL.GL.Texturing.Application (
texture
) where
import Graphics.Rendering.OpenGL.GL.BasicTypes ( Capability )
import Graphics.Rendering.OpenGL.GL.Capability (
EnableCap(CapTexture1D,CapTexture2D,CapTexture3D,CapTextureCubeMap),
makeCapability )
import Graphics.Rendering.OpenGL.GL.StateVar ( StateVar )
import Graphics.Rendering.OpenGL.GL.Texturing.Specification (
TextureTarget(..) )
texture :: TextureTarget -> StateVar Capability
texture = makeCapability . textureTargetToEnableCap
textureTargetToEnableCap :: TextureTarget -> EnableCap
textureTargetToEnableCap x = case x of
Texture1D -> CapTexture1D
Texture2D -> CapTexture2D
Texture3D -> CapTexture3D
TextureCubeMap -> CapTextureCubeMap
TextureRectangle -> error "ToDo: TextureRectangle"