{-# LANGUAGE TypeSynonymInstances #-}
module Graphics.Rendering.OpenGL.GL.VertexSpec (
Vertex(..),
VertexComponent,
currentTextureCoords, TexCoord(..),
TexCoordComponent,
TexCoord1(..), TexCoord2(..), TexCoord3(..), TexCoord4(..),
currentNormal, Normal(..),
NormalComponent,
Normal3(..),
currentFogCoord, FogCoord(..),
FogCoordComponent,
FogCoord1(..),
rgbaMode,
currentColor, Color(..),
currentSecondaryColor, SecondaryColor(..),
ColorComponent,
Color3(..), Color4(..),
currentIndex, Index(..),
IndexComponent,
Index1(..),
IntegerHandling(..), AttribLocation(..),
currentVertexAttrib, currentVertexAttribI, currentVertexAttribIu,
VertexAttrib(..), VertexAttribComponent(..),
TextureUnit(..), maxTextureUnit
) where
import Data.StateVar
import Foreign.Marshal.Array
import Foreign.Ptr
import Foreign.Storable
import Graphics.Rendering.OpenGL.GL.GLboolean
import Graphics.Rendering.OpenGL.GL.PeekPoke
import Graphics.Rendering.OpenGL.GL.QueryUtils
import Graphics.Rendering.OpenGL.GL.Tensor
import Graphics.Rendering.OpenGL.GL.Texturing.TextureUnit
import Graphics.Rendering.OpenGL.GL.VertexAttributes
import Graphics.GL
class VertexComponent a where
vertex2 :: a -> a -> IO ()
vertex3 :: a -> a -> a -> IO ()
vertex4 :: a -> a -> a -> a -> IO ()
vertex2v :: Ptr a -> IO ()
vertex3v :: Ptr a -> IO ()
vertex4v :: Ptr a -> IO ()
instance VertexComponent GLshort where
vertex2 :: GLshort -> GLshort -> IO ()
vertex2 = forall (m :: * -> *). MonadIO m => GLshort -> GLshort -> m ()
glVertex2s
vertex3 :: GLshort -> GLshort -> GLshort -> IO ()
vertex3 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> m ()
glVertex3s
vertex4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
vertex4 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> GLshort -> m ()
glVertex4s
vertex2v :: Ptr GLshort -> IO ()
vertex2v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glVertex2sv
vertex3v :: Ptr GLshort -> IO ()
vertex3v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glVertex3sv
vertex4v :: Ptr GLshort -> IO ()
vertex4v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glVertex4sv
instance VertexComponent GLint where
vertex2 :: GLint -> GLint -> IO ()
vertex2 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> m ()
glVertex2i
vertex3 :: GLint -> GLint -> GLint -> IO ()
vertex3 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
glVertex3i
vertex4 :: GLint -> GLint -> GLint -> GLint -> IO ()
vertex4 = forall (m :: * -> *).
MonadIO m =>
GLint -> GLint -> GLint -> GLint -> m ()
glVertex4i
vertex2v :: Ptr GLint -> IO ()
vertex2v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glVertex2iv
vertex3v :: Ptr GLint -> IO ()
vertex3v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glVertex3iv
vertex4v :: Ptr GLint -> IO ()
vertex4v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glVertex4iv
instance VertexComponent GLfloat where
vertex2 :: GLfloat -> GLfloat -> IO ()
vertex2 = forall (m :: * -> *). MonadIO m => GLfloat -> GLfloat -> m ()
glVertex2f
vertex3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
vertex3 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> m ()
glVertex3f
vertex4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
vertex4 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
glVertex4f
vertex2v :: Ptr GLfloat -> IO ()
vertex2v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glVertex2fv
vertex3v :: Ptr GLfloat -> IO ()
vertex3v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glVertex3fv
vertex4v :: Ptr GLfloat -> IO ()
vertex4v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glVertex4fv
instance VertexComponent GLdouble where
vertex2 :: GLdouble -> GLdouble -> IO ()
vertex2 = forall (m :: * -> *). MonadIO m => GLdouble -> GLdouble -> m ()
glVertex2d
vertex3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
vertex3 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> m ()
glVertex3d
vertex4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
vertex4 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
glVertex4d
vertex2v :: Ptr GLdouble -> IO ()
vertex2v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glVertex2dv
vertex3v :: Ptr GLdouble -> IO ()
vertex3v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glVertex3dv
vertex4v :: Ptr GLdouble -> IO ()
vertex4v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glVertex4dv
class Vertex a where
vertex :: a -> IO ()
vertexv :: Ptr a -> IO ()
instance VertexComponent a => Vertex (Vertex2 a) where
vertex :: Vertex2 a -> IO ()
vertex (Vertex2 a
x a
y) = forall a. VertexComponent a => a -> a -> IO ()
vertex2 a
x a
y
vertexv :: Ptr (Vertex2 a) -> IO ()
vertexv = forall a. VertexComponent a => Ptr a -> IO ()
vertex2v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex2 b) -> Ptr b)
instance VertexComponent a => Vertex (Vertex3 a) where
vertex :: Vertex3 a -> IO ()
vertex (Vertex3 a
x a
y a
z) = forall a. VertexComponent a => a -> a -> a -> IO ()
vertex3 a
x a
y a
z
vertexv :: Ptr (Vertex3 a) -> IO ()
vertexv = forall a. VertexComponent a => Ptr a -> IO ()
vertex3v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex3 b) -> Ptr b)
instance VertexComponent a => Vertex (Vertex4 a) where
vertex :: Vertex4 a -> IO ()
vertex (Vertex4 a
x a
y a
z a
w) = forall a. VertexComponent a => a -> a -> a -> a -> IO ()
vertex4 a
x a
y a
z a
w
vertexv :: Ptr (Vertex4 a) -> IO ()
vertexv = forall a. VertexComponent a => Ptr a -> IO ()
vertex4v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex4 b) -> Ptr b)
currentTextureCoords :: StateVar (TexCoord4 GLfloat)
currentTextureCoords :: StateVar (TexCoord4 GLfloat)
currentTextureCoords =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar (forall p a.
GetPName4F p =>
(GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getFloat4 forall a. a -> a -> a -> a -> TexCoord4 a
TexCoord4 PName4F
GetCurrentTextureCoords) forall a. TexCoord a => a -> IO ()
texCoord
class TexCoordComponent a where
texCoord1 :: a -> IO ()
texCoord2 :: a -> a -> IO ()
texCoord3 :: a -> a -> a -> IO ()
texCoord4 :: a -> a -> a -> a -> IO ()
texCoord1v :: Ptr a -> IO ()
texCoord2v :: Ptr a -> IO ()
texCoord3v :: Ptr a -> IO ()
texCoord4v :: Ptr a -> IO ()
multiTexCoord1 :: GLenum -> a -> IO ()
multiTexCoord2 :: GLenum -> a -> a -> IO ()
multiTexCoord3 :: GLenum -> a -> a -> a -> IO ()
multiTexCoord4 :: GLenum -> a -> a -> a -> a -> IO ()
multiTexCoord1v :: GLenum -> Ptr a -> IO ()
multiTexCoord2v :: GLenum -> Ptr a -> IO ()
multiTexCoord3v :: GLenum -> Ptr a -> IO ()
multiTexCoord4v :: GLenum -> Ptr a -> IO ()
instance TexCoordComponent GLshort where
texCoord1 :: GLshort -> IO ()
texCoord1 = forall (m :: * -> *). MonadIO m => GLshort -> m ()
glTexCoord1s
texCoord2 :: GLshort -> GLshort -> IO ()
texCoord2 = forall (m :: * -> *). MonadIO m => GLshort -> GLshort -> m ()
glTexCoord2s
texCoord3 :: GLshort -> GLshort -> GLshort -> IO ()
texCoord3 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> m ()
glTexCoord3s
texCoord4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
texCoord4 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> GLshort -> m ()
glTexCoord4s
texCoord1v :: Ptr GLshort -> IO ()
texCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glTexCoord1sv
texCoord2v :: Ptr GLshort -> IO ()
texCoord2v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glTexCoord2sv
texCoord3v :: Ptr GLshort -> IO ()
texCoord3v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glTexCoord3sv
texCoord4v :: Ptr GLshort -> IO ()
texCoord4v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glTexCoord4sv
multiTexCoord1 :: GLuint -> GLshort -> IO ()
multiTexCoord1 = forall (m :: * -> *). MonadIO m => GLuint -> GLshort -> m ()
glMultiTexCoord1s
multiTexCoord2 :: GLuint -> GLshort -> GLshort -> IO ()
multiTexCoord2 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> m ()
glMultiTexCoord2s
multiTexCoord3 :: GLuint -> GLshort -> GLshort -> GLshort -> IO ()
multiTexCoord3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> GLshort -> m ()
glMultiTexCoord3s
multiTexCoord4 :: GLuint -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
multiTexCoord4 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> GLshort -> GLshort -> m ()
glMultiTexCoord4s
multiTexCoord1v :: GLuint -> Ptr GLshort -> IO ()
multiTexCoord1v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glMultiTexCoord1sv
multiTexCoord2v :: GLuint -> Ptr GLshort -> IO ()
multiTexCoord2v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glMultiTexCoord2sv
multiTexCoord3v :: GLuint -> Ptr GLshort -> IO ()
multiTexCoord3v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glMultiTexCoord3sv
multiTexCoord4v :: GLuint -> Ptr GLshort -> IO ()
multiTexCoord4v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glMultiTexCoord4sv
instance TexCoordComponent GLint where
texCoord1 :: GLint -> IO ()
texCoord1 = forall (m :: * -> *). MonadIO m => GLint -> m ()
glTexCoord1i
texCoord2 :: GLint -> GLint -> IO ()
texCoord2 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> m ()
glTexCoord2i
texCoord3 :: GLint -> GLint -> GLint -> IO ()
texCoord3 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
glTexCoord3i
texCoord4 :: GLint -> GLint -> GLint -> GLint -> IO ()
texCoord4 = forall (m :: * -> *).
MonadIO m =>
GLint -> GLint -> GLint -> GLint -> m ()
glTexCoord4i
texCoord1v :: Ptr GLint -> IO ()
texCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glTexCoord1iv
texCoord2v :: Ptr GLint -> IO ()
texCoord2v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glTexCoord2iv
texCoord3v :: Ptr GLint -> IO ()
texCoord3v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glTexCoord3iv
texCoord4v :: Ptr GLint -> IO ()
texCoord4v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glTexCoord4iv
multiTexCoord1 :: GLuint -> GLint -> IO ()
multiTexCoord1 = forall (m :: * -> *). MonadIO m => GLuint -> GLint -> m ()
glMultiTexCoord1i
multiTexCoord2 :: GLuint -> GLint -> GLint -> IO ()
multiTexCoord2 = forall (m :: * -> *). MonadIO m => GLuint -> GLint -> GLint -> m ()
glMultiTexCoord2i
multiTexCoord3 :: GLuint -> GLint -> GLint -> GLint -> IO ()
multiTexCoord3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLint -> GLint -> GLint -> m ()
glMultiTexCoord3i
multiTexCoord4 :: GLuint -> GLint -> GLint -> GLint -> GLint -> IO ()
multiTexCoord4 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLint -> GLint -> GLint -> GLint -> m ()
glMultiTexCoord4i
multiTexCoord1v :: GLuint -> Ptr GLint -> IO ()
multiTexCoord1v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glMultiTexCoord1iv
multiTexCoord2v :: GLuint -> Ptr GLint -> IO ()
multiTexCoord2v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glMultiTexCoord2iv
multiTexCoord3v :: GLuint -> Ptr GLint -> IO ()
multiTexCoord3v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glMultiTexCoord3iv
multiTexCoord4v :: GLuint -> Ptr GLint -> IO ()
multiTexCoord4v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glMultiTexCoord4iv
instance TexCoordComponent GLfloat where
texCoord1 :: GLfloat -> IO ()
texCoord1 = forall (m :: * -> *). MonadIO m => GLfloat -> m ()
glTexCoord1f
texCoord2 :: GLfloat -> GLfloat -> IO ()
texCoord2 = forall (m :: * -> *). MonadIO m => GLfloat -> GLfloat -> m ()
glTexCoord2f
texCoord3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
texCoord3 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> m ()
glTexCoord3f
texCoord4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
texCoord4 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
glTexCoord4f
texCoord1v :: Ptr GLfloat -> IO ()
texCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glTexCoord1fv
texCoord2v :: Ptr GLfloat -> IO ()
texCoord2v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glTexCoord2fv
texCoord3v :: Ptr GLfloat -> IO ()
texCoord3v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glTexCoord3fv
texCoord4v :: Ptr GLfloat -> IO ()
texCoord4v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glTexCoord4fv
multiTexCoord1 :: GLuint -> GLfloat -> IO ()
multiTexCoord1 = forall (m :: * -> *). MonadIO m => GLuint -> GLfloat -> m ()
glMultiTexCoord1f
multiTexCoord2 :: GLuint -> GLfloat -> GLfloat -> IO ()
multiTexCoord2 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> m ()
glMultiTexCoord2f
multiTexCoord3 :: GLuint -> GLfloat -> GLfloat -> GLfloat -> IO ()
multiTexCoord3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> GLfloat -> m ()
glMultiTexCoord3f
multiTexCoord4 :: GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
multiTexCoord4 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
glMultiTexCoord4f
multiTexCoord1v :: GLuint -> Ptr GLfloat -> IO ()
multiTexCoord1v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glMultiTexCoord1fv
multiTexCoord2v :: GLuint -> Ptr GLfloat -> IO ()
multiTexCoord2v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glMultiTexCoord2fv
multiTexCoord3v :: GLuint -> Ptr GLfloat -> IO ()
multiTexCoord3v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glMultiTexCoord3fv
multiTexCoord4v :: GLuint -> Ptr GLfloat -> IO ()
multiTexCoord4v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glMultiTexCoord4fv
instance TexCoordComponent GLdouble where
texCoord1 :: GLdouble -> IO ()
texCoord1 = forall (m :: * -> *). MonadIO m => GLdouble -> m ()
glTexCoord1d
texCoord2 :: GLdouble -> GLdouble -> IO ()
texCoord2 = forall (m :: * -> *). MonadIO m => GLdouble -> GLdouble -> m ()
glTexCoord2d
texCoord3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
texCoord3 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> m ()
glTexCoord3d
texCoord4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
texCoord4 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
glTexCoord4d
texCoord1v :: Ptr GLdouble -> IO ()
texCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glTexCoord1dv
texCoord2v :: Ptr GLdouble -> IO ()
texCoord2v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glTexCoord2dv
texCoord3v :: Ptr GLdouble -> IO ()
texCoord3v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glTexCoord3dv
texCoord4v :: Ptr GLdouble -> IO ()
texCoord4v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glTexCoord4dv
multiTexCoord1 :: GLuint -> GLdouble -> IO ()
multiTexCoord1 = forall (m :: * -> *). MonadIO m => GLuint -> GLdouble -> m ()
glMultiTexCoord1d
multiTexCoord2 :: GLuint -> GLdouble -> GLdouble -> IO ()
multiTexCoord2 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> m ()
glMultiTexCoord2d
multiTexCoord3 :: GLuint -> GLdouble -> GLdouble -> GLdouble -> IO ()
multiTexCoord3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> GLdouble -> m ()
glMultiTexCoord3d
multiTexCoord4 :: GLuint -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
multiTexCoord4 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
glMultiTexCoord4d
multiTexCoord1v :: GLuint -> Ptr GLdouble -> IO ()
multiTexCoord1v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glMultiTexCoord1dv
multiTexCoord2v :: GLuint -> Ptr GLdouble -> IO ()
multiTexCoord2v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glMultiTexCoord2dv
multiTexCoord3v :: GLuint -> Ptr GLdouble -> IO ()
multiTexCoord3v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glMultiTexCoord3dv
multiTexCoord4v :: GLuint -> Ptr GLdouble -> IO ()
multiTexCoord4v = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glMultiTexCoord4dv
class TexCoord a where
texCoord :: a -> IO ()
texCoordv :: Ptr a -> IO ()
multiTexCoord :: TextureUnit -> a -> IO ()
multiTexCoordv :: TextureUnit -> Ptr a -> IO ()
instance TexCoordComponent a => TexCoord (TexCoord1 a) where
texCoord :: TexCoord1 a -> IO ()
texCoord (TexCoord1 a
s) = forall a. TexCoordComponent a => a -> IO ()
texCoord1 a
s
texCoordv :: Ptr (TexCoord1 a) -> IO ()
texCoordv = forall a. TexCoordComponent a => Ptr a -> IO ()
texCoord1v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord1 b) -> Ptr b)
multiTexCoord :: TextureUnit -> TexCoord1 a -> IO ()
multiTexCoord TextureUnit
u (TexCoord1 a
s) =
forall a. TexCoordComponent a => GLuint -> a -> IO ()
multiTexCoord1 (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) a
s
multiTexCoordv :: TextureUnit -> Ptr (TexCoord1 a) -> IO ()
multiTexCoordv TextureUnit
u =
forall a. TexCoordComponent a => GLuint -> Ptr a -> IO ()
multiTexCoord1v (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord1 b) -> Ptr b)
instance TexCoordComponent a => TexCoord (TexCoord2 a) where
texCoord :: TexCoord2 a -> IO ()
texCoord (TexCoord2 a
s a
t) = forall a. TexCoordComponent a => a -> a -> IO ()
texCoord2 a
s a
t
texCoordv :: Ptr (TexCoord2 a) -> IO ()
texCoordv = forall a. TexCoordComponent a => Ptr a -> IO ()
texCoord2v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord2 b) -> Ptr b)
multiTexCoord :: TextureUnit -> TexCoord2 a -> IO ()
multiTexCoord TextureUnit
u (TexCoord2 a
s a
t) =
forall a. TexCoordComponent a => GLuint -> a -> a -> IO ()
multiTexCoord2 (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) a
s a
t
multiTexCoordv :: TextureUnit -> Ptr (TexCoord2 a) -> IO ()
multiTexCoordv TextureUnit
u =
forall a. TexCoordComponent a => GLuint -> Ptr a -> IO ()
multiTexCoord2v (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord2 b) -> Ptr b)
instance TexCoordComponent a => TexCoord (TexCoord3 a) where
texCoord :: TexCoord3 a -> IO ()
texCoord (TexCoord3 a
s a
t a
r) = forall a. TexCoordComponent a => a -> a -> a -> IO ()
texCoord3 a
s a
t a
r
texCoordv :: Ptr (TexCoord3 a) -> IO ()
texCoordv = forall a. TexCoordComponent a => Ptr a -> IO ()
texCoord3v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord3 b) -> Ptr b)
multiTexCoord :: TextureUnit -> TexCoord3 a -> IO ()
multiTexCoord TextureUnit
u (TexCoord3 a
s a
t a
r) =
forall a. TexCoordComponent a => GLuint -> a -> a -> a -> IO ()
multiTexCoord3 (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) a
s a
t a
r
multiTexCoordv :: TextureUnit -> Ptr (TexCoord3 a) -> IO ()
multiTexCoordv TextureUnit
u =
forall a. TexCoordComponent a => GLuint -> Ptr a -> IO ()
multiTexCoord3v (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord3 b) -> Ptr b)
instance TexCoordComponent a => TexCoord (TexCoord4 a) where
texCoord :: TexCoord4 a -> IO ()
texCoord (TexCoord4 a
s a
t a
r a
q) = forall a. TexCoordComponent a => a -> a -> a -> a -> IO ()
texCoord4 a
s a
t a
r a
q
texCoordv :: Ptr (TexCoord4 a) -> IO ()
texCoordv = forall a. TexCoordComponent a => Ptr a -> IO ()
texCoord4v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord4 b) -> Ptr b)
multiTexCoord :: TextureUnit -> TexCoord4 a -> IO ()
multiTexCoord TextureUnit
u (TexCoord4 a
s a
t a
r a
q) =
forall a.
TexCoordComponent a =>
GLuint -> a -> a -> a -> a -> IO ()
multiTexCoord4 (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) a
s a
t a
r a
q
multiTexCoordv :: TextureUnit -> Ptr (TexCoord4 a) -> IO ()
multiTexCoordv TextureUnit
u =
forall a. TexCoordComponent a => GLuint -> Ptr a -> IO ()
multiTexCoord4v (TextureUnit -> GLuint
marshalTextureUnit TextureUnit
u) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord4 b) -> Ptr b)
currentNormal :: StateVar (Normal3 GLfloat)
currentNormal :: StateVar (Normal3 GLfloat)
currentNormal = forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar (forall p a.
GetPName3F p =>
(GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getFloat3 forall a. a -> a -> a -> Normal3 a
Normal3 PName3F
GetCurrentNormal) forall a. Normal a => a -> IO ()
normal
class NormalComponent a where
normal3 :: a -> a -> a -> IO ()
normal3v :: Ptr a -> IO ()
instance NormalComponent GLbyte where
normal3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
normal3 = forall (m :: * -> *).
MonadIO m =>
GLbyte -> GLbyte -> GLbyte -> m ()
glNormal3b
normal3v :: Ptr GLbyte -> IO ()
normal3v = forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
glNormal3bv
instance NormalComponent GLshort where
normal3 :: GLshort -> GLshort -> GLshort -> IO ()
normal3 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> m ()
glNormal3s
normal3v :: Ptr GLshort -> IO ()
normal3v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glNormal3sv
instance NormalComponent GLint where
normal3 :: GLint -> GLint -> GLint -> IO ()
normal3 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
glNormal3i
normal3v :: Ptr GLint -> IO ()
normal3v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glNormal3iv
instance NormalComponent GLfloat where
normal3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
normal3 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> m ()
glNormal3f
normal3v :: Ptr GLfloat -> IO ()
normal3v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glNormal3fv
instance NormalComponent GLdouble where
normal3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
normal3 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> m ()
glNormal3d
normal3v :: Ptr GLdouble -> IO ()
normal3v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glNormal3dv
class Normal a where
normal :: a -> IO ()
normalv :: Ptr a -> IO ()
instance NormalComponent a => Normal (Normal3 a) where
normal :: Normal3 a -> IO ()
normal (Normal3 a
x a
y a
z) = forall a. NormalComponent a => a -> a -> a -> IO ()
normal3 a
x a
y a
z
normalv :: Ptr (Normal3 a) -> IO ()
normalv = forall a. NormalComponent a => Ptr a -> IO ()
normal3v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Normal3 b) -> Ptr b)
currentFogCoord :: StateVar (FogCoord1 GLfloat)
currentFogCoord :: StateVar (FogCoord1 GLfloat)
currentFogCoord =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar (forall p a. GetPName1F p => (GLfloat -> a) -> p -> IO a
getFloat1 forall a. a -> FogCoord1 a
FogCoord1 PName1F
GetCurrentFogCoord) forall a. FogCoord a => a -> IO ()
fogCoord
class FogCoordComponent a where
fogCoord1 :: a -> IO ()
fogCoord1v :: Ptr a -> IO ()
instance FogCoordComponent GLfloat where
fogCoord1 :: GLfloat -> IO ()
fogCoord1 = forall (m :: * -> *). MonadIO m => GLfloat -> m ()
glFogCoordf
fogCoord1v :: Ptr GLfloat -> IO ()
fogCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glFogCoordfv
instance FogCoordComponent GLdouble where
fogCoord1 :: GLdouble -> IO ()
fogCoord1 = forall (m :: * -> *). MonadIO m => GLdouble -> m ()
glFogCoordd
fogCoord1v :: Ptr GLdouble -> IO ()
fogCoord1v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glFogCoorddv
class FogCoord a where
fogCoord :: a -> IO ()
fogCoordv :: Ptr a -> IO ()
instance FogCoordComponent a => FogCoord (FogCoord1 a) where
fogCoord :: FogCoord1 a -> IO ()
fogCoord (FogCoord1 a
c) = forall a. FogCoordComponent a => a -> IO ()
fogCoord1 a
c
fogCoordv :: Ptr (FogCoord1 a) -> IO ()
fogCoordv = forall a. FogCoordComponent a => Ptr a -> IO ()
fogCoord1v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (FogCoord1 b) -> Ptr b)
rgbaMode :: GettableStateVar Bool
rgbaMode :: GettableStateVar Bool
rgbaMode = forall a. IO a -> IO a
makeGettableStateVar (forall p a. GetPName1I p => (GLubyte -> a) -> p -> IO a
getBoolean1 forall a. (Eq a, Num a) => a -> Bool
unmarshalGLboolean PName1I
GetRGBAMode)
currentColor :: StateVar (Color4 GLfloat)
currentColor :: StateVar (Color4 GLfloat)
currentColor =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar (forall p a.
GetPName4F p =>
(GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getFloat4 forall a. a -> a -> a -> a -> Color4 a
Color4 PName4F
GetCurrentColor) forall a. Color a => a -> IO ()
color
currentSecondaryColor :: StateVar (Color3 GLfloat)
currentSecondaryColor :: StateVar (Color3 GLfloat)
currentSecondaryColor =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar
(do Color4 GLfloat
r GLfloat
g GLfloat
b GLfloat
_ <- forall p a.
GetPName4F p =>
(GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getFloat4 forall a. a -> a -> a -> a -> Color4 a
Color4 PName4F
GetCurrentSecondaryColor
forall (m :: * -> *) a. Monad m => a -> m a
return forall a b. (a -> b) -> a -> b
$ forall a. a -> a -> a -> Color3 a
Color3 GLfloat
r GLfloat
g GLfloat
b)
forall a. SecondaryColor a => a -> IO ()
secondaryColor
class ColorComponent a where
color3 :: a -> a -> a -> IO ()
color4 :: a -> a -> a -> a -> IO ()
color3v :: Ptr a -> IO ()
color4v :: Ptr a -> IO ()
secondaryColor3 :: a -> a -> a -> IO ()
secondaryColor3v :: Ptr a -> IO ()
instance ColorComponent GLbyte where
color3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLbyte -> GLbyte -> GLbyte -> m ()
glColor3b
color4 :: GLbyte -> GLbyte -> GLbyte -> GLbyte -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLbyte -> GLbyte -> GLbyte -> GLbyte -> m ()
glColor4b
color3v :: Ptr GLbyte -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
glColor3bv
color4v :: Ptr GLbyte -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
glColor4bv
secondaryColor3 :: GLbyte -> GLbyte -> GLbyte -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLbyte -> GLbyte -> GLbyte -> m ()
glSecondaryColor3b
secondaryColor3v :: Ptr GLbyte -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLbyte -> m ()
glSecondaryColor3bv
instance ColorComponent GLshort where
color3 :: GLshort -> GLshort -> GLshort -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> m ()
glColor3s
color4 :: GLshort -> GLshort -> GLshort -> GLshort -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> GLshort -> m ()
glColor4s
color3v :: Ptr GLshort -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glColor3sv
color4v :: Ptr GLshort -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glColor4sv
secondaryColor3 :: GLshort -> GLshort -> GLshort -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLshort -> GLshort -> GLshort -> m ()
glSecondaryColor3s
secondaryColor3v :: Ptr GLshort -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glSecondaryColor3sv
instance ColorComponent GLint where
color3 :: GLint -> GLint -> GLint -> IO ()
color3 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
glColor3i
color4 :: GLint -> GLint -> GLint -> GLint -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLint -> GLint -> GLint -> GLint -> m ()
glColor4i
color3v :: Ptr GLint -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glColor3iv
color4v :: Ptr GLint -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glColor4iv
secondaryColor3 :: GLint -> GLint -> GLint -> IO ()
secondaryColor3 = forall (m :: * -> *). MonadIO m => GLint -> GLint -> GLint -> m ()
glSecondaryColor3i
secondaryColor3v :: Ptr GLint -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glSecondaryColor3iv
instance ColorComponent GLfloat where
color3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> m ()
glColor3f
color4 :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
glColor4f
color3v :: Ptr GLfloat -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glColor3fv
color4v :: Ptr GLfloat -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glColor4fv
secondaryColor3 :: GLfloat -> GLfloat -> GLfloat -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLfloat -> GLfloat -> GLfloat -> m ()
glSecondaryColor3f
secondaryColor3v :: Ptr GLfloat -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glSecondaryColor3fv
instance ColorComponent GLdouble where
color3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> m ()
glColor3d
color4 :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
glColor4d
color3v :: Ptr GLdouble -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glColor3dv
color4v :: Ptr GLdouble -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glColor4dv
secondaryColor3 :: GLdouble -> GLdouble -> GLdouble -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLdouble -> GLdouble -> GLdouble -> m ()
glSecondaryColor3d
secondaryColor3v :: Ptr GLdouble -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glSecondaryColor3dv
instance ColorComponent GLubyte where
color3 :: GLubyte -> GLubyte -> GLubyte -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLubyte -> GLubyte -> GLubyte -> m ()
glColor3ub
color4 :: GLubyte -> GLubyte -> GLubyte -> GLubyte -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLubyte -> GLubyte -> GLubyte -> GLubyte -> m ()
glColor4ub
color3v :: Ptr GLubyte -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLubyte -> m ()
glColor3ubv
color4v :: Ptr GLubyte -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLubyte -> m ()
glColor4ubv
secondaryColor3 :: GLubyte -> GLubyte -> GLubyte -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLubyte -> GLubyte -> GLubyte -> m ()
glSecondaryColor3ub
secondaryColor3v :: Ptr GLubyte -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLubyte -> m ()
glSecondaryColor3ubv
instance ColorComponent GLushort where
color3 :: GLushort -> GLushort -> GLushort -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLushort -> GLushort -> GLushort -> m ()
glColor3us
color4 :: GLushort -> GLushort -> GLushort -> GLushort -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLushort -> GLushort -> GLushort -> GLushort -> m ()
glColor4us
color3v :: Ptr GLushort -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
glColor3usv
color4v :: Ptr GLushort -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
glColor4usv
secondaryColor3 :: GLushort -> GLushort -> GLushort -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLushort -> GLushort -> GLushort -> m ()
glSecondaryColor3us
secondaryColor3v :: Ptr GLushort -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLushort -> m ()
glSecondaryColor3usv
instance ColorComponent GLuint where
color3 :: GLuint -> GLuint -> GLuint -> IO ()
color3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> m ()
glColor3ui
color4 :: GLuint -> GLuint -> GLuint -> GLuint -> IO ()
color4 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> m ()
glColor4ui
color3v :: Ptr GLuint -> IO ()
color3v = forall (m :: * -> *). MonadIO m => Ptr GLuint -> m ()
glColor3uiv
color4v :: Ptr GLuint -> IO ()
color4v = forall (m :: * -> *). MonadIO m => Ptr GLuint -> m ()
glColor4uiv
secondaryColor3 :: GLuint -> GLuint -> GLuint -> IO ()
secondaryColor3 = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> m ()
glSecondaryColor3ui
secondaryColor3v :: Ptr GLuint -> IO ()
secondaryColor3v = forall (m :: * -> *). MonadIO m => Ptr GLuint -> m ()
glSecondaryColor3uiv
class Color a where
color :: a -> IO ()
colorv :: Ptr a -> IO ()
instance ColorComponent a => Color (Color3 a) where
color :: Color3 a -> IO ()
color (Color3 a
r a
g a
b) = forall a. ColorComponent a => a -> a -> a -> IO ()
color3 a
r a
g a
b
colorv :: Ptr (Color3 a) -> IO ()
colorv = forall a. ColorComponent a => Ptr a -> IO ()
color3v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color3 b) -> Ptr b)
instance ColorComponent a => Color (Color4 a) where
color :: Color4 a -> IO ()
color (Color4 a
r a
g a
b a
a) = forall a. ColorComponent a => a -> a -> a -> a -> IO ()
color4 a
r a
g a
b a
a
colorv :: Ptr (Color4 a) -> IO ()
colorv = forall a. ColorComponent a => Ptr a -> IO ()
color4v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color4 b) -> Ptr b)
class SecondaryColor a where
secondaryColor :: a -> IO ()
secondaryColorv :: Ptr a -> IO ()
instance ColorComponent a => SecondaryColor (Color3 a) where
secondaryColor :: Color3 a -> IO ()
secondaryColor (Color3 a
r a
g a
b) = forall a. ColorComponent a => a -> a -> a -> IO ()
secondaryColor3 a
r a
g a
b
secondaryColorv :: Ptr (Color3 a) -> IO ()
secondaryColorv = forall a. ColorComponent a => Ptr a -> IO ()
secondaryColor3v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color3 b) -> Ptr b)
currentIndex :: StateVar (Index1 GLint)
currentIndex :: StateVar (Index1 GLint)
currentIndex = forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar (forall p a. GetPName1I p => (GLint -> a) -> p -> IO a
getInteger1 forall a. a -> Index1 a
Index1 PName1I
GetCurrentIndex) forall a. Index a => a -> IO ()
index
class IndexComponent a where
index1 :: a -> IO ()
index1v :: Ptr a -> IO ()
instance IndexComponent GLshort where
index1 :: GLshort -> IO ()
index1 = forall (m :: * -> *). MonadIO m => GLshort -> m ()
glIndexs
index1v :: Ptr GLshort -> IO ()
index1v = forall (m :: * -> *). MonadIO m => Ptr GLshort -> m ()
glIndexsv
instance IndexComponent GLint where
index1 :: GLint -> IO ()
index1 = forall (m :: * -> *). MonadIO m => GLint -> m ()
glIndexi
index1v :: Ptr GLint -> IO ()
index1v = forall (m :: * -> *). MonadIO m => Ptr GLint -> m ()
glIndexiv
instance IndexComponent GLfloat where
index1 :: GLfloat -> IO ()
index1 = forall (m :: * -> *). MonadIO m => GLfloat -> m ()
glIndexf
index1v :: Ptr GLfloat -> IO ()
index1v = forall (m :: * -> *). MonadIO m => Ptr GLfloat -> m ()
glIndexfv
instance IndexComponent GLdouble where
index1 :: GLdouble -> IO ()
index1 = forall (m :: * -> *). MonadIO m => GLdouble -> m ()
glIndexd
index1v :: Ptr GLdouble -> IO ()
index1v = forall (m :: * -> *). MonadIO m => Ptr GLdouble -> m ()
glIndexdv
instance IndexComponent GLubyte where
index1 :: GLubyte -> IO ()
index1 = forall (m :: * -> *). MonadIO m => GLubyte -> m ()
glIndexub
index1v :: Ptr GLubyte -> IO ()
index1v = forall (m :: * -> *). MonadIO m => Ptr GLubyte -> m ()
glIndexubv
class Index a where
index :: a -> IO ()
indexv :: Ptr a -> IO ()
instance IndexComponent a => Index (Index1 a) where
index :: Index1 a -> IO ()
index (Index1 a
i) = forall a. IndexComponent a => a -> IO ()
index1 a
i
indexv :: Ptr (Index1 a) -> IO ()
indexv = forall a. IndexComponent a => Ptr a -> IO ()
index1v forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Index1 b) -> Ptr b)
data IntegerHandling =
ToFloat
| ToNormalizedFloat
| KeepIntegral
deriving ( IntegerHandling -> IntegerHandling -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IntegerHandling -> IntegerHandling -> Bool
$c/= :: IntegerHandling -> IntegerHandling -> Bool
== :: IntegerHandling -> IntegerHandling -> Bool
$c== :: IntegerHandling -> IntegerHandling -> Bool
Eq, Eq IntegerHandling
IntegerHandling -> IntegerHandling -> Bool
IntegerHandling -> IntegerHandling -> Ordering
IntegerHandling -> IntegerHandling -> IntegerHandling
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IntegerHandling -> IntegerHandling -> IntegerHandling
$cmin :: IntegerHandling -> IntegerHandling -> IntegerHandling
max :: IntegerHandling -> IntegerHandling -> IntegerHandling
$cmax :: IntegerHandling -> IntegerHandling -> IntegerHandling
>= :: IntegerHandling -> IntegerHandling -> Bool
$c>= :: IntegerHandling -> IntegerHandling -> Bool
> :: IntegerHandling -> IntegerHandling -> Bool
$c> :: IntegerHandling -> IntegerHandling -> Bool
<= :: IntegerHandling -> IntegerHandling -> Bool
$c<= :: IntegerHandling -> IntegerHandling -> Bool
< :: IntegerHandling -> IntegerHandling -> Bool
$c< :: IntegerHandling -> IntegerHandling -> Bool
compare :: IntegerHandling -> IntegerHandling -> Ordering
$ccompare :: IntegerHandling -> IntegerHandling -> Ordering
Ord, Int -> IntegerHandling -> ShowS
[IntegerHandling] -> ShowS
IntegerHandling -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IntegerHandling] -> ShowS
$cshowList :: [IntegerHandling] -> ShowS
show :: IntegerHandling -> String
$cshow :: IntegerHandling -> String
showsPrec :: Int -> IntegerHandling -> ShowS
$cshowsPrec :: Int -> IntegerHandling -> ShowS
Show )
currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
currentVertexAttrib AttribLocation
location =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar
(forall b.
(GLfloat -> GLfloat -> GLfloat -> GLfloat -> b)
-> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribFloat4 forall a. a -> a -> a -> a -> Vertex4 a
Vertex4 AttribLocation
location GetVertexAttribPName
GetCurrentVertexAttrib)
(forall a.
VertexAttrib a =>
IntegerHandling -> AttribLocation -> a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location)
currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
currentVertexAttribI AttribLocation
location =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar
(forall b.
(GLint -> GLint -> GLint -> GLint -> b)
-> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribIInteger4 forall a. a -> a -> a -> a -> Vertex4 a
Vertex4 AttribLocation
location GetVertexAttribPName
GetCurrentVertexAttrib)
(forall a.
VertexAttrib a =>
IntegerHandling -> AttribLocation -> a -> IO ()
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location)
currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint)
currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint)
currentVertexAttribIu AttribLocation
location =
forall a. IO a -> (a -> IO ()) -> StateVar a
makeStateVar
(forall b.
(GLuint -> GLuint -> GLuint -> GLuint -> b)
-> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribIuInteger4 forall a. a -> a -> a -> a -> Vertex4 a
Vertex4 AttribLocation
location GetVertexAttribPName
GetCurrentVertexAttrib)
(forall a.
VertexAttrib a =>
IntegerHandling -> AttribLocation -> a -> IO ()
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location)
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 ()
vertexAttrib1 AttribLocation
location a
x = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
x a
0 a
0 a
1
vertexAttrib2 AttribLocation
location a
x a
y = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
x a
y a
0 a
1
vertexAttrib3 AttribLocation
location a
x a
y a
z = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
x a
y a
z a
1
vertexAttrib4 AttribLocation
location a
x a
y a
z a
w = forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
allocaArray Int
4 forall a b. (a -> b) -> a -> b
$ \Ptr a
buf -> do
forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
poke4 Ptr a
buf a
x a
y a
z a
w
forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v AttribLocation
location Ptr a
buf
vertexAttrib1N AttribLocation
location a
x = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
x a
0 a
0 a
1
vertexAttrib2N AttribLocation
location a
x a
y = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
x a
y a
0 a
1
vertexAttrib3N AttribLocation
location a
x a
y a
z = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
x a
y a
z a
1
vertexAttrib4N AttribLocation
location a
x a
y a
z a
w = forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
allocaArray Int
4 forall a b. (a -> b) -> a -> b
$ \Ptr a
buf -> do
forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
poke4 Ptr a
buf a
x a
y a
z a
w
forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv AttribLocation
location Ptr a
buf
vertexAttrib1I AttribLocation
location a
x = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
x a
0 a
0 a
1
vertexAttrib2I AttribLocation
location a
x a
y = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
x a
y a
0 a
1
vertexAttrib3I AttribLocation
location a
x a
y a
z = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
x a
y a
z a
1
vertexAttrib4I AttribLocation
location a
x a
y a
z a
w = forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
allocaArray Int
4 forall a b. (a -> b) -> a -> b
$ \Ptr a
buf -> do
forall a. Storable a => Ptr a -> a -> a -> a -> a -> IO ()
poke4 Ptr a
buf a
x a
y a
z a
w
forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv AttribLocation
location Ptr a
buf
vertexAttrib1v AttribLocation
location = forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
peek1M forall a b. (a -> b) -> a -> b
$ forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location
vertexAttrib2v AttribLocation
location = forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
peek2M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2 AttribLocation
location
vertexAttrib3v AttribLocation
location = forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
peek3M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location
vertexAttrib1Nv AttribLocation
location = forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
peek1M forall a b. (a -> b) -> a -> b
$ forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location
vertexAttrib2Nv AttribLocation
location = forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
peek2M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2N AttribLocation
location
vertexAttrib3Nv AttribLocation
location = forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
peek3M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location
vertexAttrib1Iv AttribLocation
location = forall a b. Storable a => (a -> IO b) -> Ptr a -> IO b
peek1M forall a b. (a -> b) -> a -> b
$ forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location
vertexAttrib2Iv AttribLocation
location = forall a b. Storable a => (a -> a -> IO b) -> Ptr a -> IO b
peek2M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2I AttribLocation
location
vertexAttrib3Iv AttribLocation
location = forall a b. Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
peek3M forall a b. (a -> b) -> a -> b
$ forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location
instance VertexAttribComponent GLbyte where
vertexAttrib4v :: AttribLocation -> Ptr GLbyte -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLbyte -> m ()
glVertexAttrib4bv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLbyte -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLbyte -> m ()
glVertexAttrib4Nbv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLbyte -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLbyte -> m ()
glVertexAttribI4bv GLuint
al
instance VertexAttribComponent GLubyte where
vertexAttrib4N :: AttribLocation -> GLubyte -> GLubyte -> GLubyte -> GLubyte -> IO ()
vertexAttrib4N (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLubyte -> GLubyte -> GLubyte -> GLubyte -> m ()
glVertexAttrib4Nub GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLubyte -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLubyte -> m ()
glVertexAttrib4ubv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLubyte -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLubyte -> m ()
glVertexAttrib4Nubv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLubyte -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLubyte -> m ()
glVertexAttribI4ubv GLuint
al
instance VertexAttribComponent GLshort where
vertexAttrib1 :: AttribLocation -> GLshort -> IO ()
vertexAttrib1 (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLshort -> m ()
glVertexAttrib1s GLuint
al
vertexAttrib2 :: AttribLocation -> GLshort -> GLshort -> IO ()
vertexAttrib2 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> m ()
glVertexAttrib2s GLuint
al
vertexAttrib3 :: AttribLocation -> GLshort -> GLshort -> GLshort -> IO ()
vertexAttrib3 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> GLshort -> m ()
glVertexAttrib3s GLuint
al
vertexAttrib4 :: AttribLocation -> GLshort -> GLshort -> GLshort -> GLshort -> IO ()
vertexAttrib4 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLshort -> GLshort -> GLshort -> GLshort -> m ()
glVertexAttrib4s GLuint
al
vertexAttrib1v :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib1v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttrib1sv GLuint
al
vertexAttrib2v :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib2v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttrib2sv GLuint
al
vertexAttrib3v :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib3v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttrib3sv GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttrib4sv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttrib4Nsv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLshort -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLshort -> m ()
glVertexAttribI4sv GLuint
al
instance VertexAttribComponent GLushort where
vertexAttrib4v :: AttribLocation -> Ptr GLushort -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLushort -> m ()
glVertexAttrib4usv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLushort -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLushort -> m ()
glVertexAttrib4Nusv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLushort -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLushort -> m ()
glVertexAttribI4usv GLuint
al
instance VertexAttribComponent GLint where
vertexAttrib1I :: AttribLocation -> GLint -> IO ()
vertexAttrib1I (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLint -> m ()
glVertexAttribI1i GLuint
al
vertexAttrib2I :: AttribLocation -> GLint -> GLint -> IO ()
vertexAttrib2I (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLint -> GLint -> m ()
glVertexAttribI2i GLuint
al
vertexAttrib3I :: AttribLocation -> GLint -> GLint -> GLint -> IO ()
vertexAttrib3I (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLint -> GLint -> GLint -> m ()
glVertexAttribI3i GLuint
al
vertexAttrib4I :: AttribLocation -> GLint -> GLint -> GLint -> GLint -> IO ()
vertexAttrib4I (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLint -> GLint -> GLint -> GLint -> m ()
glVertexAttribI4i GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttrib4iv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttrib4Niv GLuint
al
vertexAttrib1Iv :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib1Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttribI1iv GLuint
al
vertexAttrib2Iv :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib2Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttribI2iv GLuint
al
vertexAttrib3Iv :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib3Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttribI3iv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLint -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLint -> m ()
glVertexAttribI4iv GLuint
al
instance VertexAttribComponent GLuint where
vertexAttrib1I :: AttribLocation -> GLuint -> IO ()
vertexAttrib1I (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLuint -> m ()
glVertexAttribI1ui GLuint
al
vertexAttrib2I :: AttribLocation -> GLuint -> GLuint -> IO ()
vertexAttrib2I (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> m ()
glVertexAttribI2ui GLuint
al
vertexAttrib3I :: AttribLocation -> GLuint -> GLuint -> GLuint -> IO ()
vertexAttrib3I (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> m ()
glVertexAttribI3ui GLuint
al
vertexAttrib4I :: AttribLocation -> GLuint -> GLuint -> GLuint -> GLuint -> IO ()
vertexAttrib4I (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> GLuint -> m ()
glVertexAttribI4ui GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttrib4uiv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib4Nv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttrib4Nuiv GLuint
al
vertexAttrib1Iv :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib1Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttribI1uiv GLuint
al
vertexAttrib2Iv :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib2Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttribI2uiv GLuint
al
vertexAttrib3Iv :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib3Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttribI3uiv GLuint
al
vertexAttrib4Iv :: AttribLocation -> Ptr GLuint -> IO ()
vertexAttrib4Iv (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLuint -> m ()
glVertexAttribI4uiv GLuint
al
instance VertexAttribComponent GLfloat where
vertexAttrib1 :: AttribLocation -> GLfloat -> IO ()
vertexAttrib1 (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLfloat -> m ()
glVertexAttrib1f GLuint
al
vertexAttrib2 :: AttribLocation -> GLfloat -> GLfloat -> IO ()
vertexAttrib2 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> m ()
glVertexAttrib2f GLuint
al
vertexAttrib3 :: AttribLocation -> GLfloat -> GLfloat -> GLfloat -> IO ()
vertexAttrib3 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> GLfloat -> m ()
glVertexAttrib3f GLuint
al
vertexAttrib4 :: AttribLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> IO ()
vertexAttrib4 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> m ()
glVertexAttrib4f GLuint
al
vertexAttrib1v :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib1v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glVertexAttrib1fv GLuint
al
vertexAttrib2v :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib2v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glVertexAttrib2fv GLuint
al
vertexAttrib3v :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib3v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glVertexAttrib3fv GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLfloat -> m ()
glVertexAttrib4fv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib4Nv = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v
vertexAttrib4Iv :: AttribLocation -> Ptr GLfloat -> IO ()
vertexAttrib4Iv = forall a.
(Storable a, RealFrac a) =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4IvRealFrac
vertexAttrib4IvRealFrac :: (Storable a, RealFrac a) => AttribLocation -> Ptr a -> IO ()
vertexAttrib4IvRealFrac :: forall a.
(Storable a, RealFrac a) =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4IvRealFrac AttribLocation
location = forall a b.
Storable a =>
(a -> a -> a -> a -> IO b) -> Ptr a -> IO b
peek4M forall a b. (a -> b) -> a -> b
$ \a
x a
y a
z a
w ->
forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location (forall a. RealFrac a => a -> GLint
toGLint a
x) (forall a. RealFrac a => a -> GLint
toGLint a
y) (forall a. RealFrac a => a -> GLint
toGLint a
z) (forall a. RealFrac a => a -> GLint
toGLint a
w)
toGLint :: RealFrac a => a -> GLint
toGLint :: forall a. RealFrac a => a -> GLint
toGLint = forall a b. (RealFrac a, Integral b) => a -> b
truncate forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Bounded a => a
maxBound :: GLint) forall a. Num a => a -> a -> a
*)forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
clamp
where clamp :: a -> a
clamp = forall a. Ord a => a -> a -> a
max (-a
1.0) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Ord a => a -> a -> a
min a
1.0
instance VertexAttribComponent GLdouble where
vertexAttrib1 :: AttribLocation -> GLdouble -> IO ()
vertexAttrib1 (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> GLdouble -> m ()
glVertexAttrib1d GLuint
al
vertexAttrib2 :: AttribLocation -> GLdouble -> GLdouble -> IO ()
vertexAttrib2 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> m ()
glVertexAttrib2d GLuint
al
vertexAttrib3 :: AttribLocation -> GLdouble -> GLdouble -> GLdouble -> IO ()
vertexAttrib3 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> GLdouble -> m ()
glVertexAttrib3d GLuint
al
vertexAttrib4 :: AttribLocation
-> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
vertexAttrib4 (AttribLocation GLuint
al) = forall (m :: * -> *).
MonadIO m =>
GLuint -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> m ()
glVertexAttrib4d GLuint
al
vertexAttrib1v :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib1v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glVertexAttrib1dv GLuint
al
vertexAttrib2v :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib2v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glVertexAttrib2dv GLuint
al
vertexAttrib3v :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib3v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glVertexAttrib3dv GLuint
al
vertexAttrib4v :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib4v (AttribLocation GLuint
al) = forall (m :: * -> *). MonadIO m => GLuint -> Ptr GLdouble -> m ()
glVertexAttrib4dv GLuint
al
vertexAttrib4Nv :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib4Nv = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v
vertexAttrib4Iv :: AttribLocation -> Ptr GLdouble -> IO ()
vertexAttrib4Iv = forall a.
(Storable a, RealFrac a) =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4IvRealFrac
class VertexAttrib a where
vertexAttrib :: IntegerHandling -> AttribLocation -> a -> IO ()
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr a -> IO ()
instance VertexAttribComponent a => VertexAttrib (Vertex1 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex1 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vertex1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location a
i
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vertex1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location a
i
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vertex1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location a
i
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex1 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex1 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex1 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex1 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vertex2 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex2 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vertex2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2 AttribLocation
location a
x a
y
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vertex2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2N AttribLocation
location a
x a
y
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vertex2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2I AttribLocation
location a
x a
y
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex2 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex2 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex2 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex2 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vertex3 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex3 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vertex3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vertex3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vertex3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location a
x a
y a
z
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex3 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex3 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex3 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex3 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vertex4 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vertex4 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vertex4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
x a
y a
z a
w
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vertex4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
x a
y a
z a
w
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vertex4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
x a
y a
z a
w
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vertex4 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex4 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex4 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vertex4 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vector1 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vector1 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vector1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location a
i
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vector1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location a
i
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vector1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location a
i
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector1 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector1 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector1 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector1 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vector2 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vector2 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vector2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2 AttribLocation
location a
x a
y
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vector2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2N AttribLocation
location a
x a
y
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vector2 a
x a
y) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2I AttribLocation
location a
x a
y
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector2 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector2 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector2 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector2 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vector3 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vector3 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vector3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vector3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vector3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location a
x a
y a
z
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector3 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector3 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector3 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector3 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Vector4 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Vector4 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Vector4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
x a
y a
z a
w
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Vector4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
x a
y a
z a
w
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Vector4 a
x a
y a
z a
w) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
x a
y a
z a
w
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Vector4 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector4 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector4 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Vector4 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (TexCoord1 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord1 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (TexCoord1 a
s) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location a
s
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (TexCoord1 a
s) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location a
s
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (TexCoord1 a
s) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location a
s
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord1 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord1 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord1 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord1 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (TexCoord2 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord2 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (TexCoord2 a
s a
t) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2 AttribLocation
location a
s a
t
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (TexCoord2 a
s a
t) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2N AttribLocation
location a
s a
t
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (TexCoord2 a
s a
t) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> IO ()
vertexAttrib2I AttribLocation
location a
s a
t
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord2 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord2 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord2 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib2Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord2 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (TexCoord3 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord3 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (TexCoord3 a
s a
t a
u) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location a
s a
t a
u
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (TexCoord3 a
s a
t a
u) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location a
s a
t a
u
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (TexCoord3 a
s a
t a
u) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location a
s a
t a
u
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord3 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord3 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord3 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord3 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (TexCoord4 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> TexCoord4 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (TexCoord4 a
s a
t a
u a
v) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
s a
t a
u a
v
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (TexCoord4 a
s a
t a
u a
v) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
s a
t a
u a
v
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (TexCoord4 a
s a
t a
u a
v) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
s a
t a
u a
v
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (TexCoord4 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord4 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord4 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (TexCoord4 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Normal3 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Normal3 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Normal3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Normal3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location a
x a
y a
z
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Normal3 a
x a
y a
z) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location a
x a
y a
z
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Normal3 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Normal3 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Normal3 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Normal3 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (FogCoord1 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> FogCoord1 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (FogCoord1 a
c) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location a
c
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (FogCoord1 a
c) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location a
c
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (FogCoord1 a
c) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location a
c
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (FogCoord1 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (FogCoord1 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (FogCoord1 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (FogCoord1 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Color3 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Color3 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Color3 a
r a
g a
b) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3 AttribLocation
location a
r a
g a
b
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Color3 a
r a
g a
b) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3N AttribLocation
location a
r a
g a
b
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Color3 a
r a
g a
b) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> IO ()
vertexAttrib3I AttribLocation
location a
r a
g a
b
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color3 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color3 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color3 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color3 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Color4 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Color4 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Color4 a
r a
g a
b a
a) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4 AttribLocation
location a
r a
g a
b a
a
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Color4 a
r a
g a
b a
a) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4N AttribLocation
location a
r a
g a
b a
a
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Color4 a
r a
g a
b a
a) = forall a.
VertexAttribComponent a =>
AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib4I AttribLocation
location a
r a
g a
b a
a
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Color4 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color4 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color4 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Color4 b) -> Ptr b)
instance VertexAttribComponent a => VertexAttrib (Index1 a) where
vertexAttrib :: IntegerHandling -> AttribLocation -> Index1 a -> IO ()
vertexAttrib IntegerHandling
ToFloat AttribLocation
location (Index1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1 AttribLocation
location a
i
vertexAttrib IntegerHandling
ToNormalizedFloat AttribLocation
location (Index1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1N AttribLocation
location a
i
vertexAttrib IntegerHandling
KeepIntegral AttribLocation
location (Index1 a
i) = forall a. VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib1I AttribLocation
location a
i
vertexAttribv :: IntegerHandling -> AttribLocation -> Ptr (Index1 a) -> IO ()
vertexAttribv IntegerHandling
ToFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1v AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Index1 b) -> Ptr b)
vertexAttribv IntegerHandling
ToNormalizedFloat AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Index1 b) -> Ptr b)
vertexAttribv IntegerHandling
KeepIntegral AttribLocation
location = forall a.
VertexAttribComponent a =>
AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv AttribLocation
location forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. Ptr a -> Ptr b
castPtr :: Ptr (Index1 b) -> Ptr b)
maxTextureUnit :: GettableStateVar TextureUnit
maxTextureUnit :: GettableStateVar TextureUnit
maxTextureUnit =
forall a. IO a -> IO a
makeGettableStateVar (forall p a. GetPName1I p => (GLuint -> a) -> p -> IO a
getEnum1 (GLuint -> TextureUnit
TextureUnit forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) PName1I
GetMaxTextureUnits)