packages feed

h-raylib 4.5.0.11 → 4.5.0.12

raw patch · 3 files changed

+15/−13 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Raylib: setShaderValue :: Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> IO ()
+ Raylib: setShaderValue :: Shader -> Int -> Ptr () -> ShaderUniformDataType -> IO ()
- Raylib: setShaderValueMatrix :: Shader -> ShaderLocationIndex -> Matrix -> IO ()
+ Raylib: setShaderValueMatrix :: Shader -> Int -> Matrix -> IO ()
- Raylib: setShaderValueTexture :: Shader -> ShaderLocationIndex -> Texture -> IO ()
+ Raylib: setShaderValueTexture :: Shader -> Int -> Texture -> IO ()
- Raylib: setShaderValueV :: Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> Int -> IO ()
+ Raylib: setShaderValueV :: Shader -> Int -> Ptr () -> ShaderUniformDataType -> Int -> IO ()

Files

CHANGELOG.md view
@@ -48,4 +48,9 @@ _14 January, 2023_
 
 - Fixed some function types
-- Allowed omitting fragment/vertex shaders in `loadShader` functions+- Allowed omitting fragment/vertex shaders in `loadShader` functions
+
+## Version 4.5.0.12
+_14 January, 2023_
+
+- Removed `ShaderLocationIndex` from some function types
h-raylib.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4
 name:               h-raylib
-version:            4.5.0.11
+version:            4.5.0.12
 synopsis:           Raylib bindings for Haskell
 category:           graphics
 description:
src/Raylib.hs view
@@ -77,7 +77,6 @@     KeyboardKey,
     GamepadButton,
     GamepadAxis,
-    ShaderLocationIndex,
     ShaderUniformDataType,
     PixelFormat
   )
@@ -870,10 +869,8 @@ 
 foreign import ccall safe "bindings.h SetShaderValue_" c'setShaderValue :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> IO ()
 
--- TODO: This `ShaderLocationIndex` might be a wrong type, this should be examined at a later date
--- This goes for the other functions below as well using it
-setShaderValue :: Raylib.Types.Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> IO ()
-setShaderValue shader locIndex value uniformType = with shader (\s -> c'setShaderValue s (fromIntegral $ fromEnum locIndex) value (fromIntegral $ fromEnum uniformType))
+setShaderValue :: Raylib.Types.Shader -> Int -> Ptr () -> ShaderUniformDataType -> IO ()
+setShaderValue shader locIndex value uniformType = with shader (\s -> c'setShaderValue s (fromIntegral locIndex) value (fromIntegral $ fromEnum uniformType))
 
 foreign import ccall safe "raylib.h &SetShaderValue"
   p'setShaderValue ::
@@ -881,8 +878,8 @@ 
 foreign import ccall safe "bindings.h SetShaderValueV_" c'setShaderValueV :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> CInt -> IO ()
 
-setShaderValueV :: Raylib.Types.Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> Int -> IO ()
-setShaderValueV shader locIndex value uniformType count = with shader (\s -> c'setShaderValueV s (fromIntegral $ fromEnum locIndex) value (fromIntegral $ fromEnum uniformType) (fromIntegral count))
+setShaderValueV :: Raylib.Types.Shader -> Int -> Ptr () -> ShaderUniformDataType -> Int -> IO ()
+setShaderValueV shader locIndex value uniformType count = with shader (\s -> c'setShaderValueV s (fromIntegral locIndex) value (fromIntegral $ fromEnum uniformType) (fromIntegral count))
 
 foreign import ccall safe "raylib.h &SetShaderValueV"
   p'setShaderValueV ::
@@ -890,8 +887,8 @@ 
 foreign import ccall safe "bindings.h SetShaderValueMatrix_" c'setShaderValueMatrix :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Matrix -> IO ()
 
-setShaderValueMatrix :: Raylib.Types.Shader -> ShaderLocationIndex -> Raylib.Types.Matrix -> IO ()
-setShaderValueMatrix shader locIndex mat = with shader (\s -> with mat (c'setShaderValueMatrix s (fromIntegral $ fromEnum locIndex)))
+setShaderValueMatrix :: Raylib.Types.Shader -> Int -> Raylib.Types.Matrix -> IO ()
+setShaderValueMatrix shader locIndex mat = with shader (\s -> with mat (c'setShaderValueMatrix s (fromIntegral locIndex)))
 
 foreign import ccall safe "raylib.h &SetShaderValueMatrix"
   p'setShaderValueMatrix ::
@@ -899,8 +896,8 @@ 
 foreign import ccall safe "bindings.h SetShaderValueTexture_" c'setShaderValueTexture :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Texture -> IO ()
 
-setShaderValueTexture :: Raylib.Types.Shader -> ShaderLocationIndex -> Raylib.Types.Texture -> IO ()
-setShaderValueTexture shader locIndex tex = with shader (\s -> with tex (c'setShaderValueTexture s (fromIntegral $ fromEnum locIndex)))
+setShaderValueTexture :: Raylib.Types.Shader -> Int -> Raylib.Types.Texture -> IO ()
+setShaderValueTexture shader locIndex tex = with shader (\s -> with tex (c'setShaderValueTexture s (fromIntegral locIndex)))
 
 foreign import ccall safe "raylib.h &SetShaderValueTexture"
   p'setShaderValueTexture ::