Copyright | (c) Sven Panne 2002-2019 |
---|---|
License | BSD3 |
Maintainer | Sven Panne <svenpanne@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Graphics.Rendering.OpenGL.GL.VertexSpec
Description
This module corresponds to section 2.7 (Vertex Specification) of the OpenGL 2.1 specs.
Synopsis
- class Vertex a where
- class VertexComponent a
- currentTextureCoords :: StateVar (TexCoord4 GLfloat)
- class TexCoord a where
- texCoord :: a -> IO ()
- texCoordv :: Ptr a -> IO ()
- multiTexCoord :: TextureUnit -> a -> IO ()
- multiTexCoordv :: TextureUnit -> Ptr a -> IO ()
- class TexCoordComponent a
- newtype TexCoord1 a = TexCoord1 a
- data TexCoord2 a = TexCoord2 !a !a
- data TexCoord3 a = TexCoord3 !a !a !a
- data TexCoord4 a = TexCoord4 !a !a !a !a
- currentNormal :: StateVar (Normal3 GLfloat)
- class Normal a where
- class NormalComponent a
- data Normal3 a = Normal3 !a !a !a
- currentFogCoord :: StateVar (FogCoord1 GLfloat)
- class FogCoord a where
- class FogCoordComponent a
- newtype FogCoord1 a = FogCoord1 a
- rgbaMode :: GettableStateVar Bool
- currentColor :: StateVar (Color4 GLfloat)
- class Color a where
- currentSecondaryColor :: StateVar (Color3 GLfloat)
- class SecondaryColor a where
- secondaryColor :: a -> IO ()
- secondaryColorv :: Ptr a -> IO ()
- class ColorComponent a
- data Color3 a = Color3 !a !a !a
- data Color4 a = Color4 !a !a !a !a
- currentIndex :: StateVar (Index1 GLint)
- class Index a where
- class IndexComponent a
- newtype Index1 a = Index1 a
- data IntegerHandling
- newtype AttribLocation = AttribLocation GLuint
- currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
- currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
- currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint)
- class VertexAttrib a where
- vertexAttrib :: IntegerHandling -> AttribLocation -> a -> IO ()
- vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr a -> IO ()
- class (Storable a, Num a) => VertexAttribComponent a where
- vertexAttrib1 :: AttribLocation -> a -> IO ()
- vertexAttrib2 :: AttribLocation -> a -> a -> IO ()
- vertexAttrib3 :: AttribLocation -> a -> a -> a -> IO ()
- vertexAttrib4 :: AttribLocation -> a -> a -> a -> a -> IO ()
- vertexAttrib1N :: AttribLocation -> a -> IO ()
- vertexAttrib2N :: AttribLocation -> a -> a -> IO ()
- vertexAttrib3N :: AttribLocation -> a -> a -> a -> IO ()
- vertexAttrib4N :: AttribLocation -> a -> a -> a -> a -> IO ()
- vertexAttrib1I :: AttribLocation -> a -> IO ()
- vertexAttrib2I :: AttribLocation -> a -> a -> IO ()
- vertexAttrib3I :: AttribLocation -> a -> a -> a -> IO ()
- vertexAttrib4I :: AttribLocation -> a -> a -> a -> a -> IO ()
- vertexAttrib1v :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib2v :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib3v :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib4v :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib1Nv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib2Nv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib3Nv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib4Nv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib1Iv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib2Iv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib3Iv :: AttribLocation -> Ptr a -> IO ()
- vertexAttrib4Iv :: AttribLocation -> Ptr a -> IO ()
- newtype TextureUnit = TextureUnit GLuint
- maxTextureUnit :: GettableStateVar TextureUnit
Vertex Coordinates
Specify the (x, y, z, w) coordinates of a four-dimensional vertex.
This must only be done during
renderPrimitive
, otherwise the
behaviour is unspecified. The current values of the auxiliary vertex
attributes are associated with the vertex.
Note that there is no such thing as a "current vertex" which could be retrieved.
Instances
VertexComponent a => Vertex (Vertex4 a) Source # | |
VertexComponent a => Vertex (Vertex3 a) Source # | |
VertexComponent a => Vertex (Vertex2 a) Source # | |
class VertexComponent a Source #
The class of all types which can be used as a vertex coordinate.
Minimal complete definition
vertex2, vertex3, vertex4, vertex2v, vertex3v, vertex4v
Instances
VertexComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
VertexComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
VertexComponent GLint Source # | |
VertexComponent GLshort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec |
Auxiliary Vertex Attributes
Apart from its coordinates in four-dimensional space, every vertex has associated auxiliary attributes: Its texture coordinates, a normal, a fog coordinate, and a color plus a secondary color. For every attribute, the OpenGL state contains its current value, which can be changed at any time.
Every attribute has a "natural" format via which it can be manipulated
directly as part of the OpenGL state, e.g. the current texture coordinates
are internally handled as
. Different formats are
converted to this format, e.g. the s, r, and t coordinates of a
TexCoord4
GLfloat
are converted to floating point values and a q
coordinate of 1.0 is implicitly assumed.TexCoord3
GLint
Consequently, the vast majority of classes, functions, and data types in this module are for convenience only and offer no additional functionality.
Texture Coordinates
currentTextureCoords :: StateVar (TexCoord4 GLfloat) Source #
The current texture coordinates (s, t, r, q) for the current
texture unit (see activeTexture
).
The initial value is (0,0,0,1) for all texture units.
class TexCoord a where Source #
Change the current texture coordinates of the current or given texture unit.
Methods
texCoord :: a -> IO () Source #
texCoordv :: Ptr a -> IO () Source #
multiTexCoord :: TextureUnit -> a -> IO () Source #
multiTexCoordv :: TextureUnit -> Ptr a -> IO () Source #
Instances
class TexCoordComponent a Source #
The class of all types which can be used as a texture coordinate.
Minimal complete definition
texCoord1, texCoord2, texCoord3, texCoord4, texCoord1v, texCoord2v, texCoord3v, texCoord4v, multiTexCoord1, multiTexCoord2, multiTexCoord3, multiTexCoord4, multiTexCoord1v, multiTexCoord2v, multiTexCoord3v, multiTexCoord4v
Instances
TexCoordComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods texCoord1 :: GLdouble -> IO () texCoord2 :: GLdouble -> GLdouble -> IO () texCoord3 :: GLdouble -> GLdouble -> GLdouble -> IO () texCoord4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO () texCoord1v :: Ptr GLdouble -> IO () texCoord2v :: Ptr GLdouble -> IO () texCoord3v :: Ptr GLdouble -> IO () texCoord4v :: Ptr GLdouble -> IO () multiTexCoord1 :: GLenum -> GLdouble -> IO () multiTexCoord2 :: GLenum -> GLdouble -> GLdouble -> IO () multiTexCoord3 :: GLenum -> GLdouble -> GLdouble -> GLdouble -> IO () multiTexCoord4 :: GLenum -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO () multiTexCoord1v :: GLenum -> Ptr GLdouble -> IO () multiTexCoord2v :: GLenum -> Ptr GLdouble -> IO () multiTexCoord3v :: GLenum -> Ptr GLdouble -> IO () multiTexCoord4v :: GLenum -> Ptr GLdouble -> IO () | |
TexCoordComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods texCoord1 :: GLfloat -> IO () texCoord2 :: GLfloat -> GLfloat -> IO () texCoord3 :: GLfloat -> GLfloat -> GLfloat -> IO () texCoord4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO () texCoord1v :: Ptr GLfloat -> IO () texCoord2v :: Ptr GLfloat -> IO () texCoord3v :: Ptr GLfloat -> IO () texCoord4v :: Ptr GLfloat -> IO () multiTexCoord1 :: GLenum -> GLfloat -> IO () multiTexCoord2 :: GLenum -> GLfloat -> GLfloat -> IO () multiTexCoord3 :: GLenum -> GLfloat -> GLfloat -> GLfloat -> IO () multiTexCoord4 :: GLenum -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO () multiTexCoord1v :: GLenum -> Ptr GLfloat -> IO () multiTexCoord2v :: GLenum -> Ptr GLfloat -> IO () multiTexCoord3v :: GLenum -> Ptr GLfloat -> IO () multiTexCoord4v :: GLenum -> Ptr GLfloat -> IO () | |
TexCoordComponent GLint Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods texCoord1 :: GLint -> IO () texCoord2 :: GLint -> GLint -> IO () texCoord3 :: GLint -> GLint -> GLint -> IO () texCoord4 :: GLint -> GLint -> GLint -> GLint -> IO () texCoord1v :: Ptr GLint -> IO () texCoord2v :: Ptr GLint -> IO () texCoord3v :: Ptr GLint -> IO () texCoord4v :: Ptr GLint -> IO () multiTexCoord1 :: GLenum -> GLint -> IO () multiTexCoord2 :: GLenum -> GLint -> GLint -> IO () multiTexCoord3 :: GLenum -> GLint -> GLint -> GLint -> IO () multiTexCoord4 :: GLenum -> GLint -> GLint -> GLint -> GLint -> IO () multiTexCoord1v :: GLenum -> Ptr GLint -> IO () multiTexCoord2v :: GLenum -> Ptr GLint -> IO () multiTexCoord3v :: GLenum -> Ptr GLint -> IO () multiTexCoord4v :: GLenum -> Ptr GLint -> IO () | |
TexCoordComponent GLshort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods texCoord1 :: GLshort -> IO () texCoord2 :: GLshort -> GLshort -> IO () texCoord3 :: GLshort -> GLshort -> GLshort -> IO () texCoord4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO () texCoord1v :: Ptr GLshort -> IO () texCoord2v :: Ptr GLshort -> IO () texCoord3v :: Ptr GLshort -> IO () texCoord4v :: Ptr GLshort -> IO () multiTexCoord1 :: GLenum -> GLshort -> IO () multiTexCoord2 :: GLenum -> GLshort -> GLshort -> IO () multiTexCoord3 :: GLenum -> GLshort -> GLshort -> GLshort -> IO () multiTexCoord4 :: GLenum -> GLshort -> GLshort -> GLshort -> GLshort -> IO () multiTexCoord1v :: GLenum -> Ptr GLshort -> IO () multiTexCoord2v :: GLenum -> Ptr GLshort -> IO () multiTexCoord3v :: GLenum -> Ptr GLshort -> IO () multiTexCoord4v :: GLenum -> Ptr GLshort -> IO () |
Texture coordinates with t=0, r=0, and q=1.
Constructors
TexCoord1 a |
Instances
Texture coordinates with r=0 and q=1.
Constructors
TexCoord2 !a !a |
Instances
Texture coordinates with q=1.
Constructors
TexCoord3 !a !a !a |
Instances
Fully-fledged four-dimensional texture coordinates.
Constructors
TexCoord4 !a !a !a !a |
Instances
Normal
currentNormal :: StateVar (Normal3 GLfloat) Source #
The current normal (x, y, z). The initial value is the unit vector (0, 0, 1).
Change the current normal. Integral arguments are converted to floating-point with a linear mapping that maps the most positive representable integer value to 1.0, and the most negative representable integer value to -1.0.
Normals specified with normal
or normalv
need not have unit length.
If normalize
is enabled, then
normals of any length specified with normal
or normalv
are normalized
after transformation. If
rescaleNormal
is enabled, normals
are scaled by a scaling factor derived from the modelview matrix.
rescaleNormal
requires that the
originally specified normals were of unit length, and that the modelview
matrix contains only uniform scales for proper results. Normalization is
initially disabled.
class NormalComponent a Source #
The class of all types which can be used as a component of a normal.
Minimal complete definition
normal3, normal3v
Instances
NormalComponent GLbyte Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
NormalComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
NormalComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
NormalComponent GLint Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
NormalComponent GLshort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec |
Constructors
Normal3 !a !a !a |
Instances
Fog Coordinate
currentFogCoord :: StateVar (FogCoord1 GLfloat) Source #
The current fog coordinate. The initial value is 0.
class FogCoordComponent a Source #
The class of all types which can be used as the fog coordinate.
Minimal complete definition
fogCoord1, fogCoord1v
Instances
FogCoordComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
FogCoordComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec |
A fog coordinate.
Constructors
FogCoord1 a |
Instances
Color and Secondary Color
rgbaMode :: GettableStateVar Bool Source #
If rgbaMode
contains True
, the color buffers store RGBA value. If
color indexes are stored, it contains False
.
currentColor :: StateVar (Color4 GLfloat) Source #
Change the current color.
Instances
ColorComponent a => Color (Color4 a) Source # | |
ColorComponent a => Color (Color3 a) Source # | |
currentSecondaryColor :: StateVar (Color3 GLfloat) Source #
class SecondaryColor a where Source #
Change the current secondary color.
Instances
ColorComponent a => SecondaryColor (Color3 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods secondaryColor :: Color3 a -> IO () Source # secondaryColorv :: Ptr (Color3 a) -> IO () Source # |
class ColorComponent a Source #
The class of all types which can be used as a color component.
Minimal complete definition
color3, color4, color3v, color4v, secondaryColor3, secondaryColor3v
Instances
ColorComponent GLbyte Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLbyte -> GLbyte -> GLbyte -> IO () color4 :: GLbyte -> GLbyte -> GLbyte -> GLbyte -> IO () color3v :: Ptr GLbyte -> IO () color4v :: Ptr GLbyte -> IO () secondaryColor3 :: GLbyte -> GLbyte -> GLbyte -> IO () secondaryColor3v :: Ptr GLbyte -> IO () | |
ColorComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLdouble -> GLdouble -> GLdouble -> IO () color4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO () color3v :: Ptr GLdouble -> IO () color4v :: Ptr GLdouble -> IO () secondaryColor3 :: GLdouble -> GLdouble -> GLdouble -> IO () secondaryColor3v :: Ptr GLdouble -> IO () | |
ColorComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLfloat -> GLfloat -> GLfloat -> IO () color4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO () color3v :: Ptr GLfloat -> IO () color4v :: Ptr GLfloat -> IO () secondaryColor3 :: GLfloat -> GLfloat -> GLfloat -> IO () secondaryColor3v :: Ptr GLfloat -> IO () | |
ColorComponent GLint Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLint -> GLint -> GLint -> IO () color4 :: GLint -> GLint -> GLint -> GLint -> IO () color3v :: Ptr GLint -> IO () color4v :: Ptr GLint -> IO () secondaryColor3 :: GLint -> GLint -> GLint -> IO () secondaryColor3v :: Ptr GLint -> IO () | |
ColorComponent GLshort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLshort -> GLshort -> GLshort -> IO () color4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO () color3v :: Ptr GLshort -> IO () color4v :: Ptr GLshort -> IO () secondaryColor3 :: GLshort -> GLshort -> GLshort -> IO () secondaryColor3v :: Ptr GLshort -> IO () | |
ColorComponent GLubyte Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLubyte -> GLubyte -> GLubyte -> IO () color4 :: GLubyte -> GLubyte -> GLubyte -> GLubyte -> IO () color3v :: Ptr GLubyte -> IO () color4v :: Ptr GLubyte -> IO () secondaryColor3 :: GLubyte -> GLubyte -> GLubyte -> IO () secondaryColor3v :: Ptr GLubyte -> IO () | |
ColorComponent GLuint Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLuint -> GLuint -> GLuint -> IO () color4 :: GLuint -> GLuint -> GLuint -> GLuint -> IO () color3v :: Ptr GLuint -> IO () color4v :: Ptr GLuint -> IO () secondaryColor3 :: GLuint -> GLuint -> GLuint -> IO () secondaryColor3v :: Ptr GLuint -> IO () | |
ColorComponent GLushort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods color3 :: GLushort -> GLushort -> GLushort -> IO () color4 :: GLushort -> GLushort -> GLushort -> GLushort -> IO () color3v :: Ptr GLushort -> IO () color4v :: Ptr GLushort -> IO () secondaryColor3 :: GLushort -> GLushort -> GLushort -> IO () secondaryColor3v :: Ptr GLushort -> IO () |
Constructors
Color3 !a !a !a |
Instances
Functor Color3 Source # | |
Applicative Color3 Source # | |
Foldable Color3 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods fold :: Monoid m => Color3 m -> m foldMap :: Monoid m => (a -> m) -> Color3 a -> m foldMap' :: Monoid m => (a -> m) -> Color3 a -> m foldr :: (a -> b -> b) -> b -> Color3 a -> b foldr' :: (a -> b -> b) -> b -> Color3 a -> b foldl :: (b -> a -> b) -> b -> Color3 a -> b foldl' :: (b -> a -> b) -> b -> Color3 a -> b foldr1 :: (a -> a -> a) -> Color3 a -> a foldl1 :: (a -> a -> a) -> Color3 a -> a elem :: Eq a => a -> Color3 a -> Bool maximum :: Ord a => Color3 a -> a | |
Traversable Color3 Source # | |
Bounded a => Bounded (Color3 a) Source # | |
Eq a => Eq (Color3 a) Source # | |
Ord a => Ord (Color3 a) Source # | |
Read a => Read (Color3 a) Source # | |
Show a => Show (Color3 a) Source # | |
Ix a => Ix (Color3 a) Source # | |
Storable a => Storable (Color3 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods peekElemOff :: Ptr (Color3 a) -> Int -> IO (Color3 a) pokeElemOff :: Ptr (Color3 a) -> Int -> Color3 a -> IO () peekByteOff :: Ptr b -> Int -> IO (Color3 a) pokeByteOff :: Ptr b -> Int -> Color3 a -> IO () | |
VertexAttribComponent a => VertexAttrib (Color3 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods vertexAttrib :: IntegerHandling -> AttribLocation -> Color3 a -> IO () Source # vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color3 a) -> IO () Source # | |
ColorComponent a => SecondaryColor (Color3 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods secondaryColor :: Color3 a -> IO () Source # secondaryColorv :: Ptr (Color3 a) -> IO () Source # | |
ColorComponent a => Color (Color3 a) Source # | |
UniformComponent a => Uniform (Color3 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Shaders.Uniform Methods uniform :: UniformLocation -> StateVar (Color3 a) Source # uniformv :: UniformLocation -> GLsizei -> Ptr (Color3 a) -> IO () Source # |
A fully-fledged RGBA color.
Constructors
Color4 !a !a !a !a |
Instances
Functor Color4 Source # | |
Applicative Color4 Source # | |
Foldable Color4 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods fold :: Monoid m => Color4 m -> m foldMap :: Monoid m => (a -> m) -> Color4 a -> m foldMap' :: Monoid m => (a -> m) -> Color4 a -> m foldr :: (a -> b -> b) -> b -> Color4 a -> b foldr' :: (a -> b -> b) -> b -> Color4 a -> b foldl :: (b -> a -> b) -> b -> Color4 a -> b foldl' :: (b -> a -> b) -> b -> Color4 a -> b foldr1 :: (a -> a -> a) -> Color4 a -> a foldl1 :: (a -> a -> a) -> Color4 a -> a elem :: Eq a => a -> Color4 a -> Bool maximum :: Ord a => Color4 a -> a | |
Traversable Color4 Source # | |
ControlPoint Color4 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.ControlPoint Methods map1Target :: Domain d => Color4 d -> GLenum map2Target :: Domain d => Color4 d -> GLenum enableCap1 :: Domain d => Color4 d -> EnableCap enableCap2 :: Domain d => Color4 d -> EnableCap numComponents :: Domain d => Color4 d -> Stride peekControlPoint :: Domain d => Ptr (Color4 d) -> IO (Color4 d) pokeControlPoint :: Domain d => Ptr (Color4 d) -> Color4 d -> IO () | |
Bounded a => Bounded (Color4 a) Source # | |
Eq a => Eq (Color4 a) Source # | |
Ord a => Ord (Color4 a) Source # | |
Read a => Read (Color4 a) Source # | |
Show a => Show (Color4 a) Source # | |
Ix a => Ix (Color4 a) Source # | |
Storable a => Storable (Color4 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods peekElemOff :: Ptr (Color4 a) -> Int -> IO (Color4 a) pokeElemOff :: Ptr (Color4 a) -> Int -> Color4 a -> IO () peekByteOff :: Ptr b -> Int -> IO (Color4 a) pokeByteOff :: Ptr b -> Int -> Color4 a -> IO () | |
VertexAttribComponent a => VertexAttrib (Color4 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods vertexAttrib :: IntegerHandling -> AttribLocation -> Color4 a -> IO () Source # vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color4 a) -> IO () Source # | |
ColorComponent a => Color (Color4 a) Source # | |
UniformComponent a => Uniform (Color4 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Shaders.Uniform Methods uniform :: UniformLocation -> StateVar (Color4 a) Source # uniformv :: UniformLocation -> GLsizei -> Ptr (Color4 a) -> IO () Source # |
currentIndex :: StateVar (Index1 GLint) Source #
Change the current color index.
class IndexComponent a Source #
The class of all types which can be used as a color index.
Minimal complete definition
index1, index1v
Instances
IndexComponent GLdouble Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
IndexComponent GLfloat Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
IndexComponent GLint Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
IndexComponent GLshort Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec | |
IndexComponent GLubyte Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec |
A color index.
Constructors
Index1 a |
Instances
Functor Index1 Source # | |
Applicative Index1 Source # | |
Foldable Index1 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods fold :: Monoid m => Index1 m -> m foldMap :: Monoid m => (a -> m) -> Index1 a -> m foldMap' :: Monoid m => (a -> m) -> Index1 a -> m foldr :: (a -> b -> b) -> b -> Index1 a -> b foldr' :: (a -> b -> b) -> b -> Index1 a -> b foldl :: (b -> a -> b) -> b -> Index1 a -> b foldl' :: (b -> a -> b) -> b -> Index1 a -> b foldr1 :: (a -> a -> a) -> Index1 a -> a foldl1 :: (a -> a -> a) -> Index1 a -> a elem :: Eq a => a -> Index1 a -> Bool maximum :: Ord a => Index1 a -> a | |
Traversable Index1 Source # | |
ControlPoint Index1 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.ControlPoint Methods map1Target :: Domain d => Index1 d -> GLenum map2Target :: Domain d => Index1 d -> GLenum enableCap1 :: Domain d => Index1 d -> EnableCap enableCap2 :: Domain d => Index1 d -> EnableCap numComponents :: Domain d => Index1 d -> Stride peekControlPoint :: Domain d => Ptr (Index1 d) -> IO (Index1 d) pokeControlPoint :: Domain d => Ptr (Index1 d) -> Index1 d -> IO () | |
Bounded a => Bounded (Index1 a) Source # | |
Eq a => Eq (Index1 a) Source # | |
Ord a => Ord (Index1 a) Source # | |
Read a => Read (Index1 a) Source # | |
Show a => Show (Index1 a) Source # | |
Ix a => Ix (Index1 a) Source # | |
Storable a => Storable (Index1 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexAttributes Methods peekElemOff :: Ptr (Index1 a) -> Int -> IO (Index1 a) pokeElemOff :: Ptr (Index1 a) -> Int -> Index1 a -> IO () peekByteOff :: Ptr b -> Int -> IO (Index1 a) pokeByteOff :: Ptr b -> Int -> Index1 a -> IO () | |
VertexAttribComponent a => VertexAttrib (Index1 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods vertexAttrib :: IntegerHandling -> AttribLocation -> Index1 a -> IO () Source # vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Index1 a) -> IO () Source # | |
IndexComponent a => Index (Index1 a) Source # | |
UniformComponent a => Uniform (Index1 a) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Shaders.Uniform Methods uniform :: UniformLocation -> StateVar (Index1 a) Source # uniformv :: UniformLocation -> GLsizei -> Ptr (Index1 a) -> IO () Source # |
Generic Vertex Attributes
data IntegerHandling Source #
Constructors
ToFloat | |
ToNormalizedFloat | |
KeepIntegral |
Instances
Eq IntegerHandling Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods (==) :: IntegerHandling -> IntegerHandling -> Bool (/=) :: IntegerHandling -> IntegerHandling -> Bool | |
Ord IntegerHandling Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods compare :: IntegerHandling -> IntegerHandling -> Ordering (<) :: IntegerHandling -> IntegerHandling -> Bool (<=) :: IntegerHandling -> IntegerHandling -> Bool (>) :: IntegerHandling -> IntegerHandling -> Bool (>=) :: IntegerHandling -> IntegerHandling -> Bool max :: IntegerHandling -> IntegerHandling -> IntegerHandling min :: IntegerHandling -> IntegerHandling -> IntegerHandling | |
Show IntegerHandling Source # | |
Defined in Graphics.Rendering.OpenGL.GL.VertexSpec Methods showsPrec :: Int -> IntegerHandling -> ShowS show :: IntegerHandling -> String showList :: [IntegerHandling] -> ShowS |
newtype AttribLocation Source #
Constructors
AttribLocation GLuint |
Instances
Eq AttribLocation Source # | |
Defined in Graphics.Rendering.OpenGL.GL.QueryUtils.VertexAttrib Methods (==) :: AttribLocation -> AttribLocation -> Bool (/=) :: AttribLocation -> AttribLocation -> Bool | |
Ord AttribLocation Source # | |
Defined in Graphics.Rendering.OpenGL.GL.QueryUtils.VertexAttrib Methods compare :: AttribLocation -> AttribLocation -> Ordering (<) :: AttribLocation -> AttribLocation -> Bool (<=) :: AttribLocation -> AttribLocation -> Bool (>) :: AttribLocation -> AttribLocation -> Bool (>=) :: AttribLocation -> AttribLocation -> Bool max :: AttribLocation -> AttribLocation -> AttribLocation min :: AttribLocation -> AttribLocation -> AttribLocation | |
Show AttribLocation Source # | |
Defined in Graphics.Rendering.OpenGL.GL.QueryUtils.VertexAttrib Methods showsPrec :: Int -> AttribLocation -> ShowS show :: AttribLocation -> String showList :: [AttribLocation] -> ShowS |
currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat) Source #
currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint) Source #
currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint) Source #
class VertexAttrib a where Source #
Methods
vertexAttrib :: IntegerHandling -> AttribLocation -> a -> IO () Source #
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr a -> IO () Source #
Instances
class (Storable a, Num a) => VertexAttribComponent a where Source #
The class of all types which can be used as a generic vertex attribute. NOTE: Do not use the methods of this class directly, they were only exported by accident and will be hidden in future versions of this package.
Minimal complete definition
Methods
vertexAttrib1 :: AttribLocation -> a -> IO () Source #
vertexAttrib2 :: AttribLocation -> a -> a -> IO () Source #
vertexAttrib3 :: AttribLocation -> a -> a -> a -> IO () Source #
vertexAttrib4 :: AttribLocation -> a -> a -> a -> a -> IO () Source #
vertexAttrib1N :: AttribLocation -> a -> IO () Source #
vertexAttrib2N :: AttribLocation -> a -> a -> IO () Source #
vertexAttrib3N :: AttribLocation -> a -> a -> a -> IO () Source #
vertexAttrib4N :: AttribLocation -> a -> a -> a -> a -> IO () Source #
vertexAttrib1I :: AttribLocation -> a -> IO () Source #
vertexAttrib2I :: AttribLocation -> a -> a -> IO () Source #
vertexAttrib3I :: AttribLocation -> a -> a -> a -> IO () Source #
vertexAttrib4I :: AttribLocation -> a -> a -> a -> a -> IO () Source #
vertexAttrib1v :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib2v :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib3v :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib4v :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib1Nv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib2Nv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib3Nv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib4Nv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib1Iv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib2Iv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib3Iv :: AttribLocation -> Ptr a -> IO () Source #
vertexAttrib4Iv :: AttribLocation -> Ptr a -> IO () Source #
Instances
Texture Units
newtype TextureUnit Source #
Identifies a texture unit via its number, which must be in the range of
(0 .. maxTextureUnit
).
Constructors
TextureUnit GLuint |
Instances
maxTextureUnit :: GettableStateVar TextureUnit Source #
An implementation must support at least 2 texture units, but it may support up to 32 ones. This state variable can be used to query the actual implementation limit.