{-# OPTIONS -Wall #-}
{-# LANGUAGE TemplateHaskell #-}
module Raylib.Util.RLGL
(
rlMatrixMode,
rlPushMatrix,
rlPopMatrix,
rlLoadIdentity,
rlTranslatef,
rlRotatef,
rlScalef,
rlMultMatrixf,
rlFrustum,
rlOrtho,
rlViewport,
rlBegin,
rlEnd,
rlVertex2i,
rlVertex2f,
rlVertex3f,
rlTexCoord2f,
rlNormal3f,
rlColor4ub,
rlColor3f,
rlColor4f,
rlEnableVertexArray,
rlDisableVertexArray,
rlEnableVertexBuffer,
rlDisableVertexBuffer,
rlEnableVertexBufferElement,
rlDisableVertexBufferElement,
rlEnableVertexAttribute,
rlDisableVertexAttribute,
rlActiveTextureSlot,
rlEnableTexture,
rlDisableTexture,
rlEnableTextureCubemap,
rlDisableTextureCubemap,
rlTextureParameters,
rlCubemapParameters,
rlEnableShader,
rlDisableShader,
rlEnableFramebuffer,
rlDisableFramebuffer,
rlGetActiveFramebuffer,
rlActiveDrawBuffers,
rlBlitFramebuffer,
rlBindFramebuffer,
rlEnableColorBlend,
rlDisableColorBlend,
rlEnableDepthTest,
rlDisableDepthTest,
rlEnableDepthMask,
rlDisableDepthMask,
rlEnableBackfaceCulling,
rlDisableBackfaceCulling,
rlColorMask,
rlSetCullFace,
rlEnableScissorTest,
rlDisableScissorTest,
rlScissor,
rlEnableWireMode,
rlEnablePointMode,
rlDisableWireMode,
rlSetLineWidth,
rlGetLineWidth,
rlEnableSmoothLines,
rlDisableSmoothLines,
rlEnableStereoRender,
rlDisableStereoRender,
rlIsStereoRenderEnabled,
rlClearColor,
rlClearScreenBuffers,
rlCheckErrors,
rlSetBlendMode,
rlSetBlendFactors,
rlSetBlendFactorsSeparate,
rlglInit,
rlglClose,
rlLoadExtensions,
rlGetVersion,
rlSetFramebufferWidth,
rlGetFramebufferWidth,
rlSetFramebufferHeight,
rlGetFramebufferHeight,
rlGetTextureIdDefault,
rlGetShaderIdDefault,
rlGetShaderLocsDefault,
rlLoadRenderBatch,
rlUnloadRenderBatch,
rlDrawRenderBatch,
rlSetRenderBatchActive,
rlDrawRenderBatchActive,
rlCheckRenderBatchLimit,
rlSetTexture,
rlLoadVertexArray,
rlLoadVertexBuffer,
rlLoadVertexBufferElement,
rlUpdateVertexBuffer,
rlUpdateVertexBufferElements,
rlUnloadVertexArray,
rlUnloadVertexBuffer,
rlSetVertexAttribute,
rlSetVertexAttributeDivisor,
rlSetVertexAttributeDefault,
rlDrawVertexArray,
rlDrawVertexArrayElements,
rlDrawVertexArrayInstanced,
rlDrawVertexArrayElementsInstanced,
rlLoadTexture,
rlLoadTextureDepth,
rlLoadTextureCubemap,
rlUpdateTexture,
rlGetGlTextureFormats,
rlGetPixelFormatName,
rlUnloadTexture,
rlGenTextureMipmaps,
rlReadTexturePixels,
rlReadScreenPixels,
rlLoadFramebuffer,
rlFramebufferAttach,
rlFramebufferComplete,
rlUnloadFramebuffer,
rlLoadShaderCode,
rlCompileShader,
rlLoadShaderProgram,
rlUnloadShaderProgram,
rlGetLocationUniform,
rlGetLocationAttrib,
rlSetUniform,
rlSetUniformMatrix,
rlSetUniformSampler,
rlSetShader,
rlLoadComputeShaderProgram,
rlComputeShaderDispatch,
rlLoadShaderBuffer,
rlUnloadShaderBuffer,
rlUpdateShaderBuffer,
rlBindShaderBuffer,
rlCopyShaderBuffer,
rlGetShaderBufferSize,
rlBindImageTexture,
rlGetMatrixModelview,
rlGetMatrixProjection,
rlGetMatrixTransform,
rlGetMatrixProjectionStereo,
rlGetMatrixViewOffsetStereo,
rlSetMatrixProjection,
rlSetMatrixModelview,
rlSetMatrixProjectionStereo,
rlSetMatrixViewOffsetStereo,
rlLoadDrawCube,
rlLoadDrawQuad,
c'rlMatrixMode,
c'rlTranslatef,
c'rlRotatef,
c'rlScalef,
c'rlMultMatrixf,
c'rlFrustum,
c'rlOrtho,
c'rlViewport,
c'rlBegin,
c'rlVertex2i,
c'rlVertex2f,
c'rlVertex3f,
c'rlTexCoord2f,
c'rlNormal3f,
c'rlColor4ub,
c'rlColor3f,
c'rlColor4f,
c'rlEnableVertexArray,
c'rlEnableVertexBuffer,
c'rlEnableVertexBufferElement,
c'rlEnableVertexAttribute,
c'rlDisableVertexAttribute,
c'rlActiveTextureSlot,
c'rlEnableTexture,
c'rlEnableTextureCubemap,
c'rlTextureParameters,
c'rlCubemapParameters,
c'rlEnableShader,
c'rlEnableFramebuffer,
c'rlActiveDrawBuffers,
c'rlBlitFramebuffer,
c'rlBindFramebuffer,
c'rlColorMask,
c'rlSetCullFace,
c'rlScissor,
c'rlSetLineWidth,
c'rlGetLineWidth,
c'rlIsStereoRenderEnabled,
c'rlClearColor,
c'rlSetBlendMode,
c'rlSetBlendFactors,
c'rlSetBlendFactorsSeparate,
c'rlglInit,
c'rlLoadExtensions,
c'rlGetVersion,
c'rlSetFramebufferWidth,
c'rlGetFramebufferWidth,
c'rlSetFramebufferHeight,
c'rlGetFramebufferHeight,
c'rlGetTextureIdDefault,
c'rlGetShaderIdDefault,
c'rlGetShaderLocsDefault,
c'rlLoadRenderBatch,
c'rlUnloadRenderBatch,
c'rlDrawRenderBatch,
c'rlSetRenderBatchActive,
c'rlCheckRenderBatchLimit,
c'rlSetTexture,
c'rlLoadVertexArray,
c'rlLoadVertexBuffer,
c'rlLoadVertexBufferElement,
c'rlUpdateVertexBuffer,
c'rlUpdateVertexBufferElements,
c'rlUnloadVertexArray,
c'rlUnloadVertexBuffer,
c'rlSetVertexAttribute,
c'rlSetVertexAttributeDivisor,
c'rlSetVertexAttributeDefault,
c'rlDrawVertexArray,
c'rlDrawVertexArrayElements,
c'rlDrawVertexArrayInstanced,
c'rlDrawVertexArrayElementsInstanced,
c'rlLoadTexture,
c'rlLoadTextureDepth,
c'rlLoadTextureCubemap,
c'rlUpdateTexture,
c'rlGetGlTextureFormats,
c'rlGetPixelFormatName,
c'rlUnloadTexture,
c'rlGenTextureMipmaps,
c'rlReadTexturePixels,
c'rlReadScreenPixels,
c'rlLoadFramebuffer,
c'rlFramebufferAttach,
c'rlFramebufferComplete,
c'rlUnloadFramebuffer,
c'rlLoadShaderCode,
c'rlCompileShader,
c'rlLoadShaderProgram,
c'rlUnloadShaderProgram,
c'rlGetLocationUniform,
c'rlGetLocationAttrib,
c'rlSetUniform,
c'rlSetUniformMatrix,
c'rlSetUniformSampler,
c'rlSetShader,
c'rlLoadComputeShaderProgram,
c'rlComputeShaderDispatch,
c'rlLoadShaderBuffer,
c'rlUnloadShaderBuffer,
c'rlUpdateShaderBuffer,
c'rlBindShaderBuffer,
c'rlReadShaderBuffer,
c'rlCopyShaderBuffer,
c'rlGetShaderBufferSize,
c'rlBindImageTexture,
c'rlGetMatrixModelview,
c'rlGetMatrixProjection,
c'rlGetMatrixTransform,
c'rlGetMatrixProjectionStereo,
c'rlGetMatrixViewOffsetStereo,
c'rlSetMatrixProjection,
c'rlSetMatrixModelview,
c'rlSetMatrixProjectionStereo,
c'rlSetMatrixViewOffsetStereo,
c'rlGetPixelDataSize,
c'rlPushMatrix,
c'rlPopMatrix,
c'rlLoadIdentity,
c'rlEnd,
c'rlDisableVertexArray,
c'rlDisableVertexBuffer,
c'rlDisableVertexBufferElement,
c'rlDisableTexture,
c'rlDisableTextureCubemap,
c'rlDisableShader,
c'rlDisableFramebuffer,
c'rlGetActiveFramebuffer,
c'rlEnableColorBlend,
c'rlDisableColorBlend,
c'rlEnableDepthTest,
c'rlDisableDepthTest,
c'rlEnableDepthMask,
c'rlDisableDepthMask,
c'rlEnableBackfaceCulling,
c'rlDisableBackfaceCulling,
c'rlEnableScissorTest,
c'rlDisableScissorTest,
c'rlEnableWireMode,
c'rlEnablePointMode,
c'rlDisableWireMode,
c'rlEnableSmoothLines,
c'rlDisableSmoothLines,
c'rlEnableStereoRender,
c'rlDisableStereoRender,
c'rlClearScreenBuffers,
c'rlCheckErrors,
c'rlglClose,
c'rlDrawRenderBatchActive,
c'rlLoadDrawCube,
c'rlLoadDrawQuad
)
where
import Foreign
( Ptr,
Storable (peek, poke, sizeOf),
Word8,
castPtr,
fromBool,
malloc,
nullPtr,
toBool,
)
import Foreign.C
( CBool (..),
CDouble (..),
CFloat (..),
CInt (..),
CString,
CUChar (..),
CUInt (..),
CUShort,
withCString,
)
import Raylib.Internal.Foreign
( Freeable,
configsToBitflag,
pop,
popCArray,
withFreeable,
withFreeableArray,
withFreeableArrayLen,
)
import Raylib.Internal.TH (genNative)
import Raylib.Types
( Matrix,
RLBitField,
RLBlendMode,
RLBufferHint,
RLCullMode,
RLDrawMode,
RLFramebufferAttachTextureType,
RLFramebufferAttachType,
RLMatrixMode,
RLPixelFormat (..),
RLRenderBatch,
RLShaderType,
RLTextureParam,
ShaderUniformDataV,
unpackShaderUniformDataV,
)
$
rlMatrixMode :: RLMatrixMode -> IO ()
rlMatrixMode :: RLMatrixMode -> IO ()
rlMatrixMode RLMatrixMode
mode = CInt -> IO ()
c'rlMatrixMode (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLMatrixMode -> Int
forall a. Enum a => a -> Int
fromEnum RLMatrixMode
mode)
rlPushMatrix :: IO ()
rlPushMatrix :: IO ()
rlPushMatrix = IO ()
c'rlPushMatrix
rlPopMatrix :: IO ()
rlPopMatrix :: IO ()
rlPopMatrix = IO ()
c'rlPopMatrix
rlLoadIdentity :: IO ()
rlLoadIdentity :: IO ()
rlLoadIdentity = IO ()
c'rlLoadIdentity
rlTranslatef :: Float -> Float -> Float -> IO ()
rlTranslatef :: Float -> Float -> Float -> IO ()
rlTranslatef Float
x Float
y Float
z = CFloat -> CFloat -> CFloat -> IO ()
c'rlTranslatef (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z)
rlRotatef :: Float -> Float -> Float -> Float -> IO ()
rlRotatef :: Float -> Float -> Float -> Float -> IO ()
rlRotatef Float
angle Float
x Float
y Float
z = CFloat -> CFloat -> CFloat -> CFloat -> IO ()
c'rlRotatef (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
angle) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z)
rlScalef :: Float -> Float -> Float -> IO ()
rlScalef :: Float -> Float -> Float -> IO ()
rlScalef Float
x Float
y Float
z = CFloat -> CFloat -> CFloat -> IO ()
c'rlScalef (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z)
rlMultMatrixf :: [Float] -> IO ()
rlMultMatrixf :: [Float] -> IO ()
rlMultMatrixf [Float]
matf = [CFloat] -> (Ptr CFloat -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray ((Float -> CFloat) -> [Float] -> [CFloat]
forall a b. (a -> b) -> [a] -> [b]
map Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac [Float]
matf) Ptr CFloat -> IO ()
c'rlMultMatrixf
rlFrustum :: Double -> Double -> Double -> Double -> Double -> Double -> IO ()
rlFrustum :: Double -> Double -> Double -> Double -> Double -> Double -> IO ()
rlFrustum Double
left Double
right Double
bottom Double
top Double
znear Double
zfar = CDouble
-> CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()
c'rlFrustum (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
left) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
right) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
bottom) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
top) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
znear) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
zfar)
rlOrtho :: Double -> Double -> Double -> Double -> Double -> Double -> IO ()
rlOrtho :: Double -> Double -> Double -> Double -> Double -> Double -> IO ()
rlOrtho Double
left Double
right Double
bottom Double
top Double
znear Double
zfar = CDouble
-> CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()
c'rlOrtho (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
left) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
right) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
bottom) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
top) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
znear) (Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
zfar)
rlViewport :: Int -> Int -> Int -> Int -> IO ()
rlViewport :: Int -> Int -> Int -> Int -> IO ()
rlViewport Int
x Int
y Int
width Int
height = CInt -> CInt -> CInt -> CInt -> IO ()
c'rlViewport (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
y) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
rlBegin :: RLDrawMode -> IO ()
rlBegin :: RLDrawMode -> IO ()
rlBegin RLDrawMode
mode = CInt -> IO ()
c'rlBegin (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLDrawMode -> Int
forall a. Enum a => a -> Int
fromEnum RLDrawMode
mode)
rlEnd :: IO ()
rlEnd :: IO ()
rlEnd = IO ()
c'rlEnd
rlVertex2i :: Int -> Int -> IO ()
rlVertex2i :: Int -> Int -> IO ()
rlVertex2i Int
x Int
y = CInt -> CInt -> IO ()
c'rlVertex2i (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
y)
rlVertex2f :: Float -> Float -> IO ()
rlVertex2f :: Float -> Float -> IO ()
rlVertex2f Float
x Float
y = CFloat -> CFloat -> IO ()
c'rlVertex2f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y)
rlVertex3f :: Float -> Float -> Float -> IO ()
rlVertex3f :: Float -> Float -> Float -> IO ()
rlVertex3f Float
x Float
y Float
z = CFloat -> CFloat -> CFloat -> IO ()
c'rlVertex3f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z)
rlTexCoord2f :: Float -> Float -> IO ()
rlTexCoord2f :: Float -> Float -> IO ()
rlTexCoord2f Float
x Float
y = CFloat -> CFloat -> IO ()
c'rlTexCoord2f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y)
rlNormal3f :: Float -> Float -> Float -> IO ()
rlNormal3f :: Float -> Float -> Float -> IO ()
rlNormal3f Float
x Float
y Float
z = CFloat -> CFloat -> CFloat -> IO ()
c'rlNormal3f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
x) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
y) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
z)
rlColor4ub :: Word8 -> Word8 -> Word8 -> Word8 -> IO ()
rlColor4ub :: Word8 -> Word8 -> Word8 -> Word8 -> IO ()
rlColor4ub Word8
r Word8
g Word8
b Word8
a = CUChar -> CUChar -> CUChar -> CUChar -> IO ()
c'rlColor4ub (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
r) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
g) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
b) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
a)
rlColor3f :: Float -> Float -> Float -> IO ()
rlColor3f :: Float -> Float -> Float -> IO ()
rlColor3f Float
r Float
g Float
b = CFloat -> CFloat -> CFloat -> IO ()
c'rlColor3f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
r) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
g) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
b)
rlColor4f :: Float -> Float -> Float -> Float -> IO ()
rlColor4f :: Float -> Float -> Float -> Float -> IO ()
rlColor4f Float
r Float
g Float
b Float
a = CFloat -> CFloat -> CFloat -> CFloat -> IO ()
c'rlColor4f (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
r) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
g) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
b) (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
a)
rlEnableVertexArray :: Integer -> IO Bool
rlEnableVertexArray :: Integer -> IO Bool
rlEnableVertexArray Integer
vaoId = CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CUInt -> IO CBool
c'rlEnableVertexArray (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vaoId)
rlDisableVertexArray :: IO ()
rlDisableVertexArray :: IO ()
rlDisableVertexArray = IO ()
c'rlDisableVertexArray
rlEnableVertexBuffer :: Integer -> IO ()
rlEnableVertexBuffer :: Integer -> IO ()
rlEnableVertexBuffer Integer
vboId = CUInt -> IO ()
c'rlEnableVertexBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vboId)
rlDisableVertexBuffer :: IO ()
rlDisableVertexBuffer :: IO ()
rlDisableVertexBuffer = IO ()
c'rlDisableVertexBuffer
rlEnableVertexBufferElement :: Integer -> IO ()
rlEnableVertexBufferElement :: Integer -> IO ()
rlEnableVertexBufferElement Integer
vboeId = CUInt -> IO ()
c'rlEnableVertexBufferElement (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vboeId)
rlDisableVertexBufferElement :: IO ()
rlDisableVertexBufferElement :: IO ()
rlDisableVertexBufferElement = IO ()
c'rlDisableVertexBufferElement
rlEnableVertexAttribute :: Integer -> IO ()
rlEnableVertexAttribute :: Integer -> IO ()
rlEnableVertexAttribute Integer
index = CUInt -> IO ()
c'rlEnableVertexAttribute (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index)
rlDisableVertexAttribute :: Integer -> IO ()
rlDisableVertexAttribute :: Integer -> IO ()
rlDisableVertexAttribute Integer
index = CUInt -> IO ()
c'rlDisableVertexAttribute (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index)
rlActiveTextureSlot :: Int -> IO ()
rlActiveTextureSlot :: Int -> IO ()
rlActiveTextureSlot Int
slot = CInt -> IO ()
c'rlActiveTextureSlot (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
slot)
rlEnableTexture :: Integer -> IO ()
rlEnableTexture :: Integer -> IO ()
rlEnableTexture Integer
tId = CUInt -> IO ()
c'rlEnableTexture (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId)
rlDisableTexture :: IO ()
rlDisableTexture :: IO ()
rlDisableTexture = IO ()
c'rlDisableTexture
rlEnableTextureCubemap :: Integer -> IO ()
rlEnableTextureCubemap :: Integer -> IO ()
rlEnableTextureCubemap Integer
tId = CUInt -> IO ()
c'rlEnableTextureCubemap (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId)
rlDisableTextureCubemap :: IO ()
rlDisableTextureCubemap :: IO ()
rlDisableTextureCubemap = IO ()
c'rlDisableTextureCubemap
rlTextureParameters :: Integer -> RLTextureParam -> Int -> IO ()
rlTextureParameters :: Integer -> RLTextureParam -> Int -> IO ()
rlTextureParameters Integer
tId RLTextureParam
param Int
value = CUInt -> CInt -> CInt -> IO ()
c'rlTextureParameters (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLTextureParam -> Int
forall a. Enum a => a -> Int
fromEnum RLTextureParam
param) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
value)
rlCubemapParameters :: Integer -> RLTextureParam -> Int -> IO ()
rlCubemapParameters :: Integer -> RLTextureParam -> Int -> IO ()
rlCubemapParameters Integer
tId RLTextureParam
param Int
value = CUInt -> CInt -> CInt -> IO ()
c'rlCubemapParameters (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLTextureParam -> Int
forall a. Enum a => a -> Int
fromEnum RLTextureParam
param) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
value)
rlEnableShader :: Integer -> IO ()
rlEnableShader :: Integer -> IO ()
rlEnableShader Integer
sId = CUInt -> IO ()
c'rlEnableShader (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
sId)
rlDisableShader :: IO ()
rlDisableShader :: IO ()
rlDisableShader = IO ()
c'rlDisableShader
rlEnableFramebuffer :: Integer -> IO ()
rlEnableFramebuffer :: Integer -> IO ()
rlEnableFramebuffer Integer
fboId = CUInt -> IO ()
c'rlEnableFramebuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
fboId)
rlDisableFramebuffer :: IO ()
rlDisableFramebuffer :: IO ()
rlDisableFramebuffer = IO ()
c'rlDisableFramebuffer
rlGetActiveFramebuffer :: IO Integer
rlGetActiveFramebuffer :: IO Integer
rlGetActiveFramebuffer = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CUInt
c'rlGetActiveFramebuffer
rlActiveDrawBuffers :: Int -> IO ()
rlActiveDrawBuffers :: Int -> IO ()
rlActiveDrawBuffers Int
count = CInt -> IO ()
c'rlActiveDrawBuffers (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
count)
rlBlitFramebuffer :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> [RLBitField] -> IO ()
rlBlitFramebuffer :: Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> [RLBitField]
-> IO ()
rlBlitFramebuffer Int
srcX Int
srcY Int
srcWidth Int
srcHeight Int
dstX Int
dstY Int
dstWidth Int
dstHeight [RLBitField]
bufferMask =
CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> CInt
-> IO ()
c'rlBlitFramebuffer (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
srcX) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
srcY) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
srcWidth) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
srcHeight) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dstX) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dstY) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dstWidth) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dstHeight) (Integer -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral ([RLBitField] -> Integer
forall a. Enum a => [a] -> Integer
configsToBitflag [RLBitField]
bufferMask))
rlBindFramebuffer :: Integer -> Integer -> IO ()
rlBindFramebuffer :: Integer -> Integer -> IO ()
rlBindFramebuffer Integer
target Integer
framebuffer = CUInt -> CUInt -> IO ()
c'rlBindFramebuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
target) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
framebuffer)
rlEnableColorBlend :: IO ()
rlEnableColorBlend :: IO ()
rlEnableColorBlend = IO ()
c'rlEnableColorBlend
rlDisableColorBlend :: IO ()
rlDisableColorBlend :: IO ()
rlDisableColorBlend = IO ()
c'rlDisableColorBlend
rlEnableDepthTest :: IO ()
rlEnableDepthTest :: IO ()
rlEnableDepthTest = IO ()
c'rlEnableDepthTest
rlDisableDepthTest :: IO ()
rlDisableDepthTest :: IO ()
rlDisableDepthTest = IO ()
c'rlDisableDepthTest
rlEnableDepthMask :: IO ()
rlEnableDepthMask :: IO ()
rlEnableDepthMask = IO ()
c'rlEnableDepthMask
rlDisableDepthMask :: IO ()
rlDisableDepthMask :: IO ()
rlDisableDepthMask = IO ()
c'rlDisableDepthMask
rlEnableBackfaceCulling :: IO ()
rlEnableBackfaceCulling :: IO ()
rlEnableBackfaceCulling = IO ()
c'rlEnableBackfaceCulling
rlDisableBackfaceCulling :: IO ()
rlDisableBackfaceCulling :: IO ()
rlDisableBackfaceCulling = IO ()
c'rlDisableBackfaceCulling
rlColorMask :: Bool -> Bool -> Bool -> Bool -> IO ()
rlColorMask :: Bool -> Bool -> Bool -> Bool -> IO ()
rlColorMask Bool
r Bool
g Bool
b Bool
a = CBool -> CBool -> CBool -> CBool -> IO ()
c'rlColorMask (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
r) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
g) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
b) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a)
rlSetCullFace :: RLCullMode -> IO ()
rlSetCullFace :: RLCullMode -> IO ()
rlSetCullFace RLCullMode
mode = CInt -> IO ()
c'rlSetCullFace (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLCullMode -> Int
forall a. Enum a => a -> Int
fromEnum RLCullMode
mode)
rlEnableScissorTest :: IO ()
rlEnableScissorTest :: IO ()
rlEnableScissorTest = IO ()
c'rlEnableScissorTest
rlDisableScissorTest :: IO ()
rlDisableScissorTest :: IO ()
rlDisableScissorTest = IO ()
c'rlDisableScissorTest
rlScissor :: Int -> Int -> Int -> Int -> IO ()
rlScissor :: Int -> Int -> Int -> Int -> IO ()
rlScissor Int
x Int
y Int
width Int
height = CInt -> CInt -> CInt -> CInt -> IO ()
c'rlScissor (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
y) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
rlEnableWireMode :: IO ()
rlEnableWireMode :: IO ()
rlEnableWireMode = IO ()
c'rlEnableWireMode
rlEnablePointMode :: IO ()
rlEnablePointMode :: IO ()
rlEnablePointMode = IO ()
c'rlEnablePointMode
rlDisableWireMode :: IO ()
rlDisableWireMode :: IO ()
rlDisableWireMode = IO ()
c'rlDisableWireMode
rlSetLineWidth :: Float -> IO ()
rlSetLineWidth :: Float -> IO ()
rlSetLineWidth Float
width = CFloat -> IO ()
c'rlSetLineWidth (Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
width)
rlGetLineWidth :: IO Float
rlGetLineWidth :: IO Float
rlGetLineWidth = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (CFloat -> Float) -> IO CFloat -> IO Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CFloat
c'rlGetLineWidth
rlEnableSmoothLines :: IO ()
rlEnableSmoothLines :: IO ()
rlEnableSmoothLines = IO ()
c'rlEnableSmoothLines
rlDisableSmoothLines :: IO ()
rlDisableSmoothLines :: IO ()
rlDisableSmoothLines = IO ()
c'rlDisableSmoothLines
rlEnableStereoRender :: IO ()
rlEnableStereoRender :: IO ()
rlEnableStereoRender = IO ()
c'rlEnableStereoRender
rlDisableStereoRender :: IO ()
rlDisableStereoRender :: IO ()
rlDisableStereoRender = IO ()
c'rlDisableStereoRender
rlIsStereoRenderEnabled :: IO Bool
rlIsStereoRenderEnabled :: IO Bool
rlIsStereoRenderEnabled = CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CBool
c'rlIsStereoRenderEnabled
rlClearColor :: Word8 -> Word8 -> Word8 -> Word8 -> IO ()
rlClearColor :: Word8 -> Word8 -> Word8 -> Word8 -> IO ()
rlClearColor Word8
r Word8
g Word8
b Word8
a = CUChar -> CUChar -> CUChar -> CUChar -> IO ()
c'rlClearColor (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
r) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
g) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
b) (Word8 -> CUChar
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word8
a)
rlClearScreenBuffers :: IO ()
rlClearScreenBuffers :: IO ()
rlClearScreenBuffers = IO ()
c'rlClearScreenBuffers
rlCheckErrors :: IO ()
rlCheckErrors :: IO ()
rlCheckErrors = IO ()
c'rlCheckErrors
rlSetBlendMode :: RLBlendMode -> IO ()
rlSetBlendMode :: RLBlendMode -> IO ()
rlSetBlendMode RLBlendMode
mode = CInt -> IO ()
c'rlSetBlendMode (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLBlendMode -> Int
forall a. Enum a => a -> Int
fromEnum RLBlendMode
mode)
rlSetBlendFactors :: Int -> Int -> Int -> IO ()
rlSetBlendFactors :: Int -> Int -> Int -> IO ()
rlSetBlendFactors Int
glSrcFactor Int
glDstFactor Int
glEquation = CInt -> CInt -> CInt -> IO ()
c'rlSetBlendFactors (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glSrcFactor) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glDstFactor) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glEquation)
rlSetBlendFactorsSeparate :: Int -> Int -> Int -> Int -> Int -> Int -> IO ()
Int
glSrcRGB Int
glDstRGB Int
glSrcAlpha Int
glDstAlpha Int
glEqRGB Int
glEqAlpha =
CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
c'rlSetBlendFactorsSeparate (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glSrcRGB) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glDstRGB) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glSrcAlpha) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glDstAlpha) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glEqRGB) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
glEqAlpha)
rlglInit :: Int -> Int -> IO ()
rlglInit :: Int -> Int -> IO ()
rlglInit Int
width Int
height = CInt -> CInt -> IO ()
c'rlglInit (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
rlglClose :: IO ()
rlglClose :: IO ()
rlglClose = IO ()
c'rlglClose
rlLoadExtensions :: Ptr () -> IO ()
rlLoadExtensions :: Ptr () -> IO ()
rlLoadExtensions = Ptr () -> IO ()
c'rlLoadExtensions
rlGetVersion :: IO Int
rlGetVersion :: IO Int
rlGetVersion = CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CInt
c'rlGetVersion
rlSetFramebufferWidth :: Int -> IO ()
rlSetFramebufferWidth :: Int -> IO ()
rlSetFramebufferWidth Int
width = CInt -> IO ()
c'rlSetFramebufferWidth (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width)
rlGetFramebufferWidth :: IO Int
rlGetFramebufferWidth :: IO Int
rlGetFramebufferWidth = CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CInt
c'rlGetFramebufferWidth
rlSetFramebufferHeight :: Int -> IO ()
rlSetFramebufferHeight :: Int -> IO ()
rlSetFramebufferHeight Int
height = CInt -> IO ()
c'rlSetFramebufferHeight (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
rlGetFramebufferHeight :: IO Int
rlGetFramebufferHeight :: IO Int
rlGetFramebufferHeight = CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CInt
c'rlGetFramebufferHeight
rlGetTextureIdDefault :: IO Integer
rlGetTextureIdDefault :: IO Integer
rlGetTextureIdDefault = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CUInt
c'rlGetTextureIdDefault
rlGetShaderIdDefault :: IO Integer
rlGetShaderIdDefault :: IO Integer
rlGetShaderIdDefault = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CUInt
c'rlGetShaderIdDefault
rlGetShaderLocsDefault :: IO [Int]
rlGetShaderLocsDefault :: IO [Int]
rlGetShaderLocsDefault = (CInt -> Int) -> [CInt] -> [Int]
forall a b. (a -> b) -> [a] -> [b]
map CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ([CInt] -> [Int]) -> IO [CInt] -> IO [Int]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Ptr CInt -> IO [CInt]
forall a. (Freeable a, Storable a) => Int -> Ptr a -> IO [a]
popCArray Int
32 (Ptr CInt -> IO [CInt]) -> IO (Ptr CInt) -> IO [CInt]
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< IO (Ptr CInt)
c'rlGetShaderLocsDefault)
rlLoadRenderBatch :: Int -> Int -> IO RLRenderBatch
rlLoadRenderBatch :: Int -> Int -> IO RLRenderBatch
rlLoadRenderBatch Int
numBuffers Int
bufferElements = CInt -> CInt -> IO (Ptr RLRenderBatch)
c'rlLoadRenderBatch (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
numBuffers) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
bufferElements) IO (Ptr RLRenderBatch)
-> (Ptr RLRenderBatch -> IO RLRenderBatch) -> IO RLRenderBatch
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr RLRenderBatch -> IO RLRenderBatch
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlUnloadRenderBatch :: RLRenderBatch -> IO ()
rlUnloadRenderBatch :: RLRenderBatch -> IO ()
rlUnloadRenderBatch RLRenderBatch
batch = RLRenderBatch -> (Ptr RLRenderBatch -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable RLRenderBatch
batch Ptr RLRenderBatch -> IO ()
c'rlUnloadRenderBatch
rlDrawRenderBatch :: RLRenderBatch -> IO RLRenderBatch
rlDrawRenderBatch :: RLRenderBatch -> IO RLRenderBatch
rlDrawRenderBatch RLRenderBatch
batch = RLRenderBatch
-> (Ptr RLRenderBatch -> IO RLRenderBatch) -> IO RLRenderBatch
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable RLRenderBatch
batch (\Ptr RLRenderBatch
p -> Ptr RLRenderBatch -> IO ()
c'rlDrawRenderBatch Ptr RLRenderBatch
p IO () -> IO RLRenderBatch -> IO RLRenderBatch
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr RLRenderBatch -> IO RLRenderBatch
forall a. Storable a => Ptr a -> IO a
peek Ptr RLRenderBatch
p)
rlSetRenderBatchActive :: Maybe RLRenderBatch -> IO ()
rlSetRenderBatchActive :: Maybe RLRenderBatch -> IO ()
rlSetRenderBatchActive Maybe RLRenderBatch
Nothing = Ptr RLRenderBatch -> IO ()
c'rlSetRenderBatchActive Ptr RLRenderBatch
forall a. Ptr a
nullPtr
rlSetRenderBatchActive (Just RLRenderBatch
val) = do
Ptr RLRenderBatch
ptr <- IO (Ptr RLRenderBatch)
forall a. Storable a => IO (Ptr a)
malloc
Ptr RLRenderBatch -> RLRenderBatch -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr RLRenderBatch
ptr RLRenderBatch
val
Ptr RLRenderBatch -> IO ()
c'rlSetRenderBatchActive Ptr RLRenderBatch
ptr
rlDrawRenderBatchActive :: IO ()
rlDrawRenderBatchActive :: IO ()
rlDrawRenderBatchActive = IO ()
c'rlDrawRenderBatchActive
rlCheckRenderBatchLimit :: Int -> IO Bool
rlCheckRenderBatchLimit :: Int -> IO Bool
rlCheckRenderBatchLimit Int
vCount = CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CInt -> IO CBool
c'rlCheckRenderBatchLimit (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
vCount)
rlSetTexture :: Integer -> IO ()
rlSetTexture :: Integer -> IO ()
rlSetTexture Integer
tId = CUInt -> IO ()
c'rlSetTexture (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId)
rlLoadVertexArray :: IO Integer
rlLoadVertexArray :: IO Integer
rlLoadVertexArray = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CUInt
c'rlLoadVertexArray
rlLoadVertexBuffer :: (Freeable a, Storable a) => [a] -> Int -> Bool -> IO Integer
rlLoadVertexBuffer :: forall a.
(Freeable a, Storable a) =>
[a] -> Int -> Bool -> IO Integer
rlLoadVertexBuffer [a]
buffer Int
size Bool
dynamic =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [a] -> (Ptr a -> IO CUInt) -> IO CUInt
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
buffer (\Ptr a
p -> Ptr () -> CInt -> CBool -> IO CUInt
c'rlLoadVertexBuffer (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
size) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
dynamic))
rlLoadVertexBufferElement :: (Freeable a, Storable a) => [a] -> Int -> Bool -> IO Integer
rlLoadVertexBufferElement :: forall a.
(Freeable a, Storable a) =>
[a] -> Int -> Bool -> IO Integer
rlLoadVertexBufferElement [a]
buffer Int
size Bool
dynamic =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [a] -> (Ptr a -> IO CUInt) -> IO CUInt
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
buffer (\Ptr a
p -> Ptr () -> CInt -> CBool -> IO CUInt
c'rlLoadVertexBufferElement (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
size) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
dynamic))
rlUpdateVertexBuffer :: (Freeable a, Storable a) => Integer -> [a] -> Int -> Int -> IO ()
rlUpdateVertexBuffer :: forall a.
(Freeable a, Storable a) =>
Integer -> [a] -> Int -> Int -> IO ()
rlUpdateVertexBuffer Integer
bufferId [a]
bufferData Int
size Int
offset =
[a] -> (Ptr a -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
bufferData (\Ptr a
p -> CUInt -> Ptr () -> CInt -> CInt -> IO ()
c'rlUpdateVertexBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
bufferId) (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
size) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset))
rlUpdateVertexBufferElements :: (Freeable a, Storable a) => Integer -> [a] -> Int -> Int -> IO ()
rlUpdateVertexBufferElements :: forall a.
(Freeable a, Storable a) =>
Integer -> [a] -> Int -> Int -> IO ()
rlUpdateVertexBufferElements Integer
bufferId [a]
bufferData Int
size Int
offset =
[a] -> (Ptr a -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
bufferData (\Ptr a
p -> CUInt -> Ptr () -> CInt -> CInt -> IO ()
c'rlUpdateVertexBufferElements (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
bufferId) (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
size) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset))
rlUnloadVertexArray :: Integer -> IO ()
rlUnloadVertexArray :: Integer -> IO ()
rlUnloadVertexArray Integer
vaoId = CUInt -> IO ()
c'rlUnloadVertexArray (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vaoId)
rlUnloadVertexBuffer :: Integer -> IO ()
rlUnloadVertexBuffer :: Integer -> IO ()
rlUnloadVertexBuffer Integer
vboId = CUInt -> IO ()
c'rlUnloadVertexBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vboId)
rlSetVertexAttribute :: Integer -> Int -> Int -> Bool -> Int -> Ptr () -> IO ()
rlSetVertexAttribute :: Integer -> Int -> Int -> Bool -> Int -> Ptr () -> IO ()
rlSetVertexAttribute Integer
index Int
compSize Int
aType Bool
normalized Int
stride =
CUInt -> CInt -> CInt -> CBool -> CInt -> Ptr () -> IO ()
c'rlSetVertexAttribute (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
compSize) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
aType) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
normalized) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
stride)
rlSetVertexAttributeDivisor :: Integer -> Int -> IO ()
rlSetVertexAttributeDivisor :: Integer -> Int -> IO ()
rlSetVertexAttributeDivisor Integer
index Int
divisor = CUInt -> CInt -> IO ()
c'rlSetVertexAttributeDivisor (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
divisor)
rlSetVertexAttributeDefault :: Int -> Ptr () -> Int -> Int -> IO ()
rlSetVertexAttributeDefault :: Int -> Ptr () -> Int -> Int -> IO ()
rlSetVertexAttributeDefault Int
locIndex Ptr ()
value Int
attribType Int
count =
CInt -> Ptr () -> CInt -> CInt -> IO ()
c'rlSetVertexAttributeDefault (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
locIndex) Ptr ()
value (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
attribType) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
count)
rlDrawVertexArray :: Int -> Int -> IO ()
rlDrawVertexArray :: Int -> Int -> IO ()
rlDrawVertexArray Int
offset Int
count = CInt -> CInt -> IO ()
c'rlDrawVertexArray (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
count)
rlDrawVertexArrayElements :: Int -> [Int] -> IO ()
rlDrawVertexArrayElements :: Int -> [Int] -> IO ()
rlDrawVertexArrayElements Int
offset [Int]
buffer =
[CUShort] -> (Ptr CUShort -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray
((Int -> CUShort) -> [Int] -> [CUShort]
forall a b. (a -> b) -> [a] -> [b]
map Int -> CUShort
forall a b. (Integral a, Num b) => a -> b
fromIntegral [Int]
buffer :: [CUShort])
(CInt -> CInt -> Ptr () -> IO ()
c'rlDrawVertexArrayElements (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ [Int] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [Int]
buffer) (Ptr () -> IO ())
-> (Ptr CUShort -> Ptr ()) -> Ptr CUShort -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr CUShort -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr)
rlDrawVertexArrayInstanced :: Int -> Int -> Int -> IO ()
rlDrawVertexArrayInstanced :: Int -> Int -> Int -> IO ()
rlDrawVertexArrayInstanced Int
offset Int
count Int
instances = CInt -> CInt -> CInt -> IO ()
c'rlDrawVertexArrayInstanced (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
count) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
instances)
rlDrawVertexArrayElementsInstanced :: Int -> [Int] -> Int -> IO ()
rlDrawVertexArrayElementsInstanced :: Int -> [Int] -> Int -> IO ()
rlDrawVertexArrayElementsInstanced Int
offset [Int]
buffer Int
instances =
[CUShort] -> (Ptr CUShort -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray
((Int -> CUShort) -> [Int] -> [CUShort]
forall a b. (a -> b) -> [a] -> [b]
map Int -> CUShort
forall a b. (Integral a, Num b) => a -> b
fromIntegral [Int]
buffer :: [CUShort])
( \Ptr CUShort
p ->
CInt -> CInt -> Ptr () -> CInt -> IO ()
c'rlDrawVertexArrayElementsInstanced (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offset) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ [Int] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [Int]
buffer) (Ptr CUShort -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr CUShort
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
instances)
)
rlLoadTexture :: [Int] -> Int -> Int -> RLPixelFormat -> Int -> IO Integer
rlLoadTexture :: [Int] -> Int -> Int -> RLPixelFormat -> Int -> IO Integer
rlLoadTexture [Int]
tData Int
width Int
height RLPixelFormat
format Int
mipmapCount =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral
(CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [CUShort] -> (Ptr CUShort -> IO CUInt) -> IO CUInt
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray
((Int -> CUShort) -> [Int] -> [CUShort]
forall a b. (a -> b) -> [a] -> [b]
map Int -> CUShort
forall a b. (Integral a, Num b) => a -> b
fromIntegral [Int]
tData :: [CUShort])
(\Ptr CUShort
p -> Ptr () -> CInt -> CInt -> CInt -> CInt -> IO CUInt
c'rlLoadTexture (Ptr CUShort -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr CUShort
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
mipmapCount))
rlLoadTextureDepth :: Int -> Int -> Bool -> IO Integer
rlLoadTextureDepth :: Int -> Int -> Bool -> IO Integer
rlLoadTextureDepth Int
width Int
height Bool
useRenderBuffer = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CInt -> CInt -> CBool -> IO CUInt
c'rlLoadTextureDepth (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
useRenderBuffer)
rlLoadTextureCubemap :: [Int] -> RLPixelFormat -> IO Integer
rlLoadTextureCubemap :: [Int] -> RLPixelFormat -> IO Integer
rlLoadTextureCubemap [Int]
tData RLPixelFormat
format =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral
(CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [CUShort] -> (Int -> Ptr CUShort -> IO CUInt) -> IO CUInt
forall a b.
(Freeable a, Storable a) =>
[a] -> (Int -> Ptr a -> IO b) -> IO b
withFreeableArrayLen ((Int -> CUShort) -> [Int] -> [CUShort]
forall a b. (a -> b) -> [a] -> [b]
map Int -> CUShort
forall a b. (Integral a, Num b) => a -> b
fromIntegral [Int]
tData :: [CUShort]) (\Int
l Ptr CUShort
p -> Ptr () -> CInt -> CInt -> IO CUInt
c'rlLoadTextureCubemap (Ptr CUShort -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr CUShort
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ Int
l Int -> Int -> Int
forall a. Num a => a -> a -> a
* CUShort -> Int
forall a. Storable a => a -> Int
sizeOf (CUShort
0 :: CUShort)) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format))
rlUpdateTexture :: (Freeable a, Storable a) => Integer -> Int -> Int -> Int -> Int -> RLPixelFormat -> [a] -> IO ()
rlUpdateTexture :: forall a.
(Freeable a, Storable a) =>
Integer
-> Int -> Int -> Int -> Int -> RLPixelFormat -> [a] -> IO ()
rlUpdateTexture Integer
tId Int
offsetX Int
offsetY Int
width Int
height RLPixelFormat
format [a]
tData =
[a] -> (Ptr a -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
tData (CUInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr () -> IO ()
c'rlUpdateTexture (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetX) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetY) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format) (Ptr () -> IO ()) -> (Ptr a -> Ptr ()) -> Ptr a -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr)
rlGetGlTextureFormats ::
RLPixelFormat ->
IO (Integer, Integer, Integer)
rlGetGlTextureFormats :: RLPixelFormat -> IO (Integer, Integer, Integer)
rlGetGlTextureFormats RLPixelFormat
format =
CUInt
-> (Ptr CUInt -> IO (Integer, Integer, Integer))
-> IO (Integer, Integer, Integer)
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable
(CUInt
0 :: CUInt)
( \Ptr CUInt
gif ->
CUInt
-> (Ptr CUInt -> IO (Integer, Integer, Integer))
-> IO (Integer, Integer, Integer)
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable
(CUInt
0 :: CUInt)
( \Ptr CUInt
gf ->
CUInt
-> (Ptr CUInt -> IO (Integer, Integer, Integer))
-> IO (Integer, Integer, Integer)
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable
(CUInt
0 :: CUInt)
( \Ptr CUInt
gt -> do
CInt -> Ptr CUInt -> Ptr CUInt -> Ptr CUInt -> IO ()
c'rlGetGlTextureFormats (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format) Ptr CUInt
gif Ptr CUInt
gf Ptr CUInt
gt
Integer
glInternalFormat <- CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
gif
Integer
glFormat <- CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
gf
Integer
glType <- CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
gt
(Integer, Integer, Integer) -> IO (Integer, Integer, Integer)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Integer
glInternalFormat, Integer
glFormat, Integer
glType)
)
)
)
rlGetPixelFormatName :: RLPixelFormat -> String
rlGetPixelFormatName :: RLPixelFormat -> String
rlGetPixelFormatName RLPixelFormat
format =
case RLPixelFormat
format of
RLPixelFormat
RLPixelFormatUncompressedGrayscale -> String
"GRAYSCALE"
RLPixelFormat
RLPixelFormatUncompressedGrayAlpha -> String
"GRAY_ALPHA"
RLPixelFormat
RLPixelFormatUncompressedR5G6B5 -> String
"R5G6B5"
RLPixelFormat
RLPixelFormatUncompressedR8G8B8 -> String
"R8G8B8"
RLPixelFormat
RLPixelFormatUncompressedR5G5B5A1 -> String
"R5G5B5A1"
RLPixelFormat
RLPixelFormatUncompressedR4G4B4A4 -> String
"R4G4B4A4"
RLPixelFormat
RLPixelFormatUncompressedR8G8B8A8 -> String
"R8G8B8A8"
RLPixelFormat
RLPixelFormatUncompressedR32 -> String
"R32"
RLPixelFormat
RLPixelFormatUncompressedR32G32B32 -> String
"R32G32B32"
RLPixelFormat
RLPixelFormatUncompressedR32G32B32A32 -> String
"R32G32B32A32"
RLPixelFormat
RLPixelFormatUncompressedR16 -> String
"R16"
RLPixelFormat
RLPixelFormatUncompressedR16G16B16 -> String
"R16G16B16"
RLPixelFormat
RLPixelFormatUncompressedR16G16B16A16 -> String
"R16G16B16A16"
RLPixelFormat
RLPixelFormatCompressedDxt1Rgb -> String
"DXT1_RGB"
RLPixelFormat
RLPixelFormatCompressedDxt1Rgba -> String
"DXT1_RGBA"
RLPixelFormat
RLPixelFormatCompressedDxt3Rgba -> String
"DXT3_RGBA"
RLPixelFormat
RLPixelFormatCompressedDxt5Rgba -> String
"DXT5_RGBA"
RLPixelFormat
RLPixelFormatCompressedEtc1Rgb -> String
"ETC1_RGB"
RLPixelFormat
RLPixelFormatCompressedEtc2Rgb -> String
"ETC2_RGB"
RLPixelFormat
RLPixelFormatCompressedEtc2EacRgba -> String
"ETC2_RGBA"
RLPixelFormat
RLPixelFormatCompressedPvrtRgb -> String
"PVRT_RGB"
RLPixelFormat
RLPixelFormatCompressedPvrtRgba -> String
"PVRT_RGBA"
RLPixelFormat
RLPixelFormatCompressedAstc4x4Rgba -> String
"ASTC_4x4_RGBA"
RLPixelFormat
RLPixelFormatCompressedAstc8x8Rgba -> String
"ASTC_8x8_RGBA"
rlUnloadTexture :: Integer -> IO ()
rlUnloadTexture :: Integer -> IO ()
rlUnloadTexture Integer
tId = CUInt -> IO ()
c'rlUnloadTexture (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId)
rlGenTextureMipmaps ::
Integer ->
Int ->
Int ->
RLPixelFormat ->
IO Int
rlGenTextureMipmaps :: Integer -> Int -> Int -> RLPixelFormat -> IO Int
rlGenTextureMipmaps Integer
tId Int
width Int
height RLPixelFormat
format =
CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CInt -> (Ptr CInt -> IO CInt) -> IO CInt
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable (CInt
0 :: CInt) (\Ptr CInt
p -> CUInt -> CInt -> CInt -> CInt -> Ptr CInt -> IO ()
c'rlGenTextureMipmaps (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format) Ptr CInt
p IO () -> IO CInt -> IO CInt
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
p)
rlReadTexturePixels :: Integer -> Int -> Int -> RLPixelFormat -> IO [Word8]
rlReadTexturePixels :: Integer -> Int -> Int -> RLPixelFormat -> IO [Word8]
rlReadTexturePixels Integer
tId Int
width Int
height RLPixelFormat
format = do
Ptr ()
ptr <- CUInt -> CInt -> CInt -> CInt -> IO (Ptr ())
c'rlReadTexturePixels (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format)
Int
size <- CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CInt -> CInt -> CInt -> IO CInt
c'rlGetPixelDataSize (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format)
(CUChar -> Word8) -> [CUChar] -> [Word8]
forall a b. (a -> b) -> [a] -> [b]
map CUChar -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral ([CUChar] -> [Word8]) -> IO [CUChar] -> IO [Word8]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int -> Ptr CUChar -> IO [CUChar]
forall a. (Freeable a, Storable a) => Int -> Ptr a -> IO [a]
popCArray Int
size (Ptr () -> Ptr CUChar
forall a b. Ptr a -> Ptr b
castPtr Ptr ()
ptr :: Ptr CUChar)
rlReadScreenPixels :: Int -> Int -> IO [Word8]
rlReadScreenPixels :: Int -> Int -> IO [Word8]
rlReadScreenPixels Int
width Int
height =
(CUChar -> Word8) -> [CUChar] -> [Word8]
forall a b. (a -> b) -> [a] -> [b]
map CUChar -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral ([CUChar] -> [Word8]) -> IO [CUChar] -> IO [Word8]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (CInt -> CInt -> IO (Ptr CUChar)
c'rlReadScreenPixels (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height) IO (Ptr CUChar) -> (Ptr CUChar -> IO [CUChar]) -> IO [CUChar]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Int -> Ptr CUChar -> IO [CUChar]
forall a. (Freeable a, Storable a) => Int -> Ptr a -> IO [a]
popCArray (Int
width Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
height Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4))
rlLoadFramebuffer :: IO Integer
rlLoadFramebuffer :: IO Integer
rlLoadFramebuffer = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> IO CUInt
c'rlLoadFramebuffer
rlFramebufferAttach :: Integer -> Integer -> RLFramebufferAttachType -> RLFramebufferAttachTextureType -> Int -> IO ()
rlFramebufferAttach :: Integer
-> Integer
-> RLFramebufferAttachType
-> RLFramebufferAttachTextureType
-> Int
-> IO ()
rlFramebufferAttach Integer
fboId Integer
texId RLFramebufferAttachType
attachType RLFramebufferAttachTextureType
texType Int
mipLevel =
CUInt -> CUInt -> CInt -> CInt -> CInt -> IO ()
c'rlFramebufferAttach (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
fboId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
texId) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLFramebufferAttachType -> Int
forall a. Enum a => a -> Int
fromEnum RLFramebufferAttachType
attachType) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLFramebufferAttachTextureType -> Int
forall a. Enum a => a -> Int
fromEnum RLFramebufferAttachTextureType
texType) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
mipLevel)
rlFramebufferComplete :: Integer -> IO Bool
rlFramebufferComplete :: Integer -> IO Bool
rlFramebufferComplete Integer
fboId = CBool -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (CBool -> Bool) -> IO CBool -> IO Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CUInt -> IO CBool
c'rlFramebufferComplete (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
fboId)
rlUnloadFramebuffer :: Integer -> IO ()
rlUnloadFramebuffer :: Integer -> IO ()
rlUnloadFramebuffer Integer
fboId = CUInt -> IO ()
c'rlUnloadFramebuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
fboId)
rlLoadShaderCode :: String -> String -> IO Integer
rlLoadShaderCode :: String -> String -> IO Integer
rlLoadShaderCode String
vsCode String
fsCode =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> (CString -> IO CUInt) -> IO CUInt
forall a. String -> (CString -> IO a) -> IO a
withCString String
vsCode (String -> (CString -> IO CUInt) -> IO CUInt
forall a. String -> (CString -> IO a) -> IO a
withCString String
fsCode ((CString -> IO CUInt) -> IO CUInt)
-> (CString -> CString -> IO CUInt) -> CString -> IO CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CString -> CString -> IO CUInt
c'rlLoadShaderCode)
rlCompileShader :: String -> RLShaderType -> IO Integer
rlCompileShader :: String -> RLShaderType -> IO Integer
rlCompileShader String
shaderCode RLShaderType
shaderType =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> (CString -> IO CUInt) -> IO CUInt
forall a. String -> (CString -> IO a) -> IO a
withCString String
shaderCode (\CString
s -> CString -> CInt -> IO CUInt
c'rlCompileShader CString
s (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLShaderType -> Int
forall a. Enum a => a -> Int
fromEnum RLShaderType
shaderType))
rlLoadShaderProgram :: Integer -> Integer -> IO Integer
rlLoadShaderProgram :: Integer -> Integer -> IO Integer
rlLoadShaderProgram Integer
vsShaderId Integer
fsShaderId =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CUInt -> CUInt -> IO CUInt
c'rlLoadShaderProgram (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
vsShaderId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
fsShaderId)
rlUnloadShaderProgram :: Integer -> IO ()
rlUnloadShaderProgram :: Integer -> IO ()
rlUnloadShaderProgram Integer
shaderId = CUInt -> IO ()
c'rlUnloadShaderProgram (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
shaderId)
rlGetLocationUniform :: Integer -> String -> IO Int
rlGetLocationUniform :: Integer -> String -> IO Int
rlGetLocationUniform Integer
shaderId String
uniformName =
CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> (CString -> IO CInt) -> IO CInt
forall a. String -> (CString -> IO a) -> IO a
withCString String
uniformName (CUInt -> CString -> IO CInt
c'rlGetLocationUniform (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
shaderId))
rlGetLocationAttrib :: Integer -> String -> IO Int
rlGetLocationAttrib :: Integer -> String -> IO Int
rlGetLocationAttrib Integer
shaderId String
attribName =
CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CInt -> Int) -> IO CInt -> IO Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> (CString -> IO CInt) -> IO CInt
forall a. String -> (CString -> IO a) -> IO a
withCString String
attribName (CUInt -> CString -> IO CInt
c'rlGetLocationAttrib (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
shaderId))
rlSetUniform :: Int -> ShaderUniformDataV -> IO ()
rlSetUniform :: Int -> ShaderUniformDataV -> IO ()
rlSetUniform Int
locIndex ShaderUniformDataV
value = do
(ShaderUniformDataType
dataType, Ptr ()
ptr, Int
count) <- ShaderUniformDataV -> IO (ShaderUniformDataType, Ptr (), Int)
unpackShaderUniformDataV ShaderUniformDataV
value
CInt -> Ptr () -> CInt -> CInt -> IO ()
c'rlSetUniform (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
locIndex) Ptr ()
ptr (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ ShaderUniformDataType -> Int
forall a. Enum a => a -> Int
fromEnum ShaderUniformDataType
dataType) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
count)
rlSetUniformMatrix :: Int -> Matrix -> IO ()
rlSetUniformMatrix :: Int -> Matrix -> IO ()
rlSetUniformMatrix Int
locIndex Matrix
mat = Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
mat (CInt -> Ptr Matrix -> IO ()
c'rlSetUniformMatrix (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
locIndex))
rlSetUniformSampler :: Int -> Integer -> IO ()
rlSetUniformSampler :: Int -> Integer -> IO ()
rlSetUniformSampler Int
locIndex Integer
textureId = CInt -> CUInt -> IO ()
c'rlSetUniformSampler (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
locIndex) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
textureId)
rlSetShader :: Integer -> [Int] -> IO ()
rlSetShader :: Integer -> [Int] -> IO ()
rlSetShader Integer
shaderId [Int]
locs = [CInt] -> (Ptr CInt -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray ((Int -> CInt) -> [Int] -> [CInt]
forall a b. (a -> b) -> [a] -> [b]
map Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral [Int]
locs :: [CInt]) (CUInt -> Ptr CInt -> IO ()
c'rlSetShader (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
shaderId))
rlLoadComputeShaderProgram :: Integer -> IO Integer
rlLoadComputeShaderProgram :: Integer -> IO Integer
rlLoadComputeShaderProgram Integer
shaderId = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CUInt -> IO CUInt
c'rlLoadComputeShaderProgram (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
shaderId)
rlComputeShaderDispatch :: Integer -> Integer -> Integer -> IO ()
rlComputeShaderDispatch :: Integer -> Integer -> Integer -> IO ()
rlComputeShaderDispatch Integer
groupX Integer
groupY Integer
groupZ =
CUInt -> CUInt -> CUInt -> IO ()
c'rlComputeShaderDispatch (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
groupX) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
groupY) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
groupZ)
rlLoadShaderBuffer :: (Freeable a, Storable a) => Integer -> [a] -> RLBufferHint -> IO Integer
rlLoadShaderBuffer :: forall a.
(Freeable a, Storable a) =>
Integer -> [a] -> RLBufferHint -> IO Integer
rlLoadShaderBuffer Integer
size [a]
bufferData RLBufferHint
hint =
CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [a] -> (Ptr a -> IO CUInt) -> IO CUInt
forall a b.
(Freeable a, Storable a) =>
[a] -> (Ptr a -> IO b) -> IO b
withFreeableArray [a]
bufferData (\Ptr a
p -> CUInt -> Ptr () -> CInt -> IO CUInt
c'rlLoadShaderBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
size) (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLBufferHint -> Int
forall a. Enum a => a -> Int
fromEnum RLBufferHint
hint))
rlUnloadShaderBuffer :: Integer -> IO ()
rlUnloadShaderBuffer :: Integer -> IO ()
rlUnloadShaderBuffer Integer
ssboId = CUInt -> IO ()
c'rlUnloadShaderBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
ssboId)
rlUpdateShaderBuffer :: (Freeable a, Storable a) => Integer -> a -> Integer -> IO ()
rlUpdateShaderBuffer :: forall a.
(Freeable a, Storable a) =>
Integer -> a -> Integer -> IO ()
rlUpdateShaderBuffer Integer
ssboId a
sbData Integer
offset =
a -> (Ptr a -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable a
sbData (\Ptr a
p -> CUInt -> Ptr () -> CUInt -> CUInt -> IO ()
c'rlUpdateShaderBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
ssboId) (Ptr a -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr a
p) (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> Int -> CUInt
forall a b. (a -> b) -> a -> b
$ a -> Int
forall a. Storable a => a -> Int
sizeOf a
sbData) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
offset))
rlBindShaderBuffer :: Integer -> Integer -> IO ()
rlBindShaderBuffer :: Integer -> Integer -> IO ()
rlBindShaderBuffer Integer
ssboId Integer
index = CUInt -> CUInt -> IO ()
c'rlBindShaderBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
ssboId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index)
rlCopyShaderBuffer :: Integer -> Integer -> Integer -> Integer -> Integer -> IO ()
rlCopyShaderBuffer :: Integer -> Integer -> Integer -> Integer -> Integer -> IO ()
rlCopyShaderBuffer Integer
destId Integer
srcId Integer
destOffset Integer
srcOffset Integer
count = CUInt -> CUInt -> CUInt -> CUInt -> CUInt -> IO ()
c'rlCopyShaderBuffer (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
destId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
srcId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
destOffset) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
srcOffset) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
count)
rlGetShaderBufferSize :: Integer -> IO Integer
rlGetShaderBufferSize :: Integer -> IO Integer
rlGetShaderBufferSize Integer
ssboId = CUInt -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (CUInt -> Integer) -> IO CUInt -> IO Integer
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CUInt -> IO CUInt
c'rlGetShaderBufferSize (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
ssboId)
rlBindImageTexture :: Integer -> Integer -> RLPixelFormat -> Bool -> IO ()
rlBindImageTexture :: Integer -> Integer -> RLPixelFormat -> Bool -> IO ()
rlBindImageTexture Integer
tId Integer
index RLPixelFormat
format Bool
readonly = CUInt -> CUInt -> CInt -> CBool -> IO ()
c'rlBindImageTexture (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
tId) (Integer -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
index) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ RLPixelFormat -> Int
forall a. Enum a => a -> Int
fromEnum RLPixelFormat
format) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
readonly)
rlGetMatrixModelview :: IO Matrix
rlGetMatrixModelview :: IO Matrix
rlGetMatrixModelview = IO (Ptr Matrix)
c'rlGetMatrixModelview IO (Ptr Matrix) -> (Ptr Matrix -> IO Matrix) -> IO Matrix
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr Matrix -> IO Matrix
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlGetMatrixProjection :: IO Matrix
rlGetMatrixProjection :: IO Matrix
rlGetMatrixProjection = IO (Ptr Matrix)
c'rlGetMatrixProjection IO (Ptr Matrix) -> (Ptr Matrix -> IO Matrix) -> IO Matrix
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr Matrix -> IO Matrix
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlGetMatrixTransform :: IO Matrix
rlGetMatrixTransform :: IO Matrix
rlGetMatrixTransform = IO (Ptr Matrix)
c'rlGetMatrixTransform IO (Ptr Matrix) -> (Ptr Matrix -> IO Matrix) -> IO Matrix
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr Matrix -> IO Matrix
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlGetMatrixProjectionStereo :: Int -> IO Matrix
rlGetMatrixProjectionStereo :: Int -> IO Matrix
rlGetMatrixProjectionStereo Int
eye = CInt -> IO (Ptr Matrix)
c'rlGetMatrixProjectionStereo (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
eye) IO (Ptr Matrix) -> (Ptr Matrix -> IO Matrix) -> IO Matrix
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr Matrix -> IO Matrix
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlGetMatrixViewOffsetStereo :: Int -> IO Matrix
rlGetMatrixViewOffsetStereo :: Int -> IO Matrix
rlGetMatrixViewOffsetStereo Int
eye = CInt -> IO (Ptr Matrix)
c'rlGetMatrixViewOffsetStereo (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
eye) IO (Ptr Matrix) -> (Ptr Matrix -> IO Matrix) -> IO Matrix
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr Matrix -> IO Matrix
forall a. (Freeable a, Storable a) => Ptr a -> IO a
pop
rlSetMatrixProjection :: Matrix -> IO ()
rlSetMatrixProjection :: Matrix -> IO ()
rlSetMatrixProjection Matrix
matrix = Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
matrix Ptr Matrix -> IO ()
c'rlSetMatrixProjection
rlSetMatrixModelview :: Matrix -> IO ()
rlSetMatrixModelview :: Matrix -> IO ()
rlSetMatrixModelview Matrix
matrix = Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
matrix Ptr Matrix -> IO ()
c'rlSetMatrixModelview
rlSetMatrixProjectionStereo :: Matrix -> Matrix -> IO ()
rlSetMatrixProjectionStereo :: Matrix -> Matrix -> IO ()
rlSetMatrixProjectionStereo Matrix
right Matrix
left = Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
right (Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
left ((Ptr Matrix -> IO ()) -> IO ())
-> (Ptr Matrix -> Ptr Matrix -> IO ()) -> Ptr Matrix -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr Matrix -> Ptr Matrix -> IO ()
c'rlSetMatrixProjectionStereo)
rlSetMatrixViewOffsetStereo :: Matrix -> Matrix -> IO ()
rlSetMatrixViewOffsetStereo :: Matrix -> Matrix -> IO ()
rlSetMatrixViewOffsetStereo Matrix
right Matrix
left = Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
right (Matrix -> (Ptr Matrix -> IO ()) -> IO ()
forall a b.
(Freeable a, Storable a) =>
a -> (Ptr a -> IO b) -> IO b
withFreeable Matrix
left ((Ptr Matrix -> IO ()) -> IO ())
-> (Ptr Matrix -> Ptr Matrix -> IO ()) -> Ptr Matrix -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr Matrix -> Ptr Matrix -> IO ()
c'rlSetMatrixViewOffsetStereo)
rlLoadDrawCube :: IO ()
rlLoadDrawCube :: IO ()
rlLoadDrawCube = IO ()
c'rlLoadDrawCube
rlLoadDrawQuad :: IO ()
rlLoadDrawQuad :: IO ()
rlLoadDrawQuad = IO ()
c'rlLoadDrawQuad