packages feed

h-raylib 4.5.3.0 → 4.5.3.1

raw patch · 25 files changed

+1055/−663 lines, 25 filesdep ~basenew-component:exe:postprocessing-effectsPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Raylib.Core: unloadShader :: Shader -> IO ()
+ Raylib.Core.Audio: unloadAudioStream :: AudioStream -> IO ()
+ Raylib.Core.Audio: unloadMusicStream :: Music -> IO ()
+ Raylib.Core.Audio: unloadSound :: Sound -> IO ()
+ Raylib.Core.Models: unloadMaterial :: Material -> IO ()
+ Raylib.Core.Models: unloadMesh :: Mesh -> IO ()
+ Raylib.Core.Models: unloadModel :: Model -> IO ()
+ Raylib.Core.Models: unloadModelKeepMeshes :: Model -> IO ()
+ Raylib.Core.Text: unloadFont :: Font -> IO ()
+ Raylib.Core.Textures: unloadRenderTexture :: RenderTexture -> IO ()
+ Raylib.Core.Textures: unloadTexture :: Texture -> IO ()

Files

CHANGELOG.md view
@@ -1,5 +1,15 @@ # h-raylib changelog
 
+## Version 4.5.3.1
+_27 February, 2023_
+
+- Added manual asset unloading functions
+- Updated raylib to the master branch
+
+\[[#11](https://github.com/Anut-py/h-raylib/pull/11)\]
+
+- Fixed a build issue on MacOS
+
 ## Version 4.5.3.0
 _24 February, 2023_
 
CONTRIBUTING.md view
@@ -12,7 +12,7 @@ 
 _This section only contains h-raylib specific information. For information about raylib in general, view the [raylib wiki](https://github.com/raysan5/raylib/wiki)._
 
-This project is split into 8 public modules. `Raylib.Types` contains all of raylib's types and low-level code to convert them to and from raw bytes. `Raylib.Util` contains miscellaneous utility functions. `Raylib.Util.Colors` contains some colors defined by raylib. The other 6 public modules, `Raylib.Core`, `Raylib.Core.Shapes`, `Raylib.Core.Textures`, `Raylib.Core.Text`, `Raylib.Core.Models`, and `Raylib.Core.Audio`, correspond to their respective raylib modules.
+This project is split into 9 public modules. `Raylib.Types` contains all of raylib's types and low-level code to convert them to and from raw bytes. `Raylib.Util` contains miscellaneous utility functions. `Raylib.Util.Colors` contains some colors defined by raylib. The other 6 public modules, `Raylib.Core`, `Raylib.Core.Shapes`, `Raylib.Core.Textures`, `Raylib.Core.Text`, `Raylib.Core.Models`, and `Raylib.Core.Audio`, correspond to their respective raylib modules.
 
 The functions in h-raylib are an almost one-to-one mapping to their corresponding raylib functions. The types are, in some cases, slightly modified if it is possible to utilize Haskell features.
 
@@ -40,8 +40,10 @@ 
 ### The other 6 modules
 
-These modules contain only functions. Each of these functions corresponds to a C function. The `unload*` functions were removed to make memory management automatic (this may be revised in the future, see `ROADMAP.md`). Functions that took a pointer as an argument in C were changed to take a regular type as an argument and return an updated version of the argument.
+These modules contain only functions. Each of these functions corresponds to a C function. The `unload*` functions are optional; even if you do not call them, all assets used by a program will be automatically be unloaded when it terminates (see the "Memory management" section). For some types (e.g. `Image`), there is no unloading function because the memory used by the type can be unloaded in function calls.
 
+Functions that took a pointer as an argument in C were changed to take a regular type as an argument and return an updated version of the argument.
+
 ### Private modules
 
 h-raylib has 3 modules that are not exposed for external use: `Raylib.Native`, `Raylib.Internal`, and `Raylib.ForeignUtil`.
@@ -72,4 +74,4 @@ 
 Keep in mind that this is all automatic; no extra action in the code is necessary for this to happen. Take a look at `Raylib.Internal` to see the functions used for this.
 
-Unfortunately, this could lead to performance problems in larger projects, as large assets such as models must stay in memory for the duration of the program. This is why manual unloading is in the roadmap.
+In some cases, models and other data used by a program are extremely large and thus expensive to keep in memory for the entire duration of the program. For this reason, the `unload*` functions are available to manually unload data on the fly.
ROADMAP.md view
@@ -3,10 +3,11 @@ Items higher on the list have higher priority.
 
 ## Uncompleted
-- Allow manual unloading of assets for larger projects
 - Bind `rlgl`
+- Bind `rcamera`
 - Bind `raymath`
 - Bind `raygui`
 
 ## Completed
 - Make it easier to pass shader parameters (Added in `4.5.3.0`)
+- Allow manual unloading of assets for larger projects (Not published to hackage)
examples/basic-shaders/assets/lighting.frag view
@@ -21,7 +21,7 @@ 
 void main()
 {
-    vec4 texColor = texture(texture0, fragTexCoord);
+    vec4 objectColor = texture(texture0, fragTexCoord) * colDiffuse * fragColor;
     
     // Ambient lighting
     vec3 ambient = (ambientStrength * ambientLightColor).xyz;
@@ -38,5 +38,5 @@     float spec = pow(max(dot(viewDir, reflectDir), 0.0), 16);
     vec3 specular = specularStrength * spec * pointLightColor.xyz;
 
-    finalColor = vec4(specular + diffuse + ambient, 1.0) * texColor * colDiffuse * fragColor;
+    finalColor = vec4(specular + diffuse + ambient, 1.0) * objectColor;
 }
examples/basic-shaders/src/Main.hs view
@@ -19,9 +19,9 @@     loadShader,
     setShaderValue,
     setTargetFPS,
-    updateCamera,
+    updateCamera
   )
-import Raylib.Core.Models (drawModel, drawSphere, genMeshCube, loadModelFromMesh)
+import Raylib.Core.Models (drawModel, genMeshCube, loadModelFromMesh, genMeshSphere, genMeshPlane, drawSphereWires)
 import Raylib.Core.Text (drawText)
 import Raylib.Types
   ( Camera3D (Camera3D, camera3D'position),
@@ -35,22 +35,23 @@       ),
     Vector3 (Vector3),
     Vector4 (Vector4, vector4'w),
-    vectorToColor,
+    vectorToColor
   )
 import Raylib.Util (whileWindowOpen_, setMaterialShader)
-import Raylib.Util.Colors (black, orange, white)
+import Raylib.Util.Colors (black, orange, white, blue, lightGray)
+import Numeric (showFFloat)
 
 assetsPath :: String
 assetsPath = "../../../../../../../../../examples/basic-shaders/assets/"
 
 main :: IO ()
 main = do
-  initWindow 1300 800 "raylib [core] example - basic shaders"
+  initWindow 1300 800 "raylib [shaders] example - basic shaders"
   setTargetFPS 60
   disableCursor
   _ <- changeDirectory =<< getApplicationDirectory
 
-  let camera = Camera3D (Vector3 1 2 3) (Vector3 1 0 1) (Vector3 0 1 0) 45 CameraPerspective
+  let camera = Camera3D (Vector3 1 3 3) (Vector3 1 0 1) (Vector3 0 1 0) 45 CameraPerspective
 
   shader <- loadShader (Just $ assetsPath ++ "lighting.vert") (Just $ assetsPath ++ "lighting.frag")
 
@@ -72,6 +73,14 @@   cubeModel' <- loadModelFromMesh cubeMesh
   let cubeModel = setMaterialShader cubeModel' 0 shader
 
+  sphereMesh <- genMeshSphere 0.5 32 32
+  sphereModel' <- loadModelFromMesh sphereMesh
+  let sphereModel = setMaterialShader sphereModel' 0 shader
+
+  planeMesh <- genMeshPlane 100 100 20 20
+  planeModel' <- loadModelFromMesh planeMesh
+  let planeModel = setMaterialShader planeModel' 0 shader
+
   whileWindowOpen_
     ( \(c, ls, ss) -> do
         beginDrawing
@@ -79,8 +88,10 @@ 
         beginMode3D c
 
-        drawModel cubeModel (Vector3 0 0 0) 1 orange
-        drawSphere pointLightPosition 0.25 $ vectorToColor (pointLightColor {vector4'w = ls / 3.0})
+        drawModel cubeModel (Vector3 0 1 0) 1 orange
+        drawModel sphereModel (Vector3 2 0.5 2) 1 blue
+        drawModel planeModel (Vector3 0 0 0) 1 lightGray
+        drawSphereWires pointLightPosition 0.25 12 12 $ vectorToColor (pointLightColor {vector4'w = ls / 3})
 
         endMode3D
 
@@ -108,10 +119,10 @@         when (uDown || jDown) $ setShaderValue shader "specularStrength" (ShaderUniformFloat newSpecularStrength)
 
         drawText "Press the Y and H keys to increase and decrease the diffuse strength." 10 10 20 white
-        drawText ("Current diffuse strength: " ++ take 4 (show newLightStrength)) 10 40 20 white
+        drawText ("Current diffuse strength: " ++ showFFloat (Just 2) newLightStrength "") 10 40 20 white
 
         drawText "Press the U and J keys to increase and decrease the specular strength." 10 80 20 white
-        drawText ("Current specular strength: " ++ take 4 (show newSpecularStrength)) 10 110 20 white
+        drawText ("Current specular strength: " ++ showFFloat (Just 2) newSpecularStrength "") 10 110 20 white
 
         endDrawing
 
+ examples/postprocessing-effects/assets/bloom.frag view
@@ -0,0 +1,32 @@+#version 330
+
+in vec2 fragTexCoord;
+in vec4 fragColor;
+
+out vec4 finalColor;
+
+uniform sampler2D texture0;
+uniform vec4 colDiffuse;
+uniform vec2 renderSize;
+
+const float samples = 3.0;
+const int range = 1;
+const float quality = 5.0;
+
+void main()
+{
+    vec4 sum = vec4(0);
+    vec2 sizeFactor = vec2(1)/renderSize*quality;
+
+    vec4 source = texture(texture0, fragTexCoord);
+
+    for (int x = -range; x <= range; x++)
+    {
+        for (int y = -range; y <= range; y++)
+        {
+            sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor);
+        }
+    }
+
+    finalColor = ((sum/(samples*samples)) + source)*colDiffuse;
+}
+ examples/postprocessing-effects/assets/blur.frag view
@@ -0,0 +1,42 @@+#version 330
+
+in vec2 fragTexCoord;
+in vec4 fragColor;
+
+out vec4 finalColor;
+
+uniform sampler2D texture0;
+uniform vec4 colDiffuse;
+uniform vec2 renderSize;
+
+const float dc = 1 / sqrt(2); // Diagonal constant (sin (pi/4))
+const float blurRadius = 1.0;
+const vec2 samples[8] = vec2[](
+    vec2(0, 1),
+    vec2(dc, dc),
+    vec2(1, 0),
+    vec2(dc, -dc),
+    vec2(0, -1),
+    vec2(-dc, -dc),
+    vec2(-1, 0),
+    vec2(-dc, dc)
+);
+
+const float weights[15] = float[](0.02, 0.04, 0.06, 0.08, 0.1, 0.14, 0.18, 0.08, 0.06, 0.05, 0.05, 0.04, 0.04, 0.04, 0.02); // I messed around with these until I got something I liked
+
+void main()
+{
+    vec3 baseColor = texture(texture0, fragTexCoord).rgb*weights[0];
+
+    for (int j = 1; j < 15; j ++) {
+        for (int i = 0; i < 8; i ++) {
+            vec2 offsetPixels = blurRadius*j*samples[i]; // Further out on each iteration
+            vec2 offsetAdjusted = offsetPixels / renderSize; // Normalize offset to range from 0 to 1
+            vec2 finalPosition = clamp(fragTexCoord + offsetAdjusted, vec2(0, 0), vec2(1, 1)); // Prevent wrapping over to the other side of the texture
+            vec3 offsetColor = texture(texture0, finalPosition, 0.0).rgb;
+            baseColor += offsetColor / 8 * weights[j];
+        }
+    }
+
+    finalColor = vec4(baseColor, 10.0);
+}
+ examples/postprocessing-effects/assets/grayscale.frag view
@@ -0,0 +1,18 @@+#version 330
+
+in vec2 fragTexCoord;
+in vec4 fragColor;
+
+out vec4 finalColor;
+
+uniform sampler2D texture0;
+uniform vec4 colDiffuse;
+
+void main()
+{
+    vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor;
+
+    float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
+
+    finalColor = vec4(gray, gray, gray, texelColor.a);
+}
+ examples/postprocessing-effects/assets/pixelate.frag view
@@ -0,0 +1,18 @@+#version 330
+
+in vec2 fragTexCoord;
+in vec4 fragColor;
+
+out vec4 finalColor;
+
+uniform sampler2D texture0;
+uniform vec4 colDiffuse;
+uniform vec2 renderSize;
+
+const float pixelSize = 5.0;
+
+void main()
+{
+    vec2 pixelizedCoord = floor(fragTexCoord * renderSize / pixelSize) / renderSize * pixelSize;
+    finalColor = texture(texture0, pixelizedCoord)*colDiffuse*fragColor;
+}
+ examples/postprocessing-effects/src/Main.hs view
@@ -0,0 +1,99 @@+{-# OPTIONS -Wall #-}
+
+module Main where
+
+import Raylib.Core (beginDrawing, beginMode3D, beginShaderMode, beginTextureMode, changeDirectory, clearBackground, endDrawing, endMode3D, endShaderMode, endTextureMode, getApplicationDirectory, initWindow, isKeyPressed, loadShader, setShaderValue, setTargetFPS, updateCamera, closeWindow)
+import Raylib.Core.Models (drawCube, drawGrid, drawSphere)
+import Raylib.Core.Textures (drawTextureRec, loadRenderTexture)
+import Raylib.Types (Camera3D (Camera3D), CameraMode (CameraModeOrbital), CameraProjection (CameraPerspective), KeyboardKey (KeyLeft, KeyRight), Rectangle (Rectangle), RenderTexture (renderTexture'texture), ShaderUniformData (ShaderUniformVec2), Vector2 (Vector2), Vector3 (Vector3))
+import Raylib.Util (whileWindowOpen_)
+import Raylib.Util.Colors (orange, white, black, green, darkGreen, red, maroon, blue, darkBlue)
+import Raylib.Core.Text (drawText)
+
+assetsPath :: String
+assetsPath = "../../../../../../../../../examples/postprocessing-effects/assets/"
+
+main :: IO ()
+main = do
+  let width = 1300
+      height = 800
+
+  initWindow width height "raylib [shaders] example - postprocessing effects"
+  setTargetFPS 60
+  _ <- changeDirectory =<< getApplicationDirectory
+
+  let camera = Camera3D (Vector3 3 4 3) (Vector3 0 1 0) (Vector3 0 1 0) 45 CameraPerspective
+
+  rt <- loadRenderTexture width height
+
+  -- Most of the shaders here are based on the ones at https://github.com/raysan5/raylib/tree/master/examples/shaders/resources/shaders/glsl330
+  defaultShader <- loadShader Nothing Nothing
+  grayscaleShader <- loadShader Nothing (Just $ assetsPath ++ "grayscale.frag")
+  blurShader <- loadShader Nothing (Just $ assetsPath ++ "blur.frag")
+  pixelateShader <- loadShader Nothing (Just $ assetsPath ++ "pixelate.frag")
+  bloomShader <- loadShader Nothing (Just $ assetsPath ++ "bloom.frag")
+
+  let shaders = [("None", defaultShader), ("Grayscale", grayscaleShader), ("Blur", blurShader), ("Pixelate", pixelateShader), ("Bloom", bloomShader)]
+
+  setShaderValue blurShader "renderSize" (ShaderUniformVec2 (Vector2 (fromIntegral width) (fromIntegral height)))
+  setShaderValue pixelateShader "renderSize" (ShaderUniformVec2 (Vector2 (fromIntegral width) (fromIntegral height)))
+  setShaderValue bloomShader "renderSize" (ShaderUniformVec2 (Vector2 (fromIntegral width) (fromIntegral height)))
+
+  whileWindowOpen_
+    ( \(c, currentShader) -> do
+        let (shaderName, selectedShader) = shaders !! currentShader
+
+        beginTextureMode rt
+
+        beginMode3D c
+
+        clearBackground white
+
+        drawGrid 30 1.0
+        drawCube (Vector3 0 1 0) 2.0 2.0 2.0 orange
+        drawSphere (Vector3 0 2 0) 0.5 green
+        drawSphere (Vector3 0 0 0) 0.5 darkGreen
+        drawSphere (Vector3 1 1 0) 0.5 red
+        drawSphere (Vector3 (-1) 1 0) 0.5 maroon
+        drawSphere (Vector3 0 1 1) 0.5 blue
+        drawSphere (Vector3 0 1 (-1)) 0.5 darkBlue
+
+        endMode3D
+
+        endTextureMode
+
+        beginDrawing
+
+        clearBackground white
+
+        beginShaderMode selectedShader
+
+        drawTextureRec (renderTexture'texture rt) (Rectangle 0 0 (fromIntegral width) (fromIntegral $ - height)) (Vector2 0 0) white
+
+        endShaderMode
+
+        drawText "Press the left and right arrow keys to change the effect" 20 20 20 black
+        drawText ("Current effect: " ++ shaderName) 20 50 20 black
+
+        endDrawing
+
+        leftDown <- isKeyPressed KeyLeft
+        rightDown <- isKeyPressed KeyRight
+        let newShaderIdx = clamp (currentShader + change)
+              where
+                total = length shaders
+                clamp x
+                  | x < 0 = total + x
+                  | x >= total = x - total
+                  | otherwise = x
+                change
+                  | leftDown = -1
+                  | rightDown = 1
+                  | otherwise = 0
+
+        newCam <- updateCamera c CameraModeOrbital
+        return (newCam, newShaderIdx)
+    )
+    (camera, 0)
+
+  closeWindow
h-raylib.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4
 name:               h-raylib
-version:            4.5.3.0
+version:            4.5.3.1
 synopsis:           Raylib bindings for Haskell
 category:           graphics
 description:
@@ -79,44 +79,61 @@       , base
       , h-raylib
 
+-- core
+
 executable basic-window
   import:         example-options
   hs-source-dirs: examples/basic-window/src
   main-is:        Main.hs
 
+executable first-person-camera
+  import:         example-options
+  hs-source-dirs: examples/first-person-camera/src
+  main-is:        Main.hs
+
+executable camera-ray-collision
+  import:         example-options
+  hs-source-dirs: examples/camera-ray-collision/src
+  main-is:        Main.hs
+
+-- textures
+
 executable basic-images
   import:         example-options
   hs-source-dirs: examples/basic-images/src
   main-is:        Main.hs
 
-executable basic-shaders
+-- text
+
+executable custom-font-text
   import:         example-options
-  hs-source-dirs: examples/basic-shaders/src
+  hs-source-dirs: examples/custom-font-text/src
   main-is:        Main.hs
 
+-- models
+
 executable basic-models
   import:         example-options
   hs-source-dirs: examples/basic-models/src
   main-is:        Main.hs
 
-executable basic-audio
-  import:         example-options
-  hs-source-dirs: examples/basic-audio/src
-  main-is:        Main.hs
+-- shaders
 
-executable custom-font-text
+executable basic-shaders
   import:         example-options
-  hs-source-dirs: examples/custom-font-text/src
+  hs-source-dirs: examples/basic-shaders/src
   main-is:        Main.hs
 
-executable first-person-camera
+executable postprocessing-effects
   import:         example-options
-  hs-source-dirs: examples/first-person-camera/src
+  hs-source-dirs: examples/postprocessing-effects/src
   main-is:        Main.hs
 
-executable camera-ray-collision
+-- audio
+
+executable basic-audio
   import:         example-options
-  hs-source-dirs: examples/camera-ray-collision/src
+  hs-source-dirs: examples/basic-audio/src
   main-is:        Main.hs
 
 library
@@ -204,6 +221,7 @@     c-sources:
       lib/rglfw.m
       lib/rl_bindings.c
+      lib/rl_internal.c
       raylib/src/raudio.c
       raylib/src/rcore.c
       raylib/src/rmodels.c
raylib/src/rcore.c view
@@ -6944,7 +6944,7 @@     // Load binary
     /*
     FILE *repFile = fopen(fileName, "rb");
-    fread(fileId, 4, 1, repFile);
+    fread(fileId, 1, 4, repFile);
 
     if ((fileId[0] == 'r') && (fileId[1] == 'E') && (fileId[2] == 'P') && (fileId[1] == ' '))
     {
@@ -6996,7 +6996,7 @@     // Save as binary
     /*
     FILE *repFile = fopen(fileName, "wb");
-    fwrite(fileId, 4, 1, repFile);
+    fwrite(fileId, sizeof(unsigned char), 4, repFile);
     fwrite(&eventCount, sizeof(int), 1, repFile);
     fwrite(events, sizeof(AutomationEvent), eventCount, repFile);
     fclose(repFile);
raylib/src/rlgl.h view
@@ -298,6 +298,8 @@ 
 // GL blending functions/equations
 #define RL_FUNC_ADD                             0x8006      // GL_FUNC_ADD
+#define RL_MIN                                  0x8007      // GL_MIN
+#define RL_MAX                                  0x8008      // GL_MAX
 #define RL_FUNC_SUBTRACT                        0x800A      // GL_FUNC_SUBTRACT
 #define RL_FUNC_REVERSE_SUBTRACT                0x800B      // GL_FUNC_REVERSE_SUBTRACT
 #define RL_BLEND_EQUATION                       0x8009      // GL_BLEND_EQUATION
@@ -3473,7 +3475,7 @@ 
     unsigned int depthIdU = (unsigned int)depthId;
     if (depthType == GL_RENDERBUFFER) glDeleteRenderbuffers(1, &depthIdU);
-    else if (depthType == GL_RENDERBUFFER) glDeleteTextures(1, &depthIdU);
+    else if (depthType == GL_TEXTURE) glDeleteTextures(1, &depthIdU);
 
     // NOTE: If a texture object is deleted while its image is attached to the *currently bound* framebuffer,
     // the texture image is automatically detached from the currently bound framebuffer.
raylib/src/rmodels.c view
@@ -4222,11 +4222,11 @@     for (int i = 0; i < model.meshCount; i++)
     {
         //fseek(iqmFile, iqmHeader->ofs_text + imesh[i].name, SEEK_SET);
-        //fread(name, sizeof(char)*MESH_NAME_LENGTH, 1, iqmFile);
+        //fread(name, sizeof(char), MESH_NAME_LENGTH, iqmFile);
         memcpy(name, fileDataPtr + iqmHeader->ofs_text + imesh[i].name, MESH_NAME_LENGTH*sizeof(char));
 
         //fseek(iqmFile, iqmHeader->ofs_text + imesh[i].material, SEEK_SET);
-        //fread(material, sizeof(char)*MATERIAL_NAME_LENGTH, 1, iqmFile);
+        //fread(material, sizeof(char), MATERIAL_NAME_LENGTH, iqmFile);
         memcpy(material, fileDataPtr + iqmHeader->ofs_text + imesh[i].material, MATERIAL_NAME_LENGTH*sizeof(char));
 
         model.materials[i] = LoadMaterialDefault();
@@ -4254,7 +4254,7 @@     // Triangles data processing
     tri = RL_MALLOC(iqmHeader->num_triangles*sizeof(IQMTriangle));
     //fseek(iqmFile, iqmHeader->ofs_triangles, SEEK_SET);
-    //fread(tri, iqmHeader->num_triangles*sizeof(IQMTriangle), 1, iqmFile);
+    //fread(tri, sizeof(IQMTriangle), iqmHeader->num_triangles, iqmFile);
     memcpy(tri, fileDataPtr + iqmHeader->ofs_triangles, iqmHeader->num_triangles*sizeof(IQMTriangle));
 
     for (int m = 0; m < model.meshCount; m++)
@@ -4276,7 +4276,7 @@     // Vertex arrays data processing
     va = RL_MALLOC(iqmHeader->num_vertexarrays*sizeof(IQMVertexArray));
     //fseek(iqmFile, iqmHeader->ofs_vertexarrays, SEEK_SET);
-    //fread(va, iqmHeader->num_vertexarrays*sizeof(IQMVertexArray), 1, iqmFile);
+    //fread(va, sizeof(IQMVertexArray), iqmHeader->num_vertexarrays, iqmFile);
     memcpy(va, fileDataPtr + iqmHeader->ofs_vertexarrays, iqmHeader->num_vertexarrays*sizeof(IQMVertexArray));
 
     for (unsigned int i = 0; i < iqmHeader->num_vertexarrays; i++)
@@ -4395,7 +4395,7 @@     // Bones (joints) data processing
     ijoint = RL_MALLOC(iqmHeader->num_joints*sizeof(IQMJoint));
     //fseek(iqmFile, iqmHeader->ofs_joints, SEEK_SET);
-    //fread(ijoint, iqmHeader->num_joints*sizeof(IQMJoint), 1, iqmFile);
+    //fread(ijoint, sizeof(IQMJoint), iqmHeader->num_joints, iqmFile);
     memcpy(ijoint, fileDataPtr + iqmHeader->ofs_joints, iqmHeader->num_joints*sizeof(IQMJoint));
 
     model.boneCount = iqmHeader->num_joints;
@@ -4407,7 +4407,7 @@         // Bones
         model.bones[i].parent = ijoint[i].parent;
         //fseek(iqmFile, iqmHeader->ofs_text + ijoint[i].name, SEEK_SET);
-        //fread(model.bones[i].name, BONE_NAME_LENGTH*sizeof(char), 1, iqmFile);
+        //fread(model.bones[i].name, sizeof(char), BONE_NAME_LENGTH, iqmFile);
         memcpy(model.bones[i].name, fileDataPtr + iqmHeader->ofs_text + ijoint[i].name, BONE_NAME_LENGTH*sizeof(char));
 
         // Bind pose (base pose)
@@ -4511,14 +4511,14 @@     // Get bones data
     IQMPose *poses = RL_MALLOC(iqmHeader->num_poses*sizeof(IQMPose));
     //fseek(iqmFile, iqmHeader->ofs_poses, SEEK_SET);
-    //fread(poses, iqmHeader->num_poses*sizeof(IQMPose), 1, iqmFile);
+    //fread(poses, sizeof(IQMPose), iqmHeader->num_poses, iqmFile);
     memcpy(poses, fileDataPtr + iqmHeader->ofs_poses, iqmHeader->num_poses*sizeof(IQMPose));
 
     // Get animations data
     *animCount = iqmHeader->num_anims;
     IQMAnim *anim = RL_MALLOC(iqmHeader->num_anims*sizeof(IQMAnim));
     //fseek(iqmFile, iqmHeader->ofs_anims, SEEK_SET);
-    //fread(anim, iqmHeader->num_anims*sizeof(IQMAnim), 1, iqmFile);
+    //fread(anim, sizeof(IQMAnim), iqmHeader->num_anims, iqmFile);
     memcpy(anim, fileDataPtr + iqmHeader->ofs_anims, iqmHeader->num_anims*sizeof(IQMAnim));
 
     ModelAnimation *animations = RL_MALLOC(iqmHeader->num_anims*sizeof(ModelAnimation));
@@ -4526,7 +4526,7 @@     // frameposes
     unsigned short *framedata = RL_MALLOC(iqmHeader->num_frames*iqmHeader->num_framechannels*sizeof(unsigned short));
     //fseek(iqmFile, iqmHeader->ofs_frames, SEEK_SET);
-    //fread(framedata, iqmHeader->num_frames*iqmHeader->num_framechannels*sizeof(unsigned short), 1, iqmFile);
+    //fread(framedata, sizeof(unsigned short), iqmHeader->num_frames*iqmHeader->num_framechannels, iqmFile);
     memcpy(framedata, fileDataPtr + iqmHeader->ofs_frames, iqmHeader->num_frames*iqmHeader->num_framechannels*sizeof(unsigned short));
 
     // joints
raylib/src/rtext.c view
@@ -1339,7 +1339,7 @@ {
     int bytes = 0;
 
-    if (dst != NULL)
+    if ((src != NULL) && (dst != NULL))
     {
         while (*src != '\0')
         {
raylib/src/rtextures.c view
@@ -296,7 +296,7 @@ Image LoadImageAnim(const char *fileName, int *frames)
 {
     Image image = { 0 };
-    int frameCount = 1;
+    int frameCount = 0;
 
 #if defined(SUPPORT_FILEFORMAT_GIF)
     if (IsFileExtension(fileName, ".gif"))
@@ -320,7 +320,11 @@ #else
     if (false) { }
 #endif
-    else image = LoadImage(fileName);
+    else 
+    {
+        image = LoadImage(fileName);
+        frameCount = 1;
+    }
 
     // TODO: Support APNG animated images
 
src/Raylib/Core.hs view
@@ -22,7 +22,8 @@     peekCString,
     withCString,
   )
-import Raylib.Internal (addShaderId, shaderLocations, unloadFrameBuffers, unloadShaders, unloadTextures, unloadVaoIds, unloadVboIds)
+import Raylib.ForeignUtil (c'free, configsToBitflag, pop, popCArray, popCString, withFreeable, withMaybeCString)
+import Raylib.Internal (addShaderId, shaderLocations, unloadFrameBuffers, unloadShaders, unloadSingleShader, unloadTextures, unloadVaoIds, unloadVboIds)
 import Raylib.Native
   ( c'beginBlendMode,
     c'beginMode2D,
@@ -208,7 +209,6 @@     unpackShaderUniformData,
     unpackShaderUniformDataV,
   )
-import Raylib.ForeignUtil (c'free, configsToBitflag, pop, popCArray, popCString, withFreeable, withMaybeCString)
 
 initWindow :: Int -> Int -> String -> IO ()
 initWindow width height title = withCString title $ c'initWindow (fromIntegral width) (fromIntegral height)
@@ -271,10 +271,10 @@   restoreWindow ::
     IO ()
 
-setWindowIcon :: Raylib.Types.Image -> IO ()
+setWindowIcon :: Image -> IO ()
 setWindowIcon image = withFreeable image c'setWindowIcon
 
-setWindowIcons :: [Raylib.Types.Image] -> IO ()
+setWindowIcons :: [Image] -> IO ()
 setWindowIcons images = withArrayLen images (\l ptr -> c'setWindowIcons ptr (fromIntegral l))
 
 setWindowTitle :: String -> IO ()
@@ -317,7 +317,7 @@ getCurrentMonitor :: IO Int
 getCurrentMonitor = fromIntegral <$> c'getCurrentMonitor
 
-getMonitorPosition :: Int -> IO Raylib.Types.Vector2
+getMonitorPosition :: Int -> IO Vector2
 getMonitorPosition monitor = c'getMonitorPosition (fromIntegral monitor) >>= pop
 
 getMonitorWidth :: Int -> IO Int
@@ -335,10 +335,10 @@ getMonitorRefreshRate :: Int -> IO Int
 getMonitorRefreshRate monitor = fromIntegral <$> c'getMonitorRefreshRate (fromIntegral monitor)
 
-getWindowPosition :: IO Raylib.Types.Vector2
+getWindowPosition :: IO Vector2
 getWindowPosition = c'getWindowPosition >>= pop
 
-getWindowScaleDPI :: IO Raylib.Types.Vector2
+getWindowScaleDPI :: IO Vector2
 getWindowScaleDPI = c'getWindowScaleDPI >>= pop
 
 getMonitorName :: Int -> IO String
@@ -391,7 +391,7 @@ isCursorOnScreen :: IO Bool
 isCursorOnScreen = toBool <$> c'isCursorOnScreen
 
-clearBackground :: Raylib.Types.Color -> IO ()
+clearBackground :: Color -> IO ()
 clearBackground color = withFreeable color c'clearBackground
 
 foreign import ccall safe "raylib.h BeginDrawing"
@@ -402,28 +402,28 @@   endDrawing ::
     IO ()
 
-beginMode2D :: Raylib.Types.Camera2D -> IO ()
+beginMode2D :: Camera2D -> IO ()
 beginMode2D camera = withFreeable camera c'beginMode2D
 
 foreign import ccall safe "raylib.h EndMode2D"
   endMode2D ::
     IO ()
 
-beginMode3D :: Raylib.Types.Camera3D -> IO ()
+beginMode3D :: Camera3D -> IO ()
 beginMode3D camera = withFreeable camera c'beginMode3D
 
 foreign import ccall safe "raylib.h EndMode3D"
   endMode3D ::
     IO ()
 
-beginTextureMode :: Raylib.Types.RenderTexture -> IO ()
+beginTextureMode :: RenderTexture -> IO ()
 beginTextureMode renderTexture = withFreeable renderTexture c'beginTextureMode
 
 foreign import ccall safe "raylib.h EndTextureMode"
   endTextureMode ::
     IO ()
 
-beginShaderMode :: Raylib.Types.Shader -> IO ()
+beginShaderMode :: Shader -> IO ()
 beginShaderMode shader = withFreeable shader c'beginShaderMode
 
 foreign import ccall safe "raylib.h EndShaderMode"
@@ -444,23 +444,23 @@   endScissorMode ::
     IO ()
 
-beginVrStereoMode :: Raylib.Types.VrStereoConfig -> IO ()
+beginVrStereoMode :: VrStereoConfig -> IO ()
 beginVrStereoMode config = withFreeable config c'beginVrStereoMode
 
 foreign import ccall safe "raylib.h EndVrStereoMode"
   endVrStereoMode ::
     IO ()
 
-loadVrStereoConfig :: Raylib.Types.VrDeviceInfo -> IO Raylib.Types.VrStereoConfig
+loadVrStereoConfig :: VrDeviceInfo -> IO VrStereoConfig
 loadVrStereoConfig deviceInfo = withFreeable deviceInfo c'loadVrStereoConfig >>= pop
 
-loadShader :: Maybe String -> Maybe String -> IO Raylib.Types.Shader
+loadShader :: Maybe String -> Maybe String -> IO Shader
 loadShader vsFileName fsFileName = do
   shader <- withMaybeCString vsFileName (withMaybeCString fsFileName . c'loadShader) >>= pop
   addShaderId $ shader'id shader
   return shader
 
-loadShaderFromMemory :: Maybe String -> Maybe String -> IO Raylib.Types.Shader
+loadShaderFromMemory :: Maybe String -> Maybe String -> IO Shader
 loadShaderFromMemory vsCode fsCode = do
   shader <- withMaybeCString vsCode (withMaybeCString fsCode . c'loadShaderFromMemory) >>= pop
   addShaderId $ shader'id shader
@@ -469,7 +469,7 @@ isShaderReady :: Shader -> IO Bool
 isShaderReady shader = toBool <$> withFreeable shader c'isShaderReady
 
-getShaderLocation :: Raylib.Types.Shader -> String -> IO Int
+getShaderLocation :: Shader -> String -> IO Int
 getShaderLocation shader uniformName = do
   let sId = shader'id shader
   locs <- readIORef shaderLocations
@@ -490,7 +490,7 @@   where
     locIdx = fromIntegral <$> withFreeable shader (withCString uniformName . c'getShaderLocation)
 
-getShaderLocationAttrib :: Raylib.Types.Shader -> String -> IO Int
+getShaderLocationAttrib :: Shader -> String -> IO Int
 getShaderLocationAttrib shader attribName = fromIntegral <$> withFreeable shader (withCString attribName . c'getShaderLocationAttrib)
 
 setShaderValue :: Shader -> String -> ShaderUniformData -> IO ()
@@ -503,43 +503,50 @@   idx <- getShaderLocation shader uniformName
   nativeSetShaderValueV shader idx values
 
-nativeSetShaderValue :: Raylib.Types.Shader -> Int -> ShaderUniformData -> IO ()
+nativeSetShaderValue :: Shader -> Int -> ShaderUniformData -> IO ()
 nativeSetShaderValue shader locIndex value = do
   (uniformType, ptr) <- unpackShaderUniformData value
   withFreeable shader (\s -> c'setShaderValue s (fromIntegral locIndex) ptr (fromIntegral $ fromEnum uniformType))
   c'free $ castPtr ptr
 
-nativeSetShaderValueV :: Raylib.Types.Shader -> Int -> ShaderUniformDataV -> IO ()
+nativeSetShaderValueV :: Shader -> Int -> ShaderUniformDataV -> IO ()
 nativeSetShaderValueV shader locIndex values = do
   (uniformType, ptr, l) <- unpackShaderUniformDataV values
   withFreeable shader (\s -> c'setShaderValueV s (fromIntegral locIndex) ptr (fromIntegral $ fromEnum uniformType) (fromIntegral l))
   c'free $ castPtr ptr
 
-setShaderValueMatrix :: Raylib.Types.Shader -> Int -> Raylib.Types.Matrix -> IO ()
+setShaderValueMatrix :: Shader -> Int -> Matrix -> IO ()
 setShaderValueMatrix shader locIndex mat = withFreeable shader (\s -> withFreeable mat (c'setShaderValueMatrix s (fromIntegral locIndex)))
 
-setShaderValueTexture :: Raylib.Types.Shader -> Int -> Raylib.Types.Texture -> IO ()
+setShaderValueTexture :: Shader -> Int -> Texture -> IO ()
 setShaderValueTexture shader locIndex tex = withFreeable shader (\s -> withFreeable tex (c'setShaderValueTexture s (fromIntegral locIndex)))
 
-getMouseRay :: Raylib.Types.Vector2 -> Raylib.Types.Camera3D -> IO Raylib.Types.Ray
+-- | Unloads a shader from GPU memory (VRAM). Shaders are automatically unloaded
+-- when `closeWindow` is called, so manually unloading shaders is not required.
+-- In larger projects, you may want to manually unload shaders to avoid having
+-- them in VRAM for too long.
+unloadShader :: Shader -> IO ()
+unloadShader shader = unloadSingleShader (shader'id shader)
+
+getMouseRay :: Vector2 -> Camera3D -> IO Ray
 getMouseRay mousePosition camera = withFreeable mousePosition (withFreeable camera . c'getMouseRay) >>= pop
 
-getCameraMatrix :: Raylib.Types.Camera3D -> IO Raylib.Types.Matrix
+getCameraMatrix :: Camera3D -> IO Matrix
 getCameraMatrix camera = withFreeable camera c'getCameraMatrix >>= pop
 
-getCameraMatrix2D :: Raylib.Types.Camera2D -> IO Raylib.Types.Matrix
+getCameraMatrix2D :: Camera2D -> IO Matrix
 getCameraMatrix2D camera = withFreeable camera c'getCameraMatrix2D >>= pop
 
-getWorldToScreen :: Raylib.Types.Vector3 -> Raylib.Types.Camera3D -> IO Raylib.Types.Vector2
+getWorldToScreen :: Vector3 -> Camera3D -> IO Vector2
 getWorldToScreen position camera = withFreeable position (withFreeable camera . c'getWorldToScreen) >>= pop
 
-getScreenToWorld2D :: Raylib.Types.Vector2 -> Raylib.Types.Camera2D -> IO Raylib.Types.Vector2
+getScreenToWorld2D :: Vector2 -> Camera2D -> IO Vector2
 getScreenToWorld2D position camera = withFreeable position (withFreeable camera . c'getScreenToWorld2D) >>= pop
 
-getWorldToScreenEx :: Raylib.Types.Vector3 -> Raylib.Types.Camera3D -> Int -> Int -> IO Raylib.Types.Vector2
+getWorldToScreenEx :: Vector3 -> Camera3D -> Int -> Int -> IO Vector2
 getWorldToScreenEx position camera width height = withFreeable position (\p -> withFreeable camera (\c -> c'getWorldToScreenEx p c (fromIntegral width) (fromIntegral height))) >>= pop
 
-getWorldToScreen2D :: Raylib.Types.Vector2 -> Raylib.Types.Camera2D -> IO Raylib.Types.Vector2
+getWorldToScreen2D :: Vector2 -> Camera2D -> IO Vector2
 getWorldToScreen2D position camera = withFreeable position (withFreeable camera . c'getWorldToScreen2D) >>= pop
 
 setTargetFPS :: Int -> IO ()
@@ -658,17 +665,17 @@ isPathFile :: String -> IO Bool
 isPathFile path = toBool <$> withCString path c'isPathFile
 
-loadDirectoryFiles :: String -> IO Raylib.Types.FilePathList
+loadDirectoryFiles :: String -> IO FilePathList
 loadDirectoryFiles dirPath = withCString dirPath c'loadDirectoryFiles >>= pop
 
-loadDirectoryFilesEx :: String -> String -> Bool -> IO Raylib.Types.FilePathList
+loadDirectoryFilesEx :: String -> String -> Bool -> IO FilePathList
 loadDirectoryFilesEx basePath filterStr scanSubdirs =
   withCString basePath (\b -> withCString filterStr (\f -> c'loadDirectoryFilesEx b f (fromBool scanSubdirs))) >>= pop
 
 isFileDropped :: IO Bool
 isFileDropped = toBool <$> c'isFileDropped
 
-loadDroppedFiles :: IO Raylib.Types.FilePathList
+loadDroppedFiles :: IO FilePathList
 loadDroppedFiles = c'loadDroppedFiles >>= pop
 
 getFileModTime :: String -> IO Integer
@@ -803,10 +810,10 @@ getMouseY :: IO Int
 getMouseY = fromIntegral <$> c'getMouseY
 
-getMousePosition :: IO Raylib.Types.Vector2
+getMousePosition :: IO Vector2
 getMousePosition = c'getMousePosition >>= pop
 
-getMouseDelta :: IO Raylib.Types.Vector2
+getMouseDelta :: IO Vector2
 getMouseDelta = c'getMouseDelta >>= pop
 
 setMousePosition :: Int -> Int -> IO ()
@@ -821,7 +828,7 @@ getMouseWheelMove :: IO Float
 getMouseWheelMove = realToFrac <$> c'getMouseWheelMove
 
-getMouseWheelMoveV :: IO Raylib.Types.Vector2
+getMouseWheelMoveV :: IO Vector2
 getMouseWheelMoveV = c'getMouseWheelMoveV >>= pop
 
 setMouseCursor :: MouseCursor -> IO ()
@@ -833,7 +840,7 @@ getTouchY :: IO Int
 getTouchY = fromIntegral <$> c'getTouchY
 
-getTouchPosition :: Int -> IO Raylib.Types.Vector2
+getTouchPosition :: Int -> IO Vector2
 getTouchPosition index = c'getTouchPosition (fromIntegral index) >>= pop
 
 getTouchPointId :: Int -> IO Int
@@ -854,19 +861,19 @@ getGestureHoldDuration :: IO Float
 getGestureHoldDuration = realToFrac <$> c'getGestureHoldDuration
 
-getGestureDragVector :: IO Raylib.Types.Vector2
+getGestureDragVector :: IO Vector2
 getGestureDragVector = c'getGestureDragVector >>= pop
 
 getGestureDragAngle :: IO Float
 getGestureDragAngle = realToFrac <$> c'getGestureDragAngle
 
-getGesturePinchVector :: IO Raylib.Types.Vector2
+getGesturePinchVector :: IO Vector2
 getGesturePinchVector = c'getGesturePinchVector >>= pop
 
 getGesturePinchAngle :: IO Float
 getGesturePinchAngle = realToFrac <$> c'getGesturePinchAngle
 
-updateCamera :: Raylib.Types.Camera3D -> CameraMode -> IO Raylib.Types.Camera3D
+updateCamera :: Camera3D -> CameraMode -> IO Camera3D
 updateCamera camera mode =
   withFreeable
     camera
src/Raylib/Core/Audio.hs view
@@ -11,7 +11,7 @@     withArrayLen,
   )
 import Foreign.C (CUChar, withCString)
-import Raylib.Internal (addAudioBuffer, addCtxData, unloadAudioBuffers, unloadCtxData)
+import Raylib.Internal (addAudioBuffer, addCtxData, unloadAudioBuffers, unloadCtxData, unloadSingleAudioBuffer, unloadSingleCtxDataPtr)
 import Raylib.Native
   ( c'closeAudioDevice,
     c'exportWave,
@@ -70,7 +70,7 @@ import Raylib.Types
   ( AudioStream (audioStream'buffer),
     Music (music'ctxData, music'ctxType, music'stream),
-    Sound,
+    Sound (sound'stream),
     Wave (wave'channels, wave'frameCount),
   )
 import Raylib.ForeignUtil
@@ -107,6 +107,13 @@ updateSound :: Sound -> Ptr () -> Int -> IO ()
 updateSound sound dataValue sampleCount = withFreeable sound (\s -> c'updateSound s dataValue (fromIntegral sampleCount))
 
+-- | Unloads an sound from RAM. Sounds are automatically unloaded
+-- when `closeAudioDevice` is called, so manually unloading sounds is
+-- not required. In larger projects, you may want to manually unload
+-- sounds to avoid having them in RAM for too long.
+unloadSound :: Sound -> IO ()
+unloadSound sound = unloadAudioStream (sound'stream sound)
+
 isWaveReady :: Wave -> IO Bool
 isWaveReady wave = toBool <$> withFreeable wave c'isWaveReady
 
@@ -186,6 +193,13 @@   addCtxData (fromEnum $ music'ctxType music) (music'ctxData music)
   return music
 
+-- | Unloads a music stream from RAM. Music streams are automatically unloaded
+-- when `closeAudioDevice` is called, so manually unloading music streams is
+-- not required. In larger projects, you may want to manually unload music
+-- streams to avoid having them in RAM for too long.
+unloadMusicStream :: Music -> IO ()
+unloadMusicStream music = unloadSingleCtxDataPtr (fromEnum $ music'ctxType music) (music'ctxData music)
+
 isMusicReady :: Music -> IO Bool
 isMusicReady music = toBool <$> withFreeable music c'isMusicReady
 
@@ -230,6 +244,13 @@   stream <- c'loadAudioStream (fromIntegral sampleRate) (fromIntegral sampleSize) (fromIntegral channels) >>= pop
   addAudioBuffer $ castPtr (audioStream'buffer stream)
   return stream
+
+-- | Unloads an audio stream from RAM. Audio streams are automatically unloaded
+-- when `closeAudioDevice` is called, so manually unloading audio streams is
+-- not required. In larger projects, you may want to manually unload audio
+-- streams to avoid having them in RAM for too long.
+unloadAudioStream :: AudioStream -> IO ()
+unloadAudioStream stream = unloadSingleAudioBuffer (castPtr $ audioStream'buffer stream)
 
 isAudioStreamReady :: AudioStream -> IO Bool
 isAudioStreamReady stream = toBool <$> withFreeable stream c'isAudioStreamReady
src/Raylib/Core/Models.hs view
@@ -16,7 +16,13 @@   )
 import Foreign.C (CFloat, withCString)
 import GHC.IO (unsafePerformIO)
-import Raylib.Internal (addShaderId, addTextureId, addVaoId, addVboIds)
+import Raylib.ForeignUtil
+  ( c'free,
+    pop,
+    popCArray,
+    withFreeable,
+  )
+import Raylib.Internal (addShaderId, addTextureId, addVaoId, addVboIds, unloadSingleShader, unloadSingleTexture, unloadSingleVaoId, unloadSingleVboIdList)
 import Raylib.Native
   ( c'checkCollisionBoxSphere,
     c'checkCollisionBoxes,
@@ -105,60 +111,54 @@     Vector2,
     Vector3,
   )
-import Raylib.ForeignUtil
-  ( c'free,
-    pop,
-    popCArray,
-    withFreeable,
-  )
 import Prelude hiding (length)
 
-drawLine3D :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawLine3D :: Vector3 -> Vector3 -> Color -> IO ()
 drawLine3D start end color = withFreeable start (\s -> withFreeable end (withFreeable color . c'drawLine3D s))
 
-drawPoint3D :: Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawPoint3D :: Vector3 -> Color -> IO ()
 drawPoint3D point color = withFreeable point (withFreeable color . c'drawPoint3D)
 
-drawCircle3D :: Raylib.Types.Vector3 -> Float -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Color -> IO ()
+drawCircle3D :: Vector3 -> Float -> Vector3 -> Float -> Color -> IO ()
 drawCircle3D center radius rotationAxis rotationAngle color = withFreeable center (\c -> withFreeable rotationAxis (\r -> withFreeable color (c'drawCircle3D c (realToFrac radius) r (realToFrac rotationAngle))))
 
-drawTriangle3D :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawTriangle3D :: Vector3 -> Vector3 -> Vector3 -> Color -> IO ()
 drawTriangle3D v1 v2 v3 color = withFreeable v1 (\p1 -> withFreeable v2 (\p2 -> withFreeable v3 (withFreeable color . c'drawTriangle3D p1 p2)))
 
-drawTriangleStrip3D :: [Raylib.Types.Vector3] -> Int -> Raylib.Types.Color -> IO ()
+drawTriangleStrip3D :: [Vector3] -> Int -> Color -> IO ()
 drawTriangleStrip3D points pointCount color = withArray points (\p -> withFreeable color (c'drawTriangleStrip3D p (fromIntegral pointCount)))
 
-drawCube :: Raylib.Types.Vector3 -> Float -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawCube :: Vector3 -> Float -> Float -> Float -> Color -> IO ()
 drawCube position width height length color = withFreeable position (\p -> withFreeable color (c'drawCube p (realToFrac width) (realToFrac height) (realToFrac length)))
 
-drawCubeV :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawCubeV :: Vector3 -> Vector3 -> Color -> IO ()
 drawCubeV position size color = withFreeable position (\p -> withFreeable size (withFreeable color . c'drawCubeV p))
 
-drawCubeWires :: Raylib.Types.Vector3 -> Float -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawCubeWires :: Vector3 -> Float -> Float -> Float -> Color -> IO ()
 drawCubeWires position width height length color = withFreeable position (\p -> withFreeable color (c'drawCubeWires p (realToFrac width) (realToFrac height) (realToFrac length)))
 
-drawCubeWiresV :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawCubeWiresV :: Vector3 -> Vector3 -> Color -> IO ()
 drawCubeWiresV position size color = withFreeable position (\p -> withFreeable size (withFreeable color . c'drawCubeWiresV p))
 
-drawSphere :: Raylib.Types.Vector3 -> Float -> Raylib.Types.Color -> IO ()
+drawSphere :: Vector3 -> Float -> Color -> IO ()
 drawSphere position radius color = withFreeable position (\p -> withFreeable color (c'drawSphere p (realToFrac radius)))
 
-drawSphereEx :: Raylib.Types.Vector3 -> Float -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawSphereEx :: Vector3 -> Float -> Int -> Int -> Color -> IO ()
 drawSphereEx position radius rings slices color = withFreeable position (\p -> withFreeable color (c'drawSphereEx p (realToFrac radius) (fromIntegral rings) (fromIntegral slices)))
 
-drawSphereWires :: Raylib.Types.Vector3 -> Float -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawSphereWires :: Vector3 -> Float -> Int -> Int -> Color -> IO ()
 drawSphereWires position radius rings slices color = withFreeable position (\p -> withFreeable color (c'drawSphereWires p (realToFrac radius) (fromIntegral rings) (fromIntegral slices)))
 
-drawCylinder :: Raylib.Types.Vector3 -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCylinder :: Vector3 -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawCylinder position radiusTop radiusBottom height slices color = withFreeable position (\p -> withFreeable color (c'drawCylinder p (realToFrac radiusTop) (realToFrac radiusBottom) (realToFrac height) (fromIntegral slices)))
 
-drawCylinderEx :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCylinderEx :: Vector3 -> Vector3 -> Float -> Float -> Int -> Color -> IO ()
 drawCylinderEx start end startRadius endRadius sides color = withFreeable start (\s -> withFreeable end (\e -> withFreeable color (c'drawCylinderEx s e (realToFrac startRadius) (realToFrac endRadius) (fromIntegral sides))))
 
-drawCylinderWires :: Raylib.Types.Vector3 -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCylinderWires :: Vector3 -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawCylinderWires position radiusTop radiusBottom height slices color = withFreeable position (\p -> withFreeable color (c'drawCylinderWires p (realToFrac radiusTop) (realToFrac radiusBottom) (realToFrac height) (fromIntegral slices)))
 
-drawCylinderWiresEx :: Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCylinderWiresEx :: Vector3 -> Vector3 -> Float -> Float -> Int -> Color -> IO ()
 drawCylinderWiresEx start end startRadius endRadius sides color = withFreeable start (\s -> withFreeable end (\e -> withFreeable color (c'drawCylinderWiresEx s e (realToFrac startRadius) (realToFrac endRadius) (fromIntegral sides))))
 
 drawCapsule :: Vector3 -> Vector3 -> CFloat -> Int -> Int -> Color -> IO ()
@@ -167,23 +167,23 @@ drawCapsuleWires :: Vector3 -> Vector3 -> CFloat -> Int -> Int -> Color -> IO ()
 drawCapsuleWires start end radius slices rings color = withFreeable start (\s -> withFreeable end (\e -> withFreeable color (c'drawCapsuleWires s e (realToFrac radius) (fromIntegral slices) (fromIntegral rings))))
 
-drawPlane :: Raylib.Types.Vector3 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawPlane :: Vector3 -> Vector2 -> Color -> IO ()
 drawPlane center size color = withFreeable center (\c -> withFreeable size (withFreeable color . c'drawPlane c))
 
-drawRay :: Raylib.Types.Ray -> Raylib.Types.Color -> IO ()
+drawRay :: Ray -> Color -> IO ()
 drawRay ray color = withFreeable ray (withFreeable color . c'drawRay)
 
 drawGrid :: Int -> Float -> IO ()
 drawGrid slices spacing = c'drawGrid (fromIntegral slices) (realToFrac spacing)
 
-loadModel :: String -> IO Raylib.Types.Model
+loadModel :: String -> IO Model
 loadModel fileName = do
   model <- withCString fileName c'loadModel >>= pop
   forM_ (model'meshes model) storeMeshData
   storeMaterialData $ model'materials model
   return model
 
-loadModelFromMesh :: Raylib.Types.Mesh -> IO Raylib.Types.Model
+loadModelFromMesh :: Mesh -> IO Model
 loadModelFromMesh mesh = do
   meshPtr <- malloc
   poke meshPtr mesh
@@ -192,98 +192,125 @@   storeMaterialData $ model'materials model
   return model
 
-isModelReady :: Raylib.Types.Model -> IO Bool
+-- | Unloads a model from GPU memory (VRAM). This unloads its associated
+-- meshes and materials. Models are automatically unloaded when `closeWindow`
+-- is called, so manually unloading models is not required. In larger projects,
+-- you may want to manually unload models to avoid having them in VRAM for too
+-- long.
+unloadModel :: Model -> IO ()
+unloadModel model = do
+  forM_ (model'meshes model) unloadMesh
+  forM_ (model'materials model) unloadMaterial
+
+-- | Unloads a model from GPU memory (VRAM). This unloads its associated
+-- materials, but not meshes. Models are automatically unloaded when `closeWindow`
+-- is called, so manually unloading models is not required. In larger projects,
+-- you may want to manually unload models to avoid having them in VRAM for too
+-- long.
+unloadModelKeepMeshes :: Model -> IO ()
+unloadModelKeepMeshes model = forM_ (model'materials model) unloadMaterial
+
+isModelReady :: Model -> IO Bool
 isModelReady model = toBool <$> withFreeable model c'isModelReady
 
-getModelBoundingBox :: Raylib.Types.Model -> IO Raylib.Types.BoundingBox
+getModelBoundingBox :: Model -> IO BoundingBox
 getModelBoundingBox model = withFreeable model c'getModelBoundingBox >>= pop
 
-drawModel :: Raylib.Types.Model -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Color -> IO ()
+drawModel :: Model -> Vector3 -> Float -> Color -> IO ()
 drawModel model position scale tint = withFreeable model (\m -> withFreeable position (\p -> withFreeable tint (c'drawModel m p (realToFrac scale))))
 
-drawModelEx :: Raylib.Types.Model -> Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawModelEx :: Model -> Vector3 -> Vector3 -> Float -> Vector3 -> Color -> IO ()
 drawModelEx model position rotationAxis rotationAngle scale tint = withFreeable model (\m -> withFreeable position (\p -> withFreeable rotationAxis (\r -> withFreeable scale (withFreeable tint . c'drawModelEx m p r (realToFrac rotationAngle)))))
 
-drawModelWires :: Raylib.Types.Model -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Color -> IO ()
+drawModelWires :: Model -> Vector3 -> Float -> Color -> IO ()
 drawModelWires model position scale tint = withFreeable model (\m -> withFreeable position (\p -> withFreeable tint (c'drawModelWires m p (realToFrac scale))))
 
-drawModelWiresEx :: Raylib.Types.Model -> Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Vector3 -> Raylib.Types.Color -> IO ()
+drawModelWiresEx :: Model -> Vector3 -> Vector3 -> Float -> Vector3 -> Color -> IO ()
 drawModelWiresEx model position rotationAxis rotationAngle scale tint = withFreeable model (\m -> withFreeable position (\p -> withFreeable rotationAxis (\r -> withFreeable scale (withFreeable tint . c'drawModelWiresEx m p r (realToFrac rotationAngle)))))
 
-drawBoundingBox :: Raylib.Types.BoundingBox -> Raylib.Types.Color -> IO ()
+drawBoundingBox :: BoundingBox -> Color -> IO ()
 drawBoundingBox box color = withFreeable box (withFreeable color . c'drawBoundingBox)
 
-drawBillboard :: Raylib.Types.Camera3D -> Raylib.Types.Texture -> Raylib.Types.Vector3 -> Float -> Raylib.Types.Color -> IO ()
+drawBillboard :: Camera3D -> Texture -> Vector3 -> Float -> Color -> IO ()
 drawBillboard camera texture position size tint = withFreeable camera (\c -> withFreeable texture (\t -> withFreeable position (\p -> withFreeable tint (c'drawBillboard c t p (realToFrac size)))))
 
-drawBillboardRec :: Raylib.Types.Camera3D -> Raylib.Types.Texture -> Raylib.Types.Rectangle -> Raylib.Types.Vector3 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawBillboardRec :: Camera3D -> Texture -> Rectangle -> Vector3 -> Vector2 -> Color -> IO ()
 drawBillboardRec camera texture source position size tint = withFreeable camera (\c -> withFreeable texture (\t -> withFreeable source (\s -> withFreeable position (\p -> withFreeable size (withFreeable tint . c'drawBillboardRec c t s p)))))
 
-drawBillboardPro :: Raylib.Types.Camera3D -> Raylib.Types.Texture -> Raylib.Types.Rectangle -> Raylib.Types.Vector3 -> Raylib.Types.Vector3 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawBillboardPro :: Camera3D -> Texture -> Rectangle -> Vector3 -> Vector3 -> Vector2 -> Vector2 -> Float -> Color -> IO ()
 drawBillboardPro camera texture source position up size origin rotation tint = withFreeable camera (\c -> withFreeable texture (\t -> withFreeable source (\s -> withFreeable position (\p -> withFreeable up (\u -> withFreeable size (\sz -> withFreeable origin (\o -> withFreeable tint (c'drawBillboardPro c t s p u sz o (realToFrac rotation)))))))))
 
-uploadMesh :: Raylib.Types.Mesh -> Bool -> IO Raylib.Types.Mesh
+uploadMesh :: Mesh -> Bool -> IO Mesh
 uploadMesh mesh dynamic = withFreeable mesh (\m -> c'uploadMesh m (fromBool dynamic) >> peek m >>= storeMeshData)
 
-updateMeshBuffer :: Raylib.Types.Mesh -> Int -> Ptr () -> Int -> Int -> IO ()
+updateMeshBuffer :: Mesh -> Int -> Ptr () -> Int -> Int -> IO ()
 updateMeshBuffer mesh index dataValue dataSize offset = withFreeable mesh (\m -> c'updateMeshBuffer m (fromIntegral index) dataValue (fromIntegral dataSize) (fromIntegral offset))
 
-drawMesh :: Raylib.Types.Mesh -> Raylib.Types.Material -> Raylib.Types.Matrix -> IO ()
+-- | Unloads a mesh from GPU memory (VRAM). Meshes are
+-- automatically unloaded when `closeWindow` is called, so manually unloading
+-- meshes is not required. In larger projects, you may want to
+-- manually unload meshes to avoid having them in VRAM for too long.
+unloadMesh :: Mesh -> IO ()
+unloadMesh mesh = do
+  unloadSingleVaoId (mesh'vaoId mesh)
+  unloadSingleVboIdList (mesh'vboId mesh)
+
+-- Internal
+storeMeshData :: Mesh -> IO Mesh
+storeMeshData mesh = do
+  addVaoId $ mesh'vaoId mesh
+  addVboIds $ mesh'vboId mesh
+  return mesh
+
+drawMesh :: Mesh -> Material -> Matrix -> IO ()
 drawMesh mesh material transform = withFreeable mesh (\m -> withFreeable material (withFreeable transform . c'drawMesh m))
 
-drawMeshInstanced :: Raylib.Types.Mesh -> Raylib.Types.Material -> [Raylib.Types.Matrix] -> IO ()
+drawMeshInstanced :: Mesh -> Material -> [Matrix] -> IO ()
 drawMeshInstanced mesh material transforms = withFreeable mesh (\m -> withFreeable material (\mat -> withArrayLen transforms (\size t -> c'drawMeshInstanced m mat t (fromIntegral size))))
 
-exportMesh :: Raylib.Types.Mesh -> String -> IO Bool
+exportMesh :: Mesh -> String -> IO Bool
 exportMesh mesh fileName = toBool <$> withFreeable mesh (withCString fileName . c'exportMesh)
 
-getMeshBoundingBox :: Raylib.Types.Mesh -> IO Raylib.Types.BoundingBox
+getMeshBoundingBox :: Mesh -> IO BoundingBox
 getMeshBoundingBox mesh = withFreeable mesh c'getMeshBoundingBox >>= pop
 
-genMeshTangents :: Raylib.Types.Mesh -> IO Raylib.Types.Mesh
+genMeshTangents :: Mesh -> IO Mesh
 genMeshTangents mesh = withFreeable mesh (\m -> c'genMeshTangents m >> peek m)
 
-genMeshPoly :: Int -> Float -> IO Raylib.Types.Mesh
+genMeshPoly :: Int -> Float -> IO Mesh
 genMeshPoly sides radius = c'genMeshPoly (fromIntegral sides) (realToFrac radius) >>= pop >>= storeMeshData
 
-genMeshPlane :: Float -> Float -> Int -> Int -> IO Raylib.Types.Mesh
+genMeshPlane :: Float -> Float -> Int -> Int -> IO Mesh
 genMeshPlane width length resX resZ = c'genMeshPlane (realToFrac width) (realToFrac length) (fromIntegral resX) (fromIntegral resZ) >>= pop >>= storeMeshData
 
-genMeshCube :: Float -> Float -> Float -> IO Raylib.Types.Mesh
+genMeshCube :: Float -> Float -> Float -> IO Mesh
 genMeshCube width height length = c'genMeshCube (realToFrac width) (realToFrac height) (realToFrac length) >>= pop >>= storeMeshData
 
-genMeshSphere :: Float -> Int -> Int -> IO Raylib.Types.Mesh
+genMeshSphere :: Float -> Int -> Int -> IO Mesh
 genMeshSphere radius rings slices = c'genMeshSphere (realToFrac radius) (fromIntegral rings) (fromIntegral slices) >>= pop >>= storeMeshData
 
-genMeshHemiSphere :: Float -> Int -> Int -> IO Raylib.Types.Mesh
+genMeshHemiSphere :: Float -> Int -> Int -> IO Mesh
 genMeshHemiSphere radius rings slices = c'genMeshHemiSphere (realToFrac radius) (fromIntegral rings) (fromIntegral slices) >>= pop >>= storeMeshData
 
-genMeshCylinder :: Float -> Float -> Int -> IO Raylib.Types.Mesh
+genMeshCylinder :: Float -> Float -> Int -> IO Mesh
 genMeshCylinder radius height slices = c'genMeshCylinder (realToFrac radius) (realToFrac height) (fromIntegral slices) >>= pop >>= storeMeshData
 
-genMeshCone :: Float -> Float -> Int -> IO Raylib.Types.Mesh
+genMeshCone :: Float -> Float -> Int -> IO Mesh
 genMeshCone radius height slices = c'genMeshCone (realToFrac radius) (realToFrac height) (fromIntegral slices) >>= pop >>= storeMeshData
 
-genMeshTorus :: Float -> Float -> Int -> Int -> IO Raylib.Types.Mesh
+genMeshTorus :: Float -> Float -> Int -> Int -> IO Mesh
 genMeshTorus radius size radSeg sides = c'genMeshTorus (realToFrac radius) (realToFrac size) (fromIntegral radSeg) (fromIntegral sides) >>= pop >>= storeMeshData
 
-genMeshKnot :: Float -> Float -> Int -> Int -> IO Raylib.Types.Mesh
+genMeshKnot :: Float -> Float -> Int -> Int -> IO Mesh
 genMeshKnot radius size radSeg sides = c'genMeshKnot (realToFrac radius) (realToFrac size) (fromIntegral radSeg) (fromIntegral sides) >>= pop >>= storeMeshData
 
-genMeshHeightmap :: Raylib.Types.Image -> Raylib.Types.Vector3 -> IO Raylib.Types.Mesh
+genMeshHeightmap :: Image -> Vector3 -> IO Mesh
 genMeshHeightmap heightmap size = withFreeable heightmap (withFreeable size . c'genMeshHeightmap) >>= pop >>= storeMeshData
 
-genMeshCubicmap :: Raylib.Types.Image -> Raylib.Types.Vector3 -> IO Raylib.Types.Mesh
+genMeshCubicmap :: Image -> Vector3 -> IO Mesh
 genMeshCubicmap cubicmap cubeSize = withFreeable cubicmap (withFreeable cubeSize . c'genMeshCubicmap) >>= pop >>= storeMeshData
 
--- Internal
-storeMeshData :: Mesh -> IO Mesh
-storeMeshData mesh = do
-  addVaoId $ mesh'vaoId mesh
-  addVboIds $ mesh'vboId mesh
-  return mesh
-
-loadMaterials :: String -> IO [Raylib.Types.Material]
+loadMaterials :: String -> IO [Material]
 loadMaterials fileName =
   withCString
     fileName
@@ -299,6 +326,7 @@           )
     )
 
+-- Internal
 storeMaterialData :: [Material] -> IO ()
 storeMaterialData materials =
   forM_
@@ -310,19 +338,30 @@           (Just maps) -> forM_ maps (addTextureId . texture'id . materialMap'texture)
     )
 
-loadMaterialDefault :: IO Raylib.Types.Material
+-- | Unloads a material from GPU memory (VRAM). Materials are
+-- automatically unloaded when `closeWindow` is called, so manually unloading
+-- materials is not required. In larger projects, you may want to
+-- manually unload materials to avoid having them in VRAM for too long.
+unloadMaterial :: Material -> IO ()
+unloadMaterial material = do
+  unloadSingleShader (shader'id $ material'shader material)
+  case material'maps material of
+    Nothing -> return ()
+    (Just maps) -> forM_ maps (unloadSingleTexture . texture'id . materialMap'texture)
+
+loadMaterialDefault :: IO Material
 loadMaterialDefault = c'loadMaterialDefault >>= pop
 
-isMaterialReady :: Raylib.Types.Material -> IO Bool
+isMaterialReady :: Material -> IO Bool
 isMaterialReady material = toBool <$> withFreeable material c'isMaterialReady
 
-setMaterialTexture :: Raylib.Types.Material -> Int -> Raylib.Types.Texture -> IO Raylib.Types.Material
+setMaterialTexture :: Material -> Int -> Texture -> IO Material
 setMaterialTexture material mapType texture = withFreeable material (\m -> withFreeable texture (c'setMaterialTexture m (fromIntegral mapType)) >> peek m)
 
-setModelMeshMaterial :: Raylib.Types.Model -> Int -> Int -> IO Raylib.Types.Model
+setModelMeshMaterial :: Model -> Int -> Int -> IO Model
 setModelMeshMaterial model meshId materialId = withFreeable model (\m -> c'setModelMeshMaterial m (fromIntegral meshId) (fromIntegral materialId) >> peek m)
 
-loadModelAnimations :: String -> IO [Raylib.Types.ModelAnimation]
+loadModelAnimations :: String -> IO [ModelAnimation]
 loadModelAnimations fileName =
   withCString
     fileName
@@ -336,7 +375,7 @@           )
     )
 
-updateModelAnimation :: Raylib.Types.Model -> Raylib.Types.ModelAnimation -> Int -> IO ()
+updateModelAnimation :: Model -> ModelAnimation -> Int -> IO ()
 updateModelAnimation model animation frame = withFreeable model (\m -> withFreeable animation (\a -> c'updateModelAnimation m a (fromIntegral frame)))
 
 isModelAnimationValid :: Model -> ModelAnimation -> IO Bool
src/Raylib/Core/Shapes.hs view
@@ -57,35 +57,35 @@ import Raylib.Types (Color, Rectangle, Texture, Vector2 (Vector2))
 import Raylib.ForeignUtil (pop, withFreeable)
 
-setShapesTexture :: Raylib.Types.Texture -> Raylib.Types.Rectangle -> IO ()
+setShapesTexture :: Texture -> Rectangle -> IO ()
 setShapesTexture tex source = withFreeable tex (withFreeable source . c'setShapesTexture)
 
-drawPixel :: Int -> Int -> Raylib.Types.Color -> IO ()
+drawPixel :: Int -> Int -> Color -> IO ()
 drawPixel x y color = withFreeable color $ c'drawPixel (fromIntegral x) (fromIntegral y)
 
-drawPixelV :: Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawPixelV :: Vector2 -> Color -> IO ()
 drawPixelV position color = withFreeable position (withFreeable color . c'drawPixelV)
 
-drawLine :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawLine :: Int -> Int -> Int -> Int -> Color -> IO ()
 drawLine startX startY endX endY color =
   withFreeable color $ c'drawLine (fromIntegral startX) (fromIntegral startY) (fromIntegral endX) (fromIntegral endY)
 
-drawLineV :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawLineV :: Vector2 -> Vector2 -> Color -> IO ()
 drawLineV start end color = withFreeable start (\s -> withFreeable end (withFreeable color . c'drawLineV s))
 
-drawLineEx :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawLineEx :: Vector2 -> Vector2 -> Float -> Color -> IO ()
 drawLineEx start end thickness color =
   withFreeable start (\s -> withFreeable end (\e -> withFreeable color (c'drawLineEx s e (realToFrac thickness))))
 
-drawLineBezier :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawLineBezier :: Vector2 -> Vector2 -> Float -> Color -> IO ()
 drawLineBezier start end thickness color =
   withFreeable start (\s -> withFreeable end (\e -> withFreeable color (c'drawLineBezier s e (realToFrac thickness))))
 
-drawLineBezierQuad :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawLineBezierQuad :: Vector2 -> Vector2 -> Vector2 -> Float -> Color -> IO ()
 drawLineBezierQuad start end control thickness color =
   withFreeable start (\s -> withFreeable end (\e -> withFreeable control (\c -> withFreeable color (c'drawLineBezierQuad s e c (realToFrac thickness)))))
 
-drawLineBezierCubic :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawLineBezierCubic :: Vector2 -> Vector2 -> Vector2 -> Vector2 -> Float -> Color -> IO ()
 drawLineBezierCubic start end startControl endControl thickness color =
   withFreeable
     start
@@ -108,13 +108,13 @@           )
     )
 
-drawLineStrip :: [Raylib.Types.Vector2] -> Raylib.Types.Color -> IO ()
+drawLineStrip :: [Vector2] -> Color -> IO ()
 drawLineStrip points color = withArray points (\p -> withFreeable color $ c'drawLineStrip p (genericLength points))
 
-drawCircle :: Int -> Int -> Float -> Raylib.Types.Color -> IO ()
+drawCircle :: Int -> Int -> Float -> Color -> IO ()
 drawCircle centerX centerY radius color = withFreeable color (c'drawCircle (fromIntegral centerX) (fromIntegral centerY) (realToFrac radius))
 
-drawCircleSector :: Raylib.Types.Vector2 -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCircleSector :: Vector2 -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawCircleSector center radius startAngle endAngle segments color =
   withFreeable
     center
@@ -125,7 +125,7 @@           )
     )
 
-drawCircleSectorLines :: Raylib.Types.Vector2 -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawCircleSectorLines :: Vector2 -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawCircleSectorLines center radius startAngle endAngle segments color =
   withFreeable
     center
@@ -136,27 +136,27 @@           )
     )
 
-drawCircleGradient :: Int -> Int -> Float -> Raylib.Types.Color -> Raylib.Types.Color -> IO ()
+drawCircleGradient :: Int -> Int -> Float -> Color -> Color -> IO ()
 drawCircleGradient centerX centerY radius color1 color2 =
   withFreeable color1 (withFreeable color2 . c'drawCircleGradient (fromIntegral centerX) (fromIntegral centerY) (realToFrac radius))
 
-drawCircleV :: Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawCircleV :: Vector2 -> Float -> Color -> IO ()
 drawCircleV center radius color =
   withFreeable center (\c -> withFreeable color (c'drawCircleV c (realToFrac radius)))
 
-drawCircleLines :: Int -> Int -> Float -> Raylib.Types.Color -> IO ()
+drawCircleLines :: Int -> Int -> Float -> Color -> IO ()
 drawCircleLines centerX centerY radius color =
   withFreeable color (c'drawCircleLines (fromIntegral centerX) (fromIntegral centerY) (realToFrac radius))
 
-drawEllipse :: Int -> Int -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawEllipse :: Int -> Int -> Float -> Float -> Color -> IO ()
 drawEllipse centerX centerY radiusH radiusV color =
   withFreeable color (c'drawEllipse (fromIntegral centerX) (fromIntegral centerY) (realToFrac radiusH) (realToFrac radiusV))
 
-drawEllipseLines :: Int -> Int -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawEllipseLines :: Int -> Int -> Float -> Float -> Color -> IO ()
 drawEllipseLines centerX centerY radiusH radiusV color =
   withFreeable color (c'drawEllipseLines (fromIntegral centerX) (fromIntegral centerY) (realToFrac radiusH) (realToFrac radiusV))
 
-drawRing :: Raylib.Types.Vector2 -> Float -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawRing :: Vector2 -> Float -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawRing center innerRadius outerRadius startAngle endAngle segments color =
   withFreeable
     center
@@ -173,7 +173,7 @@           )
     )
 
-drawRingLines :: Raylib.Types.Vector2 -> Float -> Float -> Float -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawRingLines :: Vector2 -> Float -> Float -> Float -> Float -> Int -> Color -> IO ()
 drawRingLines center innerRadius outerRadius startAngle endAngle segments color =
   withFreeable
     center
@@ -190,21 +190,21 @@           )
     )
 
-drawRectangle :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawRectangle :: Int -> Int -> Int -> Int -> Color -> IO ()
 drawRectangle posX posY width height color =
   withFreeable color (c'drawRectangle (fromIntegral posX) (fromIntegral posY) (fromIntegral width) (fromIntegral height))
 
-drawRectangleV :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawRectangleV :: Vector2 -> Vector2 -> Color -> IO ()
 drawRectangleV position size color = withFreeable position (\p -> withFreeable size (withFreeable color . c'drawRectangleV p))
 
-drawRectangleRec :: Raylib.Types.Rectangle -> Raylib.Types.Color -> IO ()
+drawRectangleRec :: Rectangle -> Color -> IO ()
 drawRectangleRec rect color = withFreeable rect (withFreeable color . c'drawRectangleRec)
 
-drawRectanglePro :: Raylib.Types.Rectangle -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawRectanglePro :: Rectangle -> Vector2 -> Float -> Color -> IO ()
 drawRectanglePro rect origin rotation color =
   withFreeable color (\c -> withFreeable rect (\r -> withFreeable origin (\o -> c'drawRectanglePro r o (realToFrac rotation) c)))
 
-drawRectangleGradientV :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> Raylib.Types.Color -> IO ()
+drawRectangleGradientV :: Int -> Int -> Int -> Int -> Color -> Color -> IO ()
 drawRectangleGradientV posX posY width height color1 color2 =
   withFreeable
     color1
@@ -216,7 +216,7 @@           (fromIntegral height)
     )
 
-drawRectangleGradientH :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> Raylib.Types.Color -> IO ()
+drawRectangleGradientH :: Int -> Int -> Int -> Int -> Color -> Color -> IO ()
 drawRectangleGradientH posX posY width height color1 color2 =
   withFreeable
     color1
@@ -228,7 +228,7 @@           (fromIntegral height)
     )
 
-drawRectangleGradientEx :: Raylib.Types.Rectangle -> Raylib.Types.Color -> Raylib.Types.Color -> Raylib.Types.Color -> Raylib.Types.Color -> IO ()
+drawRectangleGradientEx :: Rectangle -> Color -> Color -> Color -> Color -> IO ()
 drawRectangleGradientEx rect col1 col2 col3 col4 =
   withFreeable
     rect
@@ -244,23 +244,23 @@           )
     )
 
-drawRectangleLines :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawRectangleLines :: Int -> Int -> Int -> Int -> Color -> IO ()
 drawRectangleLines posX posY width height color =
   withFreeable color (c'drawRectangleLines (fromIntegral posX) (fromIntegral posY) (fromIntegral width) (fromIntegral height))
 
-drawRectangleLinesEx :: Raylib.Types.Rectangle -> Float -> Raylib.Types.Color -> IO ()
+drawRectangleLinesEx :: Rectangle -> Float -> Color -> IO ()
 drawRectangleLinesEx rect thickness color =
   withFreeable color (\c -> withFreeable rect (\r -> c'drawRectangleLinesEx r (realToFrac thickness) c))
 
-drawRectangleRounded :: Raylib.Types.Rectangle -> Float -> Int -> Raylib.Types.Color -> IO ()
+drawRectangleRounded :: Rectangle -> Float -> Int -> Color -> IO ()
 drawRectangleRounded rect roundness segments color =
   withFreeable rect (\r -> withFreeable color $ c'drawRectangleRounded r (realToFrac roundness) (fromIntegral segments))
 
-drawRectangleRoundedLines :: Raylib.Types.Rectangle -> Float -> Int -> Float -> Raylib.Types.Color -> IO ()
+drawRectangleRoundedLines :: Rectangle -> Float -> Int -> Float -> Color -> IO ()
 drawRectangleRoundedLines rect roundness segments thickness color =
   withFreeable rect (\r -> withFreeable color $ c'drawRectangleRoundedLines r (realToFrac roundness) (fromIntegral segments) (realToFrac thickness))
 
-drawTriangle :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawTriangle :: Vector2 -> Vector2 -> Vector2 -> Color -> IO ()
 drawTriangle v1 v2 v3 color =
   withFreeable
     v1
@@ -271,7 +271,7 @@           )
     )
 
-drawTriangleLines :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawTriangleLines :: Vector2 -> Vector2 -> Vector2 -> Color -> IO ()
 drawTriangleLines v1 v2 v3 color =
   withFreeable
     v1
@@ -282,22 +282,22 @@           )
     )
 
-drawTriangleFan :: [Raylib.Types.Vector2] -> Raylib.Types.Color -> IO ()
+drawTriangleFan :: [Vector2] -> Color -> IO ()
 drawTriangleFan points color = withArray points (\p -> withFreeable color $ c'drawTriangleFan p (genericLength points))
 
-drawTriangleStrip :: [Raylib.Types.Vector2] -> Raylib.Types.Color -> IO ()
+drawTriangleStrip :: [Vector2] -> Color -> IO ()
 drawTriangleStrip points color =
   withArray points (\p -> withFreeable color $ c'drawTriangleStrip p (genericLength points))
 
-drawPoly :: Raylib.Types.Vector2 -> Int -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawPoly :: Vector2 -> Int -> Float -> Float -> Color -> IO ()
 drawPoly center sides radius rotation color =
   withFreeable center (\c -> withFreeable color $ c'drawPoly c (fromIntegral sides) (realToFrac radius) (realToFrac rotation))
 
-drawPolyLines :: Raylib.Types.Vector2 -> Int -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawPolyLines :: Vector2 -> Int -> Float -> Float -> Color -> IO ()
 drawPolyLines center sides radius rotation color =
   withFreeable center (\c -> withFreeable color $ c'drawPolyLines c (fromIntegral sides) (realToFrac radius) (realToFrac rotation))
 
-drawPolyLinesEx :: Raylib.Types.Vector2 -> Int -> Float -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawPolyLinesEx :: Vector2 -> Int -> Float -> Float -> Float -> Color -> IO ()
 drawPolyLinesEx center sides radius rotation thickness color =
   withFreeable
     center
@@ -311,44 +311,44 @@             (realToFrac thickness)
     )
 
-checkCollisionRecs :: Raylib.Types.Rectangle -> Raylib.Types.Rectangle -> Bool
+checkCollisionRecs :: Rectangle -> Rectangle -> Bool
 checkCollisionRecs rec1 rec2 = unsafePerformIO $ toBool <$> withFreeable rec1 (withFreeable rec2 . c'checkCollisionRecs)
 
-checkCollisionCircles :: Raylib.Types.Vector2 -> Float -> Raylib.Types.Vector2 -> Float -> Bool
+checkCollisionCircles :: Vector2 -> Float -> Vector2 -> Float -> Bool
 checkCollisionCircles center1 radius1 center2 radius2 =
   unsafePerformIO $ toBool <$> withFreeable center1 (\c1 -> withFreeable center2 (\c2 -> c'checkCollisionCircles c1 (realToFrac radius1) c2 (realToFrac radius2)))
 
-checkCollisionCircleRec :: Raylib.Types.Vector2 -> Float -> Raylib.Types.Rectangle -> Bool
+checkCollisionCircleRec :: Vector2 -> Float -> Rectangle -> Bool
 checkCollisionCircleRec center radius rect =
   unsafePerformIO $ toBool <$> withFreeable center (\c -> withFreeable rect $ c'checkCollisionCircleRec c (realToFrac radius))
 
-checkCollisionPointRec :: Raylib.Types.Vector2 -> Raylib.Types.Rectangle -> Bool
+checkCollisionPointRec :: Vector2 -> Rectangle -> Bool
 checkCollisionPointRec point rect =
   unsafePerformIO $ toBool <$> withFreeable point (withFreeable rect . c'checkCollisionPointRec)
 
-checkCollisionPointCircle :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Bool
+checkCollisionPointCircle :: Vector2 -> Vector2 -> Float -> Bool
 checkCollisionPointCircle point center radius =
   unsafePerformIO $ toBool <$> withFreeable point (\p -> withFreeable center (\c -> c'checkCollisionPointCircle p c (realToFrac radius)))
 
-checkCollisionPointTriangle :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Bool
+checkCollisionPointTriangle :: Vector2 -> Vector2 -> Vector2 -> Vector2 -> Bool
 checkCollisionPointTriangle point p1 p2 p3 =
   unsafePerformIO $ toBool <$> withFreeable point (\p -> withFreeable p1 (\ptr1 -> withFreeable p2 (withFreeable p3 . c'checkCollisionPointTriangle p ptr1)))
 
 -- | If a collision is found, returns @Just collisionPoint@, otherwise returns @Nothing@
-checkCollisionLines :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Maybe Raylib.Types.Vector2
+checkCollisionLines :: Vector2 -> Vector2 -> Vector2 -> Vector2 -> Maybe Vector2
 checkCollisionLines start1 end1 start2 end2 =
   unsafePerformIO $
     withFreeable
-      (Raylib.Types.Vector2 0 0)
+      (Vector2 0 0)
       ( \res -> do
           foundCollision <- toBool <$> withFreeable start1 (\s1 -> withFreeable end1 (\e1 -> withFreeable start2 (\s2 -> withFreeable end2 (\e2 -> c'checkCollisionLines s1 e1 s2 e2 res))))
           if foundCollision then Just <$> peek res else return Nothing
       )
 
-checkCollisionPointLine :: Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Int -> Bool
+checkCollisionPointLine :: Vector2 -> Vector2 -> Vector2 -> Int -> Bool
 checkCollisionPointLine point p1 p2 threshold =
   unsafePerformIO $ toBool <$> withFreeable point (\p -> withFreeable p1 (\ptr1 -> withFreeable p2 (\ptr2 -> c'checkCollisionPointLine p ptr1 ptr2 (fromIntegral threshold))))
 
-getCollisionRec :: Raylib.Types.Rectangle -> Raylib.Types.Rectangle -> Raylib.Types.Rectangle
+getCollisionRec :: Rectangle -> Rectangle -> Rectangle
 getCollisionRec rec1 rec2 =
   unsafePerformIO $ withFreeable rec1 (withFreeable rec2 . c'getCollisionRec) >>= pop
src/Raylib/Core/Text.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE ForeignFunctionInterface #-}
-
 {-# OPTIONS -Wall #-}
 
 module Raylib.Core.Text where
@@ -15,7 +13,7 @@     peekCString,
     withCString,
   )
-import Raylib.Internal (addTextureId)
+import Raylib.Internal (addTextureId, unloadSingleTexture)
 import Raylib.Native
   ( c'codepointToUTF8,
     c'drawFPS,
@@ -62,76 +60,83 @@     withFreeable,
   )
 
-getFontDefault :: IO Raylib.Types.Font
+getFontDefault :: IO Font
 getFontDefault = c'getFontDefault >>= pop
 
-loadFont :: String -> IO Raylib.Types.Font
+loadFont :: String -> IO Font
 loadFont fileName = do
   font <- withCString fileName c'loadFont >>= pop
   addTextureId $ texture'id $ font'texture font
   return font
 
-loadFontEx :: String -> Int -> [Int] -> Int -> IO Raylib.Types.Font
+loadFontEx :: String -> Int -> [Int] -> Int -> IO Font
 loadFontEx fileName fontSize fontChars glyphCount = do
   font <- withCString fileName (\f -> withArray (map fromIntegral fontChars) (\c -> c'loadFontEx f (fromIntegral fontSize) c (fromIntegral glyphCount))) >>= pop
   addTextureId $ texture'id $ font'texture font
   return font
 
-loadFontFromImage :: Raylib.Types.Image -> Raylib.Types.Color -> Int -> IO Raylib.Types.Font
+loadFontFromImage :: Image -> Color -> Int -> IO Font
 loadFontFromImage image key firstChar = do
   font <- withFreeable image (\i -> withFreeable key (\k -> c'loadFontFromImage i k (fromIntegral firstChar))) >>= pop
   addTextureId $ texture'id $ font'texture font
   return font
 
-loadFontFromMemory :: String -> [Integer] -> Int -> [Int] -> Int -> IO Raylib.Types.Font
+loadFontFromMemory :: String -> [Integer] -> Int -> [Int] -> Int -> IO Font
 loadFontFromMemory fileType fileData fontSize fontChars glyphCount = do
   font <- withCString fileType (\t -> withArrayLen (map fromIntegral fileData) (\size d -> withArray (map fromIntegral fontChars) (\c -> c'loadFontFromMemory t d (fromIntegral $ size * sizeOf (0 :: CUChar)) (fromIntegral fontSize) c (fromIntegral glyphCount)))) >>= pop
   addTextureId $ texture'id $ font'texture font
   return font
 
-loadFontData :: [Integer] -> Int -> [Int] -> Int -> FontType -> IO Raylib.Types.GlyphInfo
+loadFontData :: [Integer] -> Int -> [Int] -> Int -> FontType -> IO GlyphInfo
 loadFontData fileData fontSize fontChars glyphCount fontType = withArrayLen (map fromIntegral fileData) (\size d -> withArray (map fromIntegral fontChars) (\c -> c'loadFontData d (fromIntegral $ size * sizeOf (0 :: CUChar)) (fromIntegral fontSize) c (fromIntegral glyphCount) (fromIntegral $ fromEnum fontType))) >>= pop
 
-genImageFontAtlas :: [Raylib.Types.GlyphInfo] -> [[Raylib.Types.Rectangle]] -> Int -> Int -> Int -> Int -> IO Raylib.Types.Image
+genImageFontAtlas :: [GlyphInfo] -> [[Rectangle]] -> Int -> Int -> Int -> Int -> IO Image
 genImageFontAtlas chars recs glyphCount fontSize padding packMethod = withArray chars (\c -> withArray2D recs (\r -> c'genImageFontAtlas c r (fromIntegral glyphCount) (fromIntegral fontSize) (fromIntegral padding) (fromIntegral packMethod))) >>= pop
 
-isFontReady :: Raylib.Types.Font -> IO Bool
+-- | Unloads a font from GPU memory (VRAM). Fonts are automatically unloaded
+-- when `closeWindow` is called, so manually unloading fonts is not required.
+-- In larger projects, you may want to manually unload fonts to avoid having
+-- them in VRAM for too long.
+unloadFont :: Font -> IO ()
+unloadFont font = unloadSingleTexture (texture'id $ font'texture font)
+
+isFontReady :: Font -> IO Bool
 isFontReady font = toBool <$> withFreeable font c'isFontReady
 
-exportFontAsCode :: Raylib.Types.Font -> String -> IO Bool
+exportFontAsCode :: Font -> String -> IO Bool
 exportFontAsCode font fileName = toBool <$> withFreeable font (withCString fileName . c'exportFontAsCode)
 
 drawFPS :: Int -> Int -> IO ()
 drawFPS x y = c'drawFPS (fromIntegral x) (fromIntegral y)
 
-drawText :: String -> Int -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawText :: String -> Int -> Int -> Int -> Color -> IO ()
 drawText text x y fontSize color = withCString text (\t -> withFreeable color (c'drawText t (fromIntegral x) (fromIntegral y) (fromIntegral fontSize)))
 
-drawTextEx :: Raylib.Types.Font -> String -> Raylib.Types.Vector2 -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawTextEx :: Font -> String -> Vector2 -> Float -> Float -> Color -> IO ()
 drawTextEx font text position fontSize spacing tint = withFreeable font (\f -> withCString text (\t -> withFreeable position (\p -> withFreeable tint (c'drawTextEx f t p (realToFrac fontSize) (realToFrac spacing)))))
 
-drawTextPro :: Raylib.Types.Font -> String -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Float -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawTextPro :: Font -> String -> Vector2 -> Vector2 -> Float -> Float -> Float -> Color -> IO ()
 drawTextPro font text position origin rotation fontSize spacing tint = withFreeable font (\f -> withCString text (\t -> withFreeable position (\p -> withFreeable origin (\o -> withFreeable tint (c'drawTextPro f t p o (realToFrac rotation) (realToFrac fontSize) (realToFrac spacing))))))
 
-drawTextCodepoint :: Raylib.Types.Font -> Int -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawTextCodepoint :: Font -> Int -> Vector2 -> Float -> Color -> IO ()
 drawTextCodepoint font codepoint position fontSize tint = withFreeable font (\f -> withFreeable position (\p -> withFreeable tint (c'drawTextCodepoint f (fromIntegral codepoint) p (realToFrac fontSize))))
 
-drawTextCodepoints :: Raylib.Types.Font -> [Int] -> Raylib.Types.Vector2 -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawTextCodepoints :: Font -> [Int] -> Vector2 -> Float -> Float -> Color -> IO ()
 drawTextCodepoints font codepoints position fontSize spacing tint = withFreeable font (\f -> withArrayLen (map fromIntegral codepoints) (\count cp -> withFreeable position (\p -> withFreeable tint (c'drawTextCodepoints f cp (fromIntegral count) p (realToFrac fontSize) (realToFrac spacing)))))
 
 measureText :: String -> Int -> IO Int
 measureText text fontSize = fromIntegral <$> withCString text (\t -> c'measureText t (fromIntegral fontSize))
 
-measureTextEx :: Raylib.Types.Font -> String -> Float -> Float -> IO Raylib.Types.Vector2
+measureTextEx :: Font -> String -> Float -> Float -> IO Vector2
 measureTextEx font text fontSize spacing = withFreeable font (\f -> withCString text (\t -> c'measureTextEx f t (realToFrac fontSize) (realToFrac spacing))) >>= pop
 
-getGlyphIndex :: Raylib.Types.Font -> Int -> IO Int
+getGlyphIndex :: Font -> Int -> IO Int
 getGlyphIndex font codepoint = fromIntegral <$> withFreeable font (\f -> c'getGlyphIndex f (fromIntegral codepoint))
 
-getGlyphInfo :: Raylib.Types.Font -> Int -> IO Raylib.Types.GlyphInfo
+getGlyphInfo :: Font -> Int -> IO GlyphInfo
 getGlyphInfo font codepoint = withFreeable font (\f -> c'getGlyphInfo f (fromIntegral codepoint)) >>= pop
 
-getGlyphAtlasRec :: Raylib.Types.Font -> Int -> IO Raylib.Types.Rectangle
+getGlyphAtlasRec :: Font -> Int -> IO Rectangle
 getGlyphAtlasRec font codepoint = withFreeable font (\f -> c'getGlyphAtlasRec f (fromIntegral codepoint)) >>= pop
 
 loadUTF8 :: [Integer] -> IO String
@@ -160,7 +165,6 @@ getCodepointCount :: String -> IO Int
 getCodepointCount text = fromIntegral <$> withCString text c'getCodepointCount
 
--- | Deprecated, use `getCodepointNext`
 getCodepointNext :: String -> IO (Int, Int)
 getCodepointNext text =
   withCString
src/Raylib/Core/Textures.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE ForeignFunctionInterface #-}
-
 {-# OPTIONS -Wall #-}
 
 module Raylib.Core.Textures where
@@ -13,7 +11,12 @@   )
 import Foreign.C (CUChar, withCString)
 import GHC.IO (unsafePerformIO)
-import Raylib.Internal (addFrameBuffer, addTextureId)
+import Raylib.ForeignUtil
+  ( pop,
+    popCArray,
+    withFreeable,
+  )
+import Raylib.Internal (addFrameBuffer, addTextureId, unloadSingleFrameBuffer, unloadSingleTexture)
 import Raylib.Native
   ( c'colorAlpha,
     c'colorAlphaBlend,
@@ -128,21 +131,16 @@     Vector3,
     Vector4,
   )
-import Raylib.ForeignUtil
-  ( pop,
-    popCArray,
-    withFreeable,
-  )
 
-loadImage :: String -> IO Raylib.Types.Image
+loadImage :: String -> IO Image
 loadImage fileName = withCString fileName c'loadImage >>= pop
 
-loadImageRaw :: String -> Int -> Int -> Int -> Int -> IO Raylib.Types.Image
+loadImageRaw :: String -> Int -> Int -> Int -> Int -> IO Image
 loadImageRaw fileName width height format headerSize =
   withCString fileName (\str -> c'loadImageRaw str (fromIntegral width) (fromIntegral height) (fromIntegral $ fromEnum format) (fromIntegral headerSize)) >>= pop
 
--- | Returns the animation and the frames in a tuple
-loadImageAnim :: String -> IO (Raylib.Types.Image, Int)
+-- | Returns the animation and the number of frames in a tuple
+loadImageAnim :: String -> IO (Image, Int)
 loadImageAnim fileName =
   withFreeable
     0
@@ -156,152 +154,152 @@           )
     )
 
-loadImageFromMemory :: String -> [Integer] -> IO Raylib.Types.Image
+loadImageFromMemory :: String -> [Integer] -> IO Image
 loadImageFromMemory fileType fileData =
   withCString fileType (\ft -> withArrayLen (map fromIntegral fileData) (\size fd -> c'loadImageFromMemory ft fd (fromIntegral $ size * sizeOf (0 :: CUChar)))) >>= pop
 
-loadImageFromTexture :: Raylib.Types.Texture -> IO Raylib.Types.Image
+loadImageFromTexture :: Texture -> IO Image
 loadImageFromTexture tex = withFreeable tex c'loadImageFromTexture >>= pop
 
-loadImageFromScreen :: IO Raylib.Types.Image
+loadImageFromScreen :: IO Image
 loadImageFromScreen = c'loadImageFromScreen >>= pop
 
 isImageReady :: Image -> IO Bool
 isImageReady image = toBool <$> withFreeable image c'isImageReady
 
-exportImage :: Raylib.Types.Image -> String -> IO Bool
+exportImage :: Image -> String -> IO Bool
 exportImage image fileName = toBool <$> withFreeable image (withCString fileName . c'exportImage)
 
-exportImageAsCode :: Raylib.Types.Image -> String -> IO Bool
+exportImageAsCode :: Image -> String -> IO Bool
 exportImageAsCode image fileName =
   toBool <$> withFreeable image (withCString fileName . c'exportImageAsCode)
 
-genImageColor :: Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+genImageColor :: Int -> Int -> Color -> IO Image
 genImageColor width height color =
   withFreeable color (c'genImageColor (fromIntegral width) (fromIntegral height)) >>= pop
 
-genImageGradientV :: Int -> Int -> Raylib.Types.Color -> Raylib.Types.Color -> IO Raylib.Types.Image
+genImageGradientV :: Int -> Int -> Color -> Color -> IO Image
 genImageGradientV width height top bottom =
   withFreeable top (withFreeable bottom . c'genImageGradientV (fromIntegral width) (fromIntegral height)) >>= pop
 
-genImageGradientH :: Int -> Int -> Raylib.Types.Color -> Raylib.Types.Color -> IO Raylib.Types.Image
+genImageGradientH :: Int -> Int -> Color -> Color -> IO Image
 genImageGradientH width height left right =
   withFreeable left (withFreeable right . c'genImageGradientH (fromIntegral width) (fromIntegral height)) >>= pop
 
-genImageGradientRadial :: Int -> Int -> Float -> Raylib.Types.Color -> Raylib.Types.Color -> IO Raylib.Types.Image
+genImageGradientRadial :: Int -> Int -> Float -> Color -> Color -> IO Image
 genImageGradientRadial width height density inner outer =
   withFreeable inner (withFreeable outer . c'genImageGradientRadial (fromIntegral width) (fromIntegral height) (realToFrac density)) >>= pop
 
-genImageChecked :: Int -> Int -> Int -> Int -> Raylib.Types.Color -> Raylib.Types.Color -> IO Raylib.Types.Image
+genImageChecked :: Int -> Int -> Int -> Int -> Color -> Color -> IO Image
 genImageChecked width height checksX checksY col1 col2 =
   withFreeable col1 (withFreeable col2 . c'genImageChecked (fromIntegral width) (fromIntegral height) (fromIntegral checksX) (fromIntegral checksY)) >>= pop
 
-genImageWhiteNoise :: Int -> Int -> Float -> IO Raylib.Types.Image
+genImageWhiteNoise :: Int -> Int -> Float -> IO Image
 genImageWhiteNoise width height factor =
   c'genImageWhiteNoise (fromIntegral width) (fromIntegral height) (realToFrac factor) >>= pop
 
-genImagePerlinNoise :: Int -> Int -> Int -> Int -> Float -> IO Raylib.Types.Image
+genImagePerlinNoise :: Int -> Int -> Int -> Int -> Float -> IO Image
 genImagePerlinNoise width height offsetX offsetY scale = c'genImagePerlinNoise (fromIntegral width) (fromIntegral height) (fromIntegral offsetX) (fromIntegral offsetY) (realToFrac scale) >>= pop
 
-genImageCellular :: Int -> Int -> Int -> IO Raylib.Types.Image
+genImageCellular :: Int -> Int -> Int -> IO Image
 genImageCellular width height tileSize =
   c'genImageCellular (fromIntegral width) (fromIntegral height) (fromIntegral tileSize) >>= pop
 
-genImageText :: Int -> Int -> String -> IO Raylib.Types.Image
+genImageText :: Int -> Int -> String -> IO Image
 genImageText width height text =
   withCString text (c'genImageText (fromIntegral width) (fromIntegral height)) >>= pop
 
-imageCopy :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageCopy :: Image -> IO Image
 imageCopy image = withFreeable image c'imageCopy >>= pop
 
-imageFromImage :: Raylib.Types.Image -> Raylib.Types.Rectangle -> IO Raylib.Types.Image
+imageFromImage :: Image -> Rectangle -> IO Image
 imageFromImage image rect = withFreeable image (withFreeable rect . c'imageFromImage) >>= pop
 
-imageText :: String -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageText :: String -> Int -> Color -> IO Image
 imageText text fontSize color =
   withCString text (\t -> withFreeable color $ c'imageText t (fromIntegral fontSize)) >>= pop
 
-imageTextEx :: Raylib.Types.Font -> String -> Float -> Float -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageTextEx :: Font -> String -> Float -> Float -> Color -> IO Image
 imageTextEx font text fontSize spacing tint =
   withFreeable font (\f -> withCString text (\t -> withFreeable tint $ c'imageTextEx f t (realToFrac fontSize) (realToFrac spacing))) >>= pop
 
-imageFormat :: Raylib.Types.Image -> PixelFormat -> IO Raylib.Types.Image
+imageFormat :: Image -> PixelFormat -> IO Image
 imageFormat image newFormat =
   withFreeable image (\i -> c'imageFormat i (fromIntegral $ fromEnum newFormat) >> peek i)
 
-imageToPOT :: Raylib.Types.Image -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageToPOT :: Image -> Color -> IO Image
 imageToPOT image color = withFreeable image (\i -> withFreeable color (c'imageToPOT i) >> peek i)
 
-imageCrop :: Raylib.Types.Image -> Raylib.Types.Rectangle -> IO Raylib.Types.Image
+imageCrop :: Image -> Rectangle -> IO Image
 imageCrop image crop = withFreeable image (\i -> withFreeable crop (c'imageCrop i) >> peek i)
 
-imageAlphaCrop :: Raylib.Types.Image -> Float -> IO Raylib.Types.Image
+imageAlphaCrop :: Image -> Float -> IO Image
 imageAlphaCrop image threshold = withFreeable image (\i -> c'imageAlphaCrop i (realToFrac threshold) >> peek i)
 
-imageAlphaClear :: Raylib.Types.Image -> Raylib.Types.Color -> Float -> IO Raylib.Types.Image
+imageAlphaClear :: Image -> Color -> Float -> IO Image
 imageAlphaClear image color threshold = withFreeable image (\i -> withFreeable color (\c -> c'imageAlphaClear i c (realToFrac threshold) >> peek i))
 
-imageAlphaMask :: Raylib.Types.Image -> Raylib.Types.Image -> IO Raylib.Types.Image
+imageAlphaMask :: Image -> Image -> IO Image
 imageAlphaMask image alphaMask = withFreeable image (\i -> withFreeable alphaMask (c'imageAlphaMask i) >> peek i)
 
-imageAlphaPremultiply :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageAlphaPremultiply :: Image -> IO Image
 imageAlphaPremultiply image = withFreeable image (\i -> c'imageAlphaPremultiply i >> peek i)
 
-imageBlurGaussian :: Raylib.Types.Image -> Int -> IO Raylib.Types.Image
+imageBlurGaussian :: Image -> Int -> IO Image
 imageBlurGaussian image blurSize = withFreeable image (\i -> c'imageBlurGaussian i (fromIntegral blurSize) >> peek i)
 
-imageResize :: Raylib.Types.Image -> Int -> Int -> IO Raylib.Types.Image
+imageResize :: Image -> Int -> Int -> IO Image
 imageResize image newWidth newHeight = withFreeable image (\i -> c'imageResize i (fromIntegral newWidth) (fromIntegral newHeight) >> peek i)
 
-imageResizeNN :: Raylib.Types.Image -> Int -> Int -> IO Raylib.Types.Image
+imageResizeNN :: Image -> Int -> Int -> IO Image
 imageResizeNN image newWidth newHeight = withFreeable image (\i -> c'imageResizeNN i (fromIntegral newWidth) (fromIntegral newHeight) >> peek i)
 
-imageResizeCanvas :: Raylib.Types.Image -> Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageResizeCanvas :: Image -> Int -> Int -> Int -> Int -> Color -> IO Image
 imageResizeCanvas image newWidth newHeight offsetX offsetY fill = withFreeable image (\i -> withFreeable fill (c'imageResizeCanvas i (fromIntegral newWidth) (fromIntegral newHeight) (fromIntegral offsetX) (fromIntegral offsetY)) >> peek i)
 
-imageMipmaps :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageMipmaps :: Image -> IO Image
 imageMipmaps image = withFreeable image (\i -> c'imageMipmaps i >> peek i)
 
-imageDither :: Raylib.Types.Image -> Int -> Int -> Int -> Int -> IO Raylib.Types.Image
+imageDither :: Image -> Int -> Int -> Int -> Int -> IO Image
 imageDither image rBpp gBpp bBpp aBpp = withFreeable image (\i -> c'imageDither i (fromIntegral rBpp) (fromIntegral gBpp) (fromIntegral bBpp) (fromIntegral aBpp) >> peek i)
 
-imageFlipVertical :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageFlipVertical :: Image -> IO Image
 imageFlipVertical image = withFreeable image (\i -> c'imageFlipVertical i >> peek i)
 
-imageFlipHorizontal :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageFlipHorizontal :: Image -> IO Image
 imageFlipHorizontal image = withFreeable image (\i -> c'imageFlipHorizontal i >> peek i)
 
-imageRotateCW :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageRotateCW :: Image -> IO Image
 imageRotateCW image = withFreeable image (\i -> c'imageRotateCW i >> peek i)
 
-imageRotateCCW :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageRotateCCW :: Image -> IO Image
 imageRotateCCW image = withFreeable image (\i -> c'imageRotateCCW i >> peek i)
 
-imageColorTint :: Raylib.Types.Image -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageColorTint :: Image -> Color -> IO Image
 imageColorTint image color = withFreeable image (\i -> withFreeable color (c'imageColorTint i) >> peek i)
 
-imageColorInvert :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageColorInvert :: Image -> IO Image
 imageColorInvert image = withFreeable image (\i -> c'imageColorInvert i >> peek i)
 
-imageColorGrayscale :: Raylib.Types.Image -> IO Raylib.Types.Image
+imageColorGrayscale :: Image -> IO Image
 imageColorGrayscale image = withFreeable image (\i -> c'imageColorGrayscale i >> peek i)
 
-imageColorContrast :: Raylib.Types.Image -> Float -> IO Raylib.Types.Image
+imageColorContrast :: Image -> Float -> IO Image
 imageColorContrast image contrast = withFreeable image (\i -> c'imageColorContrast i (realToFrac contrast) >> peek i)
 
-imageColorBrightness :: Raylib.Types.Image -> Int -> IO Raylib.Types.Image
+imageColorBrightness :: Image -> Int -> IO Image
 imageColorBrightness image brightness = withFreeable image (\i -> c'imageColorBrightness i (fromIntegral brightness) >> peek i)
 
-imageColorReplace :: Raylib.Types.Image -> Raylib.Types.Color -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageColorReplace :: Image -> Color -> Color -> IO Image
 imageColorReplace image color replace = withFreeable image (\i -> withFreeable color (withFreeable replace . c'imageColorReplace i) >> peek i)
 
-loadImageColors :: Raylib.Types.Image -> IO [Raylib.Types.Color]
+loadImageColors :: Image -> IO [Color]
 loadImageColors image =
   withFreeable
     image
-    (popCArray (fromIntegral $ Raylib.Types.image'width image * Raylib.Types.image'height image) <=< c'loadImageColors)
+    (popCArray (fromIntegral $ image'width image * image'height image) <=< c'loadImageColors)
 
-loadImagePalette :: Raylib.Types.Image -> Int -> IO [Raylib.Types.Color]
+loadImagePalette :: Image -> Int -> IO [Color]
 loadImagePalette image maxPaletteSize =
   withFreeable
     image
@@ -317,79 +315,79 @@         popCArray (fromIntegral num) palette
     )
 
-getImageAlphaBorder :: Raylib.Types.Image -> Float -> IO Raylib.Types.Rectangle
+getImageAlphaBorder :: Image -> Float -> IO Rectangle
 getImageAlphaBorder image threshold = withFreeable image (\i -> c'getImageAlphaBorder i (realToFrac threshold)) >>= pop
 
-getImageColor :: Raylib.Types.Image -> Int -> Int -> IO Raylib.Types.Color
+getImageColor :: Image -> Int -> Int -> IO Color
 getImageColor image x y = withFreeable image (\i -> c'getImageColor i (fromIntegral x) (fromIntegral y)) >>= pop
 
-imageClearBackground :: Raylib.Types.Image -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageClearBackground :: Image -> Color -> IO Image
 imageClearBackground image color = withFreeable image (\i -> withFreeable color (c'imageClearBackground i) >> peek i)
 
-imageDrawPixel :: Raylib.Types.Image -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawPixel :: Image -> Int -> Int -> Color -> IO Image
 imageDrawPixel image x y color = withFreeable image (\i -> withFreeable color (c'imageDrawPixel i (fromIntegral x) (fromIntegral y)) >> peek i)
 
-imageDrawPixelV :: Raylib.Types.Image -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawPixelV :: Image -> Vector2 -> Color -> IO Image
 imageDrawPixelV image position color = withFreeable image (\i -> withFreeable position (withFreeable color . c'imageDrawPixelV i) >> peek i)
 
-imageDrawLine :: Raylib.Types.Image -> Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawLine :: Image -> Int -> Int -> Int -> Int -> Color -> IO Image
 imageDrawLine image startPosX startPosY endPosX endPosY color = withFreeable image (\i -> withFreeable color (c'imageDrawLine i (fromIntegral startPosX) (fromIntegral startPosY) (fromIntegral endPosX) (fromIntegral endPosY)) >> peek i)
 
-imageDrawLineV :: Raylib.Types.Image -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawLineV :: Image -> Vector2 -> Vector2 -> Color -> IO Image
 imageDrawLineV image start end color = withFreeable image (\i -> withFreeable start (\s -> withFreeable end (withFreeable color . c'imageDrawLineV i s)) >> peek i)
 
-imageDrawCircle :: Raylib.Types.Image -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawCircle :: Image -> Int -> Int -> Int -> Color -> IO Image
 imageDrawCircle image centerX centerY radius color = withFreeable image (\i -> withFreeable color (c'imageDrawCircle i (fromIntegral centerX) (fromIntegral centerY) (fromIntegral radius)) >> peek i)
 
-imageDrawCircleV :: Raylib.Types.Image -> Raylib.Types.Vector2 -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawCircleV :: Image -> Vector2 -> Int -> Color -> IO Image
 imageDrawCircleV image center radius color = withFreeable image (\i -> withFreeable center (\c -> withFreeable color (c'imageDrawCircleV i c (fromIntegral radius))) >> peek i)
 
-imageDrawCircleLines :: Raylib.Types.Image -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawCircleLines :: Image -> Int -> Int -> Int -> Color -> IO Image
 imageDrawCircleLines image centerX centerY radius color = withFreeable image (\i -> withFreeable color (c'imageDrawCircleLines i (fromIntegral centerX) (fromIntegral centerY) (fromIntegral radius)) >> peek i)
 
-imageDrawCircleLinesV :: Raylib.Types.Image -> Raylib.Types.Vector2 -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawCircleLinesV :: Image -> Vector2 -> Int -> Color -> IO Image
 imageDrawCircleLinesV image center radius color = withFreeable image (\i -> withFreeable center (\c -> withFreeable color (c'imageDrawCircleLinesV i c (fromIntegral radius))) >> peek i)
 
-imageDrawRectangle :: Raylib.Types.Image -> Int -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawRectangle :: Image -> Int -> Int -> Int -> Int -> Color -> IO Image
 imageDrawRectangle image posX posY width height color = withFreeable image (\i -> withFreeable color (c'imageDrawRectangle i (fromIntegral posX) (fromIntegral posY) (fromIntegral width) (fromIntegral height)) >> peek i)
 
-imageDrawRectangleV :: Raylib.Types.Image -> Raylib.Types.Vector2 -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawRectangleV :: Image -> Vector2 -> Vector2 -> Color -> IO Image
 imageDrawRectangleV image position size color = withFreeable image (\i -> withFreeable position (\p -> withFreeable size (withFreeable color . c'imageDrawRectangleV i p)) >> peek i)
 
-imageDrawRectangleRec :: Raylib.Types.Image -> Raylib.Types.Rectangle -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawRectangleRec :: Image -> Rectangle -> Color -> IO Image
 imageDrawRectangleRec image rectangle color = withFreeable image (\i -> withFreeable rectangle (withFreeable color . c'imageDrawRectangleRec i) >> peek i)
 
-imageDrawRectangleLines :: Raylib.Types.Image -> Raylib.Types.Rectangle -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawRectangleLines :: Image -> Rectangle -> Int -> Color -> IO Image
 imageDrawRectangleLines image rectangle thickness color = withFreeable image (\i -> withFreeable rectangle (\r -> withFreeable color (c'imageDrawRectangleLines i r (fromIntegral thickness))) >> peek i)
 
-imageDraw :: Raylib.Types.Image -> Raylib.Types.Image -> Raylib.Types.Rectangle -> Raylib.Types.Rectangle -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDraw :: Image -> Image -> Rectangle -> Rectangle -> Color -> IO Image
 imageDraw image source srcRec dstRec tint = withFreeable image (\i -> withFreeable source (\s -> withFreeable srcRec (\sr -> withFreeable dstRec (withFreeable tint . c'imageDraw i s sr))) >> peek i)
 
-imageDrawText :: Raylib.Types.Image -> String -> Int -> Int -> Int -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawText :: Image -> String -> Int -> Int -> Int -> Color -> IO Image
 imageDrawText image text x y fontSize color = withFreeable image (\i -> withCString text (\t -> withFreeable color (c'imageDrawText i t (fromIntegral x) (fromIntegral y) (fromIntegral fontSize))) >> peek i)
 
-imageDrawTextEx :: Raylib.Types.Image -> Raylib.Types.Font -> String -> Raylib.Types.Vector2 -> Float -> Float -> Raylib.Types.Color -> IO Raylib.Types.Image
+imageDrawTextEx :: Image -> Font -> String -> Vector2 -> Float -> Float -> Color -> IO Image
 imageDrawTextEx image font text position fontSize spacing tint = withFreeable image (\i -> withFreeable font (\f -> withCString text (\t -> withFreeable position (\p -> withFreeable tint (c'imageDrawTextEx i f t p (realToFrac fontSize) (realToFrac spacing))))) >> peek i)
 
-loadTexture :: String -> IO Raylib.Types.Texture
+loadTexture :: String -> IO Texture
 loadTexture fileName = do
   texture <- withCString fileName c'loadTexture >>= pop
   addTextureId $ texture'id texture
   return texture
 
-loadTextureFromImage :: Raylib.Types.Image -> IO Raylib.Types.Texture
+loadTextureFromImage :: Image -> IO Texture
 loadTextureFromImage image = do
   texture <- withFreeable image c'loadTextureFromImage >>= pop
   addTextureId $ texture'id texture
   return texture
 
-loadTextureCubemap :: Raylib.Types.Image -> CubemapLayout -> IO Raylib.Types.Texture
+loadTextureCubemap :: Image -> CubemapLayout -> IO Texture
 loadTextureCubemap image layout = do
   texture <- withFreeable image (\i -> c'loadTextureCubemap i (fromIntegral $ fromEnum layout)) >>= pop
   addTextureId $ texture'id texture
   return texture
 
-loadRenderTexture :: Int -> Int -> IO Raylib.Types.RenderTexture
+loadRenderTexture :: Int -> Int -> IO RenderTexture
 loadRenderTexture width height = do
   renderTexture <- c'loadRenderTexture (fromIntegral width) (fromIntegral height) >>= pop
   addFrameBuffer $ renderTexture'id renderTexture
@@ -402,77 +400,93 @@ isRenderTextureReady :: RenderTexture -> IO Bool
 isRenderTextureReady renderTexture = toBool <$> withFreeable renderTexture c'isRenderTextureReady
 
-updateTexture :: Raylib.Types.Texture -> Ptr () -> IO Raylib.Types.Texture
+-- | Unloads a texture from GPU memory (VRAM). Textures are automatically unloaded
+-- when `closeWindow` is called, so manually unloading textures is not required.
+-- In larger projects, you may want to manually unload textures to avoid having
+-- them in VRAM for too long.
+unloadTexture :: Texture -> IO ()
+unloadTexture texture = unloadSingleTexture (texture'id texture)
+
+-- | Unloads a render texture from GPU memory (VRAM). Render textures are
+-- automatically unloaded when `closeWindow` is called, so manually unloading
+-- render textures is not required. In larger projects, you may want to
+-- manually unload render textures to avoid having them in VRAM for too long.
+unloadRenderTexture :: RenderTexture -> IO ()
+unloadRenderTexture renderTexture = do
+  unloadSingleTexture (texture'id $ renderTexture'texture renderTexture)
+  unloadSingleFrameBuffer (renderTexture'id renderTexture)
+
+updateTexture :: Texture -> Ptr () -> IO Texture
 updateTexture texture pixels = withFreeable texture (\t -> c'updateTexture t pixels >> peek t)
 
-updateTextureRec :: Raylib.Types.Texture -> Raylib.Types.Rectangle -> Ptr () -> IO Raylib.Types.Texture
+updateTextureRec :: Texture -> Rectangle -> Ptr () -> IO Texture
 updateTextureRec texture rect pixels = withFreeable texture (\t -> withFreeable rect (\r -> c'updateTextureRec t r pixels) >> peek t)
 
-genTextureMipmaps :: Raylib.Types.Texture -> IO Raylib.Types.Texture
+genTextureMipmaps :: Texture -> IO Texture
 genTextureMipmaps texture = withFreeable texture (\t -> c'genTextureMipmaps t >> peek t)
 
-setTextureFilter :: Raylib.Types.Texture -> TextureFilter -> IO Raylib.Types.Texture
+setTextureFilter :: Texture -> TextureFilter -> IO Texture
 setTextureFilter texture filterType = withFreeable texture (\t -> c'setTextureFilter t (fromIntegral $ fromEnum filterType) >> peek t)
 
-setTextureWrap :: Raylib.Types.Texture -> TextureWrap -> IO Raylib.Types.Texture
+setTextureWrap :: Texture -> TextureWrap -> IO Texture
 setTextureWrap texture wrap = withFreeable texture (\t -> c'setTextureWrap t (fromIntegral $ fromEnum wrap) >> peek t)
 
-drawTexture :: Raylib.Types.Texture -> Int -> Int -> Raylib.Types.Color -> IO ()
+drawTexture :: Texture -> Int -> Int -> Color -> IO ()
 drawTexture texture x y tint = withFreeable texture (\t -> withFreeable tint (c'drawTexture t (fromIntegral x) (fromIntegral y)))
 
-drawTextureV :: Raylib.Types.Texture -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawTextureV :: Texture -> Vector2 -> Color -> IO ()
 drawTextureV texture position color = withFreeable texture (\t -> withFreeable position (withFreeable color . c'drawTextureV t))
 
-drawTextureEx :: Raylib.Types.Texture -> Raylib.Types.Vector2 -> Float -> Float -> Raylib.Types.Color -> IO ()
+drawTextureEx :: Texture -> Vector2 -> Float -> Float -> Color -> IO ()
 drawTextureEx texture position rotation scale tint = withFreeable texture (\t -> withFreeable position (\p -> withFreeable tint (c'drawTextureEx t p (realToFrac rotation) (realToFrac scale))))
 
-drawTextureRec :: Raylib.Types.Texture -> Raylib.Types.Rectangle -> Raylib.Types.Vector2 -> Raylib.Types.Color -> IO ()
+drawTextureRec :: Texture -> Rectangle -> Vector2 -> Color -> IO ()
 drawTextureRec texture source position tint = withFreeable texture (\t -> withFreeable source (\s -> withFreeable position (withFreeable tint . c'drawTextureRec t s)))
 
-drawTexturePro :: Raylib.Types.Texture -> Raylib.Types.Rectangle -> Raylib.Types.Rectangle -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawTexturePro :: Texture -> Rectangle -> Rectangle -> Vector2 -> Float -> Color -> IO ()
 drawTexturePro texture source dest origin rotation tint = withFreeable texture (\t -> withFreeable source (\s -> withFreeable dest (\d -> withFreeable origin (\o -> withFreeable tint (c'drawTexturePro t s d o (realToFrac rotation))))))
 
-drawTextureNPatch :: Raylib.Types.Texture -> Raylib.Types.NPatchInfo -> Raylib.Types.Rectangle -> Raylib.Types.Vector2 -> Float -> Raylib.Types.Color -> IO ()
+drawTextureNPatch :: Texture -> NPatchInfo -> Rectangle -> Vector2 -> Float -> Color -> IO ()
 drawTextureNPatch texture nPatchInfo dest origin rotation tint = withFreeable texture (\t -> withFreeable nPatchInfo (\n -> withFreeable dest (\d -> withFreeable origin (\o -> withFreeable tint (c'drawTextureNPatch t n d o (realToFrac rotation))))))
 
-fade :: Raylib.Types.Color -> Float -> Raylib.Types.Color
+fade :: Color -> Float -> Color
 fade color alpha = unsafePerformIO $ withFreeable color (\c -> c'fade c (realToFrac alpha)) >>= pop
 
-colorToInt :: Raylib.Types.Color -> Int
+colorToInt :: Color -> Int
 colorToInt color = unsafePerformIO $ fromIntegral <$> withFreeable color c'colorToInt
 
-colorNormalize :: Raylib.Types.Color -> Raylib.Types.Vector4
+colorNormalize :: Color -> Vector4
 colorNormalize color = unsafePerformIO $ withFreeable color c'colorNormalize >>= pop
 
-colorFromNormalized :: Raylib.Types.Vector4 -> Raylib.Types.Color
+colorFromNormalized :: Vector4 -> Color
 colorFromNormalized normalized = unsafePerformIO $ withFreeable normalized c'colorFromNormalized >>= pop
 
-colorToHSV :: Raylib.Types.Color -> Raylib.Types.Vector3
+colorToHSV :: Color -> Vector3
 colorToHSV color = unsafePerformIO $ withFreeable color c'colorToHSV >>= pop
 
-colorFromHSV :: Float -> Float -> Float -> Raylib.Types.Color
+colorFromHSV :: Float -> Float -> Float -> Color
 colorFromHSV hue saturation value = unsafePerformIO $ c'colorFromHSV (realToFrac hue) (realToFrac saturation) (realToFrac value) >>= pop
 
-colorTint :: Color -> Color -> Raylib.Types.Color
+colorTint :: Color -> Color -> Color
 colorTint color tint = unsafePerformIO $ withFreeable color (withFreeable tint . c'colorTint) >>= pop
 
-colorBrightness :: Color -> Float -> Raylib.Types.Color
+colorBrightness :: Color -> Float -> Color
 colorBrightness color brightness = unsafePerformIO $ withFreeable color (\c -> c'colorBrightness c (realToFrac brightness)) >>= pop
 
-colorContrast :: Color -> Float -> Raylib.Types.Color
+colorContrast :: Color -> Float -> Color
 colorContrast color contrast = unsafePerformIO $ withFreeable color (\c -> c'colorContrast c (realToFrac contrast)) >>= pop
 
-colorAlpha :: Raylib.Types.Color -> Float -> Raylib.Types.Color
+colorAlpha :: Color -> Float -> Color
 colorAlpha color alpha = unsafePerformIO $ withFreeable color (\c -> c'colorAlpha c (realToFrac alpha)) >>= pop
 
-colorAlphaBlend :: Raylib.Types.Color -> Raylib.Types.Color -> Raylib.Types.Color -> Raylib.Types.Color
+colorAlphaBlend :: Color -> Color -> Color -> Color
 colorAlphaBlend dst src tint = unsafePerformIO $ withFreeable dst (\d -> withFreeable src (withFreeable tint . c'colorAlphaBlend d)) >>= pop
 
-getColor :: Integer -> Raylib.Types.Color
+getColor :: Integer -> Color
 getColor hexValue = unsafePerformIO $ c'getColor (fromIntegral hexValue) >>= pop
 
-getPixelColor :: Ptr () -> PixelFormat -> IO Raylib.Types.Color
+getPixelColor :: Ptr () -> PixelFormat -> IO Color
 getPixelColor srcPtr format = c'getPixelColor srcPtr (fromIntegral $ fromEnum format) >>= pop
 
-setPixelColor :: Ptr () -> Raylib.Types.Color -> PixelFormat -> IO ()
+setPixelColor :: Ptr () -> Color -> PixelFormat -> IO ()
 setPixelColor dstPtr color format = withFreeable color (\c -> c'setPixelColor dstPtr c (fromIntegral $ fromEnum format))
src/Raylib/Internal.hs view
@@ -1,10 +1,11 @@ {-# OPTIONS -Wall #-}
 {-# LANGUAGE ForeignFunctionInterface #-}
 
-module Raylib.Internal (shaderLocations, unloadShaders, unloadTextures, unloadFrameBuffers, unloadVaoIds, unloadVboIds, unloadCtxData, unloadAudioBuffers, addShaderId, addTextureId, addFrameBuffer, addVaoId, addVboIds, addCtxData, addAudioBuffer, c'rlGetShaderIdDefault, getPixelDataSize) where
+module Raylib.Internal (shaderLocations, unloadSingleShader, unloadSingleTexture, unloadSingleFrameBuffer, unloadSingleVaoId, unloadSingleVboIdList, unloadSingleCtxDataPtr, unloadSingleAudioBuffer, unloadShaders, unloadTextures, unloadFrameBuffers, unloadVaoIds, unloadVboIds, unloadCtxData, unloadAudioBuffers, addShaderId, addTextureId, addFrameBuffer, addVaoId, addVboIds, addCtxData, addAudioBuffer, c'rlGetShaderIdDefault, getPixelDataSize) where
 
 import Control.Monad (forM_, unless, when)
 import Data.IORef (IORef, modifyIORef, newIORef, readIORef)
+import Data.List (delete)
 import Data.Map (Map)
 import qualified Data.Map as Map
 import Foreign (Ptr)
@@ -42,6 +43,59 @@ audioBuffers :: IORef [Ptr ()]
 {-# NOINLINE audioBuffers #-}
 audioBuffers = unsafePerformIO $ newIORef []
+
+unloadSingleShader :: (Integral a) => a -> IO ()
+unloadSingleShader sId' = do
+  shaderIdDefault <- c'rlGetShaderIdDefault
+  unless (sId == shaderIdDefault) (c'rlUnloadShaderProgram sId)
+  modifyIORef shaderIds (delete sId)
+  where
+    sId = fromIntegral sId'
+
+unloadSingleTexture :: (Integral a) => a -> IO ()
+unloadSingleTexture tId' = do
+  when (tId > 0) (c'rlUnloadTexture tId)
+  modifyIORef textureIds (delete tId)
+  where
+    tId = fromIntegral tId'
+
+unloadSingleFrameBuffer :: (Integral a) => a -> IO ()
+unloadSingleFrameBuffer fbId' = do
+  when (fbId > 0) (c'rlUnloadFramebuffer fbId)
+  modifyIORef frameBuffers (delete fbId)
+  where
+    fbId = fromIntegral fbId'
+
+unloadSingleVaoId :: (Integral a) => a -> IO ()
+unloadSingleVaoId vaoId' = do
+  c'rlUnloadVertexArray vaoId
+  modifyIORef vaoIds (delete vaoId)
+  where
+    vaoId = fromIntegral vaoId'
+
+unloadSingleVboIdList :: (Integral a) => Maybe [a] -> IO ()
+unloadSingleVboIdList Nothing = return ()
+unloadSingleVboIdList (Just vboIdList') = do
+  forM_
+    vboIdList
+    ( \vboId -> do
+        c'rlUnloadVertexBuffer vboId
+        modifyIORef vboIds (delete vboId)
+    )
+  where
+    vboIdList = map fromIntegral vboIdList'
+
+unloadSingleCtxDataPtr :: (Integral a) => a -> Ptr () -> IO ()
+unloadSingleCtxDataPtr ctxType' ctxData = do
+  c'unloadMusicStreamData ctxType ctxData
+  modifyIORef ctxDataPtrs (delete (ctxType, ctxData))
+  where
+    ctxType = fromIntegral ctxType'
+
+unloadSingleAudioBuffer :: Ptr () -> IO ()
+unloadSingleAudioBuffer buffer = do
+  c'unloadAudioBuffer buffer
+  modifyIORef audioBuffers (delete buffer)
 
 unloadShaders :: IO ()
 unloadShaders = do
src/Raylib/Native.hs view
@@ -144,9 +144,9 @@   c'clearWindowState ::
     CUInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetWindowIcon_" c'setWindowIcon :: Ptr Raylib.Types.Image -> IO ()
+foreign import ccall safe "rl_bindings.h SetWindowIcon_" c'setWindowIcon :: Ptr Image -> IO ()
 
-foreign import ccall safe "raylib.h SetWindowIcons" c'setWindowIcons :: Ptr Raylib.Types.Image -> CInt -> IO ()
+foreign import ccall safe "raylib.h SetWindowIcons" c'setWindowIcons :: Ptr Image -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h SetWindowTitle"
   c'setWindowTitle ::
@@ -196,7 +196,7 @@   c'getCurrentMonitor ::
     IO CInt
 
-foreign import ccall safe "rl_bindings.h GetMonitorPosition_" c'getMonitorPosition :: CInt -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetMonitorPosition_" c'getMonitorPosition :: CInt -> IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h GetMonitorWidth"
   c'getMonitorWidth ::
@@ -218,9 +218,9 @@   c'getMonitorRefreshRate ::
     CInt -> IO CInt
 
-foreign import ccall safe "rl_bindings.h GetWindowPosition_" c'getWindowPosition :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetWindowPosition_" c'getWindowPosition :: IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetWindowScaleDPI_" c'getWindowScaleDPI :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetWindowScaleDPI_" c'getWindowScaleDPI :: IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h GetMonitorName"
   c'getMonitorName ::
@@ -246,15 +246,15 @@   c'isCursorOnScreen ::
     IO CBool
 
-foreign import ccall safe "rl_bindings.h ClearBackground_" c'clearBackground :: Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ClearBackground_" c'clearBackground :: Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h BeginMode2D_" c'beginMode2D :: Ptr Raylib.Types.Camera2D -> IO ()
+foreign import ccall safe "rl_bindings.h BeginMode2D_" c'beginMode2D :: Ptr Camera2D -> IO ()
 
-foreign import ccall safe "rl_bindings.h BeginMode3D_" c'beginMode3D :: Ptr Raylib.Types.Camera3D -> IO ()
+foreign import ccall safe "rl_bindings.h BeginMode3D_" c'beginMode3D :: Ptr Camera3D -> IO ()
 
-foreign import ccall safe "rl_bindings.h BeginTextureMode_" c'beginTextureMode :: Ptr Raylib.Types.RenderTexture -> IO ()
+foreign import ccall safe "rl_bindings.h BeginTextureMode_" c'beginTextureMode :: Ptr RenderTexture -> IO ()
 
-foreign import ccall safe "rl_bindings.h BeginShaderMode_" c'beginShaderMode :: Ptr Raylib.Types.Shader -> IO ()
+foreign import ccall safe "rl_bindings.h BeginShaderMode_" c'beginShaderMode :: Ptr Shader -> IO ()
 
 foreign import ccall safe "raylib.h BeginBlendMode"
   c'beginBlendMode ::
@@ -264,45 +264,45 @@   c'beginScissorMode ::
     CInt -> CInt -> CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h BeginVrStereoMode_" c'beginVrStereoMode :: Ptr Raylib.Types.VrStereoConfig -> IO ()
+foreign import ccall safe "rl_bindings.h BeginVrStereoMode_" c'beginVrStereoMode :: Ptr VrStereoConfig -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadVrStereoConfig_" c'loadVrStereoConfig :: Ptr Raylib.Types.VrDeviceInfo -> IO (Ptr Raylib.Types.VrStereoConfig)
+foreign import ccall safe "rl_bindings.h LoadVrStereoConfig_" c'loadVrStereoConfig :: Ptr VrDeviceInfo -> IO (Ptr VrStereoConfig)
 
-foreign import ccall safe "rl_bindings.h UnloadVrStereoConfig_" c'unloadVrStereoConfig :: Ptr Raylib.Types.VrStereoConfig -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadVrStereoConfig_" c'unloadVrStereoConfig :: Ptr VrStereoConfig -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadShader_" c'loadShader :: CString -> CString -> IO (Ptr Raylib.Types.Shader)
+foreign import ccall safe "rl_bindings.h LoadShader_" c'loadShader :: CString -> CString -> IO (Ptr Shader)
 
-foreign import ccall safe "rl_bindings.h LoadShaderFromMemory_" c'loadShaderFromMemory :: CString -> CString -> IO (Ptr Raylib.Types.Shader)
+foreign import ccall safe "rl_bindings.h LoadShaderFromMemory_" c'loadShaderFromMemory :: CString -> CString -> IO (Ptr Shader)
 
 foreign import ccall safe "rl_bindings.h IsShaderReady_" c'isShaderReady :: Ptr Shader -> IO CBool
 
-foreign import ccall safe "rl_bindings.h GetShaderLocation_" c'getShaderLocation :: Ptr Raylib.Types.Shader -> CString -> IO CInt
+foreign import ccall safe "rl_bindings.h GetShaderLocation_" c'getShaderLocation :: Ptr Shader -> CString -> IO CInt
 
-foreign import ccall safe "rl_bindings.h GetShaderLocationAttrib_" c'getShaderLocationAttrib :: Ptr Raylib.Types.Shader -> CString -> IO CInt
+foreign import ccall safe "rl_bindings.h GetShaderLocationAttrib_" c'getShaderLocationAttrib :: Ptr Shader -> CString -> IO CInt
 
-foreign import ccall safe "rl_bindings.h SetShaderValue_" c'setShaderValue :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h SetShaderValue_" c'setShaderValue :: Ptr Shader -> CInt -> Ptr () -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetShaderValueV_" c'setShaderValueV :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h SetShaderValueV_" c'setShaderValueV :: Ptr Shader -> CInt -> Ptr () -> CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetShaderValueMatrix_" c'setShaderValueMatrix :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Matrix -> IO ()
+foreign import ccall safe "rl_bindings.h SetShaderValueMatrix_" c'setShaderValueMatrix :: Ptr Shader -> CInt -> Ptr Matrix -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetShaderValueTexture_" c'setShaderValueTexture :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Texture -> IO ()
+foreign import ccall safe "rl_bindings.h SetShaderValueTexture_" c'setShaderValueTexture :: Ptr Shader -> CInt -> Ptr Texture -> IO ()
 
-foreign import ccall safe "rl_bindings.h UnloadShader_" c'unloadShader :: Ptr Raylib.Types.Shader -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadShader_" c'unloadShader :: Ptr Shader -> IO ()
 
-foreign import ccall safe "rl_bindings.h GetMouseRay_" c'getMouseRay :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Camera3D -> IO (Ptr Raylib.Types.Ray)
+foreign import ccall safe "rl_bindings.h GetMouseRay_" c'getMouseRay :: Ptr Vector2 -> Ptr Camera3D -> IO (Ptr Ray)
 
-foreign import ccall safe "rl_bindings.h GetCameraMatrix_" c'getCameraMatrix :: Ptr Raylib.Types.Camera3D -> IO (Ptr Raylib.Types.Matrix)
+foreign import ccall safe "rl_bindings.h GetCameraMatrix_" c'getCameraMatrix :: Ptr Camera3D -> IO (Ptr Matrix)
 
-foreign import ccall safe "rl_bindings.h GetCameraMatrix2D_" c'getCameraMatrix2D :: Ptr Raylib.Types.Camera2D -> IO (Ptr Raylib.Types.Matrix)
+foreign import ccall safe "rl_bindings.h GetCameraMatrix2D_" c'getCameraMatrix2D :: Ptr Camera2D -> IO (Ptr Matrix)
 
-foreign import ccall safe "rl_bindings.h GetWorldToScreen_" c'getWorldToScreen :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Camera3D -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetWorldToScreen_" c'getWorldToScreen :: Ptr Vector3 -> Ptr Camera3D -> IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetScreenToWorld2D_" c'getScreenToWorld2D :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Camera2D -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetScreenToWorld2D_" c'getScreenToWorld2D :: Ptr Vector2 -> Ptr Camera2D -> IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetWorldToScreenEx_" c'getWorldToScreenEx :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Camera3D -> CInt -> CInt -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetWorldToScreenEx_" c'getWorldToScreenEx :: Ptr Vector3 -> Ptr Camera3D -> CInt -> CInt -> IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetWorldToScreen2D_" c'getWorldToScreen2D :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Camera2D -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetWorldToScreen2D_" c'getWorldToScreen2D :: Ptr Vector2 -> Ptr Camera2D -> IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h SetTargetFPS"
   c'setTargetFPS ::
@@ -440,19 +440,19 @@   c'isPathFile ::
     CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h LoadDirectoryFiles_" c'loadDirectoryFiles :: CString -> IO (Ptr Raylib.Types.FilePathList)
+foreign import ccall safe "rl_bindings.h LoadDirectoryFiles_" c'loadDirectoryFiles :: CString -> IO (Ptr FilePathList)
 
-foreign import ccall safe "rl_bindings.h LoadDirectoryFilesEx_" c'loadDirectoryFilesEx :: CString -> CString -> CInt -> IO (Ptr Raylib.Types.FilePathList)
+foreign import ccall safe "rl_bindings.h LoadDirectoryFilesEx_" c'loadDirectoryFilesEx :: CString -> CString -> CInt -> IO (Ptr FilePathList)
 
-foreign import ccall safe "rl_bindings.h UnloadDirectoryFiles_" c'unloadDirectoryFiles :: Ptr Raylib.Types.FilePathList -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadDirectoryFiles_" c'unloadDirectoryFiles :: Ptr FilePathList -> IO ()
 
 foreign import ccall safe "raylib.h IsFileDropped"
   c'isFileDropped ::
     IO CBool
 
-foreign import ccall safe "rl_bindings.h LoadDroppedFiles_" c'loadDroppedFiles :: IO (Ptr Raylib.Types.FilePathList)
+foreign import ccall safe "rl_bindings.h LoadDroppedFiles_" c'loadDroppedFiles :: IO (Ptr FilePathList)
 
-foreign import ccall safe "rl_bindings.h UnloadDroppedFiles_" c'unloadDroppedFiles :: Ptr Raylib.Types.FilePathList -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadDroppedFiles_" c'unloadDroppedFiles :: Ptr FilePathList -> IO ()
 
 foreign import ccall safe "raylib.h GetFileModTime"
   c'getFileModTime ::
@@ -566,9 +566,9 @@   c'getMouseY ::
     IO CInt
 
-foreign import ccall safe "rl_bindings.h GetMousePosition_" c'getMousePosition :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetMousePosition_" c'getMousePosition :: IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetMouseDelta_" c'getMouseDelta :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetMouseDelta_" c'getMouseDelta :: IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h SetMousePosition"
   c'setMousePosition ::
@@ -586,7 +586,7 @@   c'getMouseWheelMove ::
     IO CFloat
 
-foreign import ccall safe "rl_bindings.h GetMouseWheelMoveV_" c'getMouseWheelMoveV :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetMouseWheelMoveV_" c'getMouseWheelMoveV :: IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h SetMouseCursor"
   c'setMouseCursor ::
@@ -600,7 +600,7 @@   c'getTouchY ::
     IO CInt
 
-foreign import ccall safe "rl_bindings.h GetTouchPosition_" c'getTouchPosition :: CInt -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetTouchPosition_" c'getTouchPosition :: CInt -> IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h GetTouchPointId"
   c'getTouchPointId ::
@@ -626,13 +626,13 @@   c'getGestureHoldDuration ::
     IO CFloat
 
-foreign import ccall safe "rl_bindings.h GetGestureDragVector_" c'getGestureDragVector :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetGestureDragVector_" c'getGestureDragVector :: IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h GetGestureDragAngle"
   c'getGestureDragAngle ::
     IO CFloat
 
-foreign import ccall safe "rl_bindings.h GetGesturePinchVector_" c'getGesturePinchVector :: IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h GetGesturePinchVector_" c'getGesturePinchVector :: IO (Ptr Vector2)
 
 foreign import ccall safe "raylib.h GetGesturePinchAngle"
   c'getGesturePinchAngle ::
@@ -640,385 +640,385 @@ 
 foreign import ccall safe "raylib.h UpdateCamera"
   c'updateCamera ::
-    Ptr Raylib.Types.Camera3D -> CInt -> IO ()
+    Ptr Camera3D -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetShapesTexture_" c'setShapesTexture :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> IO ()
+foreign import ccall safe "rl_bindings.h SetShapesTexture_" c'setShapesTexture :: Ptr Texture -> Ptr Rectangle -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPixel_" c'drawPixel :: CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPixel_" c'drawPixel :: CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPixelV_" c'drawPixelV :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPixelV_" c'drawPixelV :: Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLine_" c'drawLine :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLine_" c'drawLine :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineV_" c'drawLineV :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineV_" c'drawLineV :: Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineEx_" c'drawLineEx :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineEx_" c'drawLineEx :: Ptr Vector2 -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineBezier_" c'drawLineBezier :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineBezier_" c'drawLineBezier :: Ptr Vector2 -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineBezierQuad_" c'drawLineBezierQuad :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineBezierQuad_" c'drawLineBezierQuad :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineBezierCubic_" c'drawLineBezierCubic :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineBezierCubic_" c'drawLineBezierCubic :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawLineStrip_" c'drawLineStrip :: Ptr Raylib.Types.Vector2 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLineStrip_" c'drawLineStrip :: Ptr Vector2 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircle_" c'drawCircle :: CInt -> CInt -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircle_" c'drawCircle :: CInt -> CInt -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircleSector_" c'drawCircleSector :: Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircleSector_" c'drawCircleSector :: Ptr Vector2 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircleSectorLines_" c'drawCircleSectorLines :: Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircleSectorLines_" c'drawCircleSectorLines :: Ptr Vector2 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircleGradient_" c'drawCircleGradient :: CInt -> CInt -> CFloat -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircleGradient_" c'drawCircleGradient :: CInt -> CInt -> CFloat -> Ptr Color -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircleV_" c'drawCircleV :: Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircleV_" c'drawCircleV :: Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircleLines_" c'drawCircleLines :: CInt -> CInt -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircleLines_" c'drawCircleLines :: CInt -> CInt -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawEllipse_" c'drawEllipse :: CInt -> CInt -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawEllipse_" c'drawEllipse :: CInt -> CInt -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawEllipseLines_" c'drawEllipseLines :: CInt -> CInt -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawEllipseLines_" c'drawEllipseLines :: CInt -> CInt -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRing_" c'drawRing :: Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRing_" c'drawRing :: Ptr Vector2 -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRingLines_" c'drawRingLines :: Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRingLines_" c'drawRingLines :: Ptr Vector2 -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangle_" c'drawRectangle :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangle_" c'drawRectangle :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleV_" c'drawRectangleV :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleV_" c'drawRectangleV :: Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleRec_" c'drawRectangleRec :: Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleRec_" c'drawRectangleRec :: Ptr Rectangle -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectanglePro_" c'drawRectanglePro :: Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectanglePro_" c'drawRectanglePro :: Ptr Rectangle -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleGradientV_" c'drawRectangleGradientV :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleGradientV_" c'drawRectangleGradientV :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleGradientH_" c'drawRectangleGradientH :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleGradientH_" c'drawRectangleGradientH :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleGradientEx_" c'drawRectangleGradientEx :: Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleGradientEx_" c'drawRectangleGradientEx :: Ptr Rectangle -> Ptr Color -> Ptr Color -> Ptr Color -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleLines_" c'drawRectangleLines :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleLines_" c'drawRectangleLines :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleLinesEx_" c'drawRectangleLinesEx :: Ptr Raylib.Types.Rectangle -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleLinesEx_" c'drawRectangleLinesEx :: Ptr Rectangle -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleRounded_" c'drawRectangleRounded :: Ptr Raylib.Types.Rectangle -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleRounded_" c'drawRectangleRounded :: Ptr Rectangle -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRectangleRoundedLines_" c'drawRectangleRoundedLines :: Ptr Raylib.Types.Rectangle -> CFloat -> CInt -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRectangleRoundedLines_" c'drawRectangleRoundedLines :: Ptr Rectangle -> CFloat -> CInt -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangle_" c'drawTriangle :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangle_" c'drawTriangle :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangleLines_" c'drawTriangleLines :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangleLines_" c'drawTriangleLines :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangleFan_" c'drawTriangleFan :: Ptr Raylib.Types.Vector2 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangleFan_" c'drawTriangleFan :: Ptr Vector2 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangleStrip_" c'drawTriangleStrip :: Ptr Raylib.Types.Vector2 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangleStrip_" c'drawTriangleStrip :: Ptr Vector2 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPoly_" c'drawPoly :: Ptr Raylib.Types.Vector2 -> CInt -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPoly_" c'drawPoly :: Ptr Vector2 -> CInt -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPolyLines_" c'drawPolyLines :: Ptr Raylib.Types.Vector2 -> CInt -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPolyLines_" c'drawPolyLines :: Ptr Vector2 -> CInt -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPolyLinesEx_" c'drawPolyLinesEx :: Ptr Raylib.Types.Vector2 -> CInt -> CFloat -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPolyLinesEx_" c'drawPolyLinesEx :: Ptr Vector2 -> CInt -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h CheckCollisionRecs_" c'checkCollisionRecs :: Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Rectangle -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionRecs_" c'checkCollisionRecs :: Ptr Rectangle -> Ptr Rectangle -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionCircles_" c'checkCollisionCircles :: Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Vector2 -> CFloat -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionCircles_" c'checkCollisionCircles :: Ptr Vector2 -> CFloat -> Ptr Vector2 -> CFloat -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionCircleRec_" c'checkCollisionCircleRec :: Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Rectangle -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionCircleRec_" c'checkCollisionCircleRec :: Ptr Vector2 -> CFloat -> Ptr Rectangle -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionPointRec_" c'checkCollisionPointRec :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Rectangle -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionPointRec_" c'checkCollisionPointRec :: Ptr Vector2 -> Ptr Rectangle -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionPointCircle_" c'checkCollisionPointCircle :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionPointCircle_" c'checkCollisionPointCircle :: Ptr Vector2 -> Ptr Vector2 -> CFloat -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionPointTriangle_" c'checkCollisionPointTriangle :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionPointTriangle_" c'checkCollisionPointTriangle :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionLines_" c'checkCollisionLines :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionLines_" c'checkCollisionLines :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionPointLine_" c'checkCollisionPointLine :: Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CInt -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionPointLine_" c'checkCollisionPointLine :: Ptr Vector2 -> Ptr Vector2 -> Ptr Vector2 -> CInt -> IO CBool
 
-foreign import ccall safe "rl_bindings.h GetCollisionRec_" c'getCollisionRec :: Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Rectangle -> IO (Ptr Raylib.Types.Rectangle)
+foreign import ccall safe "rl_bindings.h GetCollisionRec_" c'getCollisionRec :: Ptr Rectangle -> Ptr Rectangle -> IO (Ptr Rectangle)
 
-foreign import ccall safe "rl_bindings.h LoadImage_" c'loadImage :: CString -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImage_" c'loadImage :: CString -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h LoadImageRaw_" c'loadImageRaw :: CString -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImageRaw_" c'loadImageRaw :: CString -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h LoadImageAnim_" c'loadImageAnim :: CString -> Ptr CInt -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImageAnim_" c'loadImageAnim :: CString -> Ptr CInt -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h LoadImageFromMemory_" c'loadImageFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImageFromMemory_" c'loadImageFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h LoadImageFromTexture_" c'loadImageFromTexture :: Ptr Raylib.Types.Texture -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImageFromTexture_" c'loadImageFromTexture :: Ptr Texture -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h LoadImageFromScreen_" c'loadImageFromScreen :: IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h LoadImageFromScreen_" c'loadImageFromScreen :: IO (Ptr Image)
 
 foreign import ccall safe "rl_bindings.h IsImageReady_" c'isImageReady :: Ptr Image -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadImage_" c'unloadImage :: Ptr Raylib.Types.Image -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadImage_" c'unloadImage :: Ptr Image -> IO ()
 
-foreign import ccall safe "rl_bindings.h ExportImage_" c'exportImage :: Ptr Raylib.Types.Image -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportImage_" c'exportImage :: Ptr Image -> CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h ExportImageAsCode_" c'exportImageAsCode :: Ptr Raylib.Types.Image -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportImageAsCode_" c'exportImageAsCode :: Ptr Image -> CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h GenImageColor_" c'genImageColor :: CInt -> CInt -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageColor_" c'genImageColor :: CInt -> CInt -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageGradientV_" c'genImageGradientV :: CInt -> CInt -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageGradientV_" c'genImageGradientV :: CInt -> CInt -> Ptr Color -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageGradientH_" c'genImageGradientH :: CInt -> CInt -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageGradientH_" c'genImageGradientH :: CInt -> CInt -> Ptr Color -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageGradientRadial_" c'genImageGradientRadial :: CInt -> CInt -> CFloat -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageGradientRadial_" c'genImageGradientRadial :: CInt -> CInt -> CFloat -> Ptr Color -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageChecked_" c'genImageChecked :: CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageChecked_" c'genImageChecked :: CInt -> CInt -> CInt -> CInt -> Ptr Color -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageWhiteNoise_" c'genImageWhiteNoise :: CInt -> CInt -> CFloat -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageWhiteNoise_" c'genImageWhiteNoise :: CInt -> CInt -> CFloat -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImagePerlinNoise_" c'genImagePerlinNoise :: CInt -> CInt -> CInt -> CInt -> CFloat -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImagePerlinNoise_" c'genImagePerlinNoise :: CInt -> CInt -> CInt -> CInt -> CFloat -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageCellular_" c'genImageCellular :: CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageCellular_" c'genImageCellular :: CInt -> CInt -> CInt -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h GenImageText_" c'genImageText :: CInt -> CInt -> CString -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageText_" c'genImageText :: CInt -> CInt -> CString -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h ImageCopy_" c'imageCopy :: Ptr Raylib.Types.Image -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h ImageCopy_" c'imageCopy :: Ptr Image -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h ImageFromImage_" c'imageFromImage :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Rectangle -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h ImageFromImage_" c'imageFromImage :: Ptr Image -> Ptr Rectangle -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h ImageText_" c'imageText :: CString -> CInt -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h ImageText_" c'imageText :: CString -> CInt -> Ptr Color -> IO (Ptr Image)
 
-foreign import ccall safe "rl_bindings.h ImageTextEx_" c'imageTextEx :: Ptr Raylib.Types.Font -> CString -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h ImageTextEx_" c'imageTextEx :: Ptr Font -> CString -> CFloat -> CFloat -> Ptr Color -> IO (Ptr Image)
 
 foreign import ccall safe "raylib.h ImageFormat"
   c'imageFormat ::
-    Ptr Raylib.Types.Image -> CInt -> IO ()
+    Ptr Image -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageToPOT_" c'imageToPOT :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageToPOT_" c'imageToPOT :: Ptr Image -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageCrop_" c'imageCrop :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Rectangle -> IO ()
+foreign import ccall safe "rl_bindings.h ImageCrop_" c'imageCrop :: Ptr Image -> Ptr Rectangle -> IO ()
 
 foreign import ccall safe "raylib.h ImageAlphaCrop"
   c'imageAlphaCrop ::
-    Ptr Raylib.Types.Image -> CFloat -> IO ()
+    Ptr Image -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageAlphaClear_" c'imageAlphaClear :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h ImageAlphaClear_" c'imageAlphaClear :: Ptr Image -> Ptr Color -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageAlphaMask_" c'imageAlphaMask :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Image -> IO ()
+foreign import ccall safe "rl_bindings.h ImageAlphaMask_" c'imageAlphaMask :: Ptr Image -> Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageAlphaPremultiply"
   c'imageAlphaPremultiply ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageBlurGaussian"
   c'imageBlurGaussian ::
-    Ptr Raylib.Types.Image -> CInt -> IO ()
+    Ptr Image -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h ImageResize"
   c'imageResize ::
-    Ptr Raylib.Types.Image -> CInt -> CInt -> IO ()
+    Ptr Image -> CInt -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h ImageResizeNN"
   c'imageResizeNN ::
-    Ptr Raylib.Types.Image -> CInt -> CInt -> IO ()
+    Ptr Image -> CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageResizeCanvas_" c'imageResizeCanvas :: Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageResizeCanvas_" c'imageResizeCanvas :: Ptr Image -> CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
 foreign import ccall safe "raylib.h ImageMipmaps"
   c'imageMipmaps ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageDither"
   c'imageDither ::
-    Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> CInt -> IO ()
+    Ptr Image -> CInt -> CInt -> CInt -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h ImageFlipVertical"
   c'imageFlipVertical ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageFlipHorizontal"
   c'imageFlipHorizontal ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageRotateCW"
   c'imageRotateCW ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageRotateCCW"
   c'imageRotateCCW ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageColorTint_" c'imageColorTint :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageColorTint_" c'imageColorTint :: Ptr Image -> Ptr Color -> IO ()
 
 foreign import ccall safe "raylib.h ImageColorInvert"
   c'imageColorInvert ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageColorGrayscale"
   c'imageColorGrayscale ::
-    Ptr Raylib.Types.Image -> IO ()
+    Ptr Image -> IO ()
 
 foreign import ccall safe "raylib.h ImageColorContrast"
   c'imageColorContrast ::
-    Ptr Raylib.Types.Image -> CFloat -> IO ()
+    Ptr Image -> CFloat -> IO ()
 
 foreign import ccall safe "raylib.h ImageColorBrightness"
   c'imageColorBrightness ::
-    Ptr Raylib.Types.Image -> CInt -> IO ()
+    Ptr Image -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageColorReplace_" c'imageColorReplace :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageColorReplace_" c'imageColorReplace :: Ptr Image -> Ptr Color -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadImageColors_" c'loadImageColors :: Ptr Raylib.Types.Image -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h LoadImageColors_" c'loadImageColors :: Ptr Image -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h LoadImagePalette_" c'loadImagePalette :: Ptr Raylib.Types.Image -> CInt -> Ptr CInt -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h LoadImagePalette_" c'loadImagePalette :: Ptr Image -> CInt -> Ptr CInt -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h GetImageAlphaBorder_" c'getImageAlphaBorder :: Ptr Raylib.Types.Image -> CFloat -> IO (Ptr Raylib.Types.Rectangle)
+foreign import ccall safe "rl_bindings.h GetImageAlphaBorder_" c'getImageAlphaBorder :: Ptr Image -> CFloat -> IO (Ptr Rectangle)
 
-foreign import ccall safe "rl_bindings.h GetImageColor_" c'getImageColor :: Ptr Raylib.Types.Image -> CInt -> CInt -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h GetImageColor_" c'getImageColor :: Ptr Image -> CInt -> CInt -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ImageClearBackground_" c'imageClearBackground :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageClearBackground_" c'imageClearBackground :: Ptr Image -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawPixel_" c'imageDrawPixel :: Ptr Raylib.Types.Image -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawPixel_" c'imageDrawPixel :: Ptr Image -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawPixelV_" c'imageDrawPixelV :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawPixelV_" c'imageDrawPixelV :: Ptr Image -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawLine_" c'imageDrawLine :: Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawLine_" c'imageDrawLine :: Ptr Image -> CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawLineV_" c'imageDrawLineV :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawLineV_" c'imageDrawLineV :: Ptr Image -> Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawCircle_" c'imageDrawCircle :: Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawCircle_" c'imageDrawCircle :: Ptr Image -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawCircleV_" c'imageDrawCircleV :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector2 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawCircleV_" c'imageDrawCircleV :: Ptr Image -> Ptr Vector2 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawCircleLines_" c'imageDrawCircleLines :: Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawCircleLines_" c'imageDrawCircleLines :: Ptr Image -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawCircleLinesV_" c'imageDrawCircleLinesV :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector2 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawCircleLinesV_" c'imageDrawCircleLinesV :: Ptr Image -> Ptr Vector2 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawRectangle_" c'imageDrawRectangle :: Ptr Raylib.Types.Image -> CInt -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawRectangle_" c'imageDrawRectangle :: Ptr Image -> CInt -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawRectangleV_" c'imageDrawRectangleV :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawRectangleV_" c'imageDrawRectangleV :: Ptr Image -> Ptr Vector2 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawRectangleRec_" c'imageDrawRectangleRec :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawRectangleRec_" c'imageDrawRectangleRec :: Ptr Image -> Ptr Rectangle -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawRectangleLines_" c'imageDrawRectangleLines :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Rectangle -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawRectangleLines_" c'imageDrawRectangleLines :: Ptr Image -> Ptr Rectangle -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDraw_" c'imageDraw :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Image -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDraw_" c'imageDraw :: Ptr Image -> Ptr Image -> Ptr Rectangle -> Ptr Rectangle -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawText_" c'imageDrawText :: Ptr Raylib.Types.Image -> CString -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawText_" c'imageDrawText :: Ptr Image -> CString -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h ImageDrawTextEx_" c'imageDrawTextEx :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Font -> CString -> Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h ImageDrawTextEx_" c'imageDrawTextEx :: Ptr Image -> Ptr Font -> CString -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadTexture_" c'loadTexture :: CString -> IO (Ptr Raylib.Types.Texture)
+foreign import ccall safe "rl_bindings.h LoadTexture_" c'loadTexture :: CString -> IO (Ptr Texture)
 
-foreign import ccall safe "rl_bindings.h LoadTextureFromImage_" c'loadTextureFromImage :: Ptr Raylib.Types.Image -> IO (Ptr Raylib.Types.Texture)
+foreign import ccall safe "rl_bindings.h LoadTextureFromImage_" c'loadTextureFromImage :: Ptr Image -> IO (Ptr Texture)
 
-foreign import ccall safe "rl_bindings.h LoadTextureCubemap_" c'loadTextureCubemap :: Ptr Raylib.Types.Image -> CInt -> IO (Ptr Raylib.Types.Texture)
+foreign import ccall safe "rl_bindings.h LoadTextureCubemap_" c'loadTextureCubemap :: Ptr Image -> CInt -> IO (Ptr Texture)
 
-foreign import ccall safe "rl_bindings.h LoadRenderTexture_" c'loadRenderTexture :: CInt -> CInt -> IO (Ptr Raylib.Types.RenderTexture)
+foreign import ccall safe "rl_bindings.h LoadRenderTexture_" c'loadRenderTexture :: CInt -> CInt -> IO (Ptr RenderTexture)
 
 foreign import ccall safe "rl_bindings.h IsTextureReady_" c'isTextureReady :: Ptr Texture -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadTexture_" c'unloadTexture :: Ptr Raylib.Types.Texture -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadTexture_" c'unloadTexture :: Ptr Texture -> IO ()
 
 foreign import ccall safe "rl_bindings.h IsRenderTextureReady_" c'isRenderTextureReady :: Ptr RenderTexture -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadRenderTexture_" c'unloadRenderTexture :: Ptr Raylib.Types.RenderTexture -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadRenderTexture_" c'unloadRenderTexture :: Ptr RenderTexture -> IO ()
 
-foreign import ccall safe "rl_bindings.h UpdateTexture_" c'updateTexture :: Ptr Raylib.Types.Texture -> Ptr () -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateTexture_" c'updateTexture :: Ptr Texture -> Ptr () -> IO ()
 
-foreign import ccall safe "rl_bindings.h UpdateTextureRec_" c'updateTextureRec :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> Ptr () -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateTextureRec_" c'updateTextureRec :: Ptr Texture -> Ptr Rectangle -> Ptr () -> IO ()
 
 foreign import ccall safe "raylib.h GenTextureMipmaps"
   c'genTextureMipmaps ::
-    Ptr Raylib.Types.Texture -> IO ()
+    Ptr Texture -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetTextureFilter_" c'setTextureFilter :: Ptr Raylib.Types.Texture -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h SetTextureFilter_" c'setTextureFilter :: Ptr Texture -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetTextureWrap_" c'setTextureWrap :: Ptr Raylib.Types.Texture -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h SetTextureWrap_" c'setTextureWrap :: Ptr Texture -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTexture_" c'drawTexture :: Ptr Raylib.Types.Texture -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTexture_" c'drawTexture :: Ptr Texture -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextureV_" c'drawTextureV :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextureV_" c'drawTextureV :: Ptr Texture -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextureEx_" c'drawTextureEx :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextureEx_" c'drawTextureEx :: Ptr Texture -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextureRec_" c'drawTextureRec :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextureRec_" c'drawTextureRec :: Ptr Texture -> Ptr Rectangle -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTexturePro_" c'drawTexturePro :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTexturePro_" c'drawTexturePro :: Ptr Texture -> Ptr Rectangle -> Ptr Rectangle -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextureNPatch_" c'drawTextureNPatch :: Ptr Raylib.Types.Texture -> Ptr Raylib.Types.NPatchInfo -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextureNPatch_" c'drawTextureNPatch :: Ptr Texture -> Ptr NPatchInfo -> Ptr Rectangle -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h Fade_" c'fade :: Ptr Raylib.Types.Color -> CFloat -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h Fade_" c'fade :: Ptr Color -> CFloat -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorToInt_" c'colorToInt :: Ptr Raylib.Types.Color -> IO CInt
+foreign import ccall safe "rl_bindings.h ColorToInt_" c'colorToInt :: Ptr Color -> IO CInt
 
-foreign import ccall safe "rl_bindings.h ColorNormalize_" c'colorNormalize :: Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Vector4)
+foreign import ccall safe "rl_bindings.h ColorNormalize_" c'colorNormalize :: Ptr Color -> IO (Ptr Vector4)
 
-foreign import ccall safe "rl_bindings.h ColorFromNormalized_" c'colorFromNormalized :: Ptr Raylib.Types.Vector4 -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorFromNormalized_" c'colorFromNormalized :: Ptr Vector4 -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorToHSV_" c'colorToHSV :: Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Vector3)
+foreign import ccall safe "rl_bindings.h ColorToHSV_" c'colorToHSV :: Ptr Color -> IO (Ptr Vector3)
 
-foreign import ccall safe "rl_bindings.h ColorFromHSV_" c'colorFromHSV :: CFloat -> CFloat -> CFloat -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorFromHSV_" c'colorFromHSV :: CFloat -> CFloat -> CFloat -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorTint_" c'colorTint :: Ptr Color -> Ptr Color -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorTint_" c'colorTint :: Ptr Color -> Ptr Color -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorBrightness_" c'colorBrightness :: Ptr Color -> CFloat -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorBrightness_" c'colorBrightness :: Ptr Color -> CFloat -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorContrast_" c'colorContrast :: Ptr Color -> CFloat -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorContrast_" c'colorContrast :: Ptr Color -> CFloat -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorAlpha_" c'colorAlpha :: Ptr Raylib.Types.Color -> CFloat -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorAlpha_" c'colorAlpha :: Ptr Color -> CFloat -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h ColorAlphaBlend_" c'colorAlphaBlend :: Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> Ptr Raylib.Types.Color -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h ColorAlphaBlend_" c'colorAlphaBlend :: Ptr Color -> Ptr Color -> Ptr Color -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h GetColor_" c'getColor :: CUInt -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h GetColor_" c'getColor :: CUInt -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h GetPixelColor_" c'getPixelColor :: Ptr () -> CInt -> IO (Ptr Raylib.Types.Color)
+foreign import ccall safe "rl_bindings.h GetPixelColor_" c'getPixelColor :: Ptr () -> CInt -> IO (Ptr Color)
 
-foreign import ccall safe "rl_bindings.h SetPixelColor_" c'setPixelColor :: Ptr () -> Ptr Raylib.Types.Color -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h SetPixelColor_" c'setPixelColor :: Ptr () -> Ptr Color -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h GetFontDefault_" c'getFontDefault :: IO (Ptr Raylib.Types.Font)
+foreign import ccall safe "rl_bindings.h GetFontDefault_" c'getFontDefault :: IO (Ptr Font)
 
-foreign import ccall safe "rl_bindings.h LoadFont_" c'loadFont :: CString -> IO (Ptr Raylib.Types.Font)
+foreign import ccall safe "rl_bindings.h LoadFont_" c'loadFont :: CString -> IO (Ptr Font)
 
-foreign import ccall safe "rl_bindings.h LoadFontEx_" c'loadFontEx :: CString -> CInt -> Ptr CInt -> CInt -> IO (Ptr Raylib.Types.Font)
+foreign import ccall safe "rl_bindings.h LoadFontEx_" c'loadFontEx :: CString -> CInt -> Ptr CInt -> CInt -> IO (Ptr Font)
 
-foreign import ccall safe "rl_bindings.h LoadFontFromImage_" c'loadFontFromImage :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Color -> CInt -> IO (Ptr Raylib.Types.Font)
+foreign import ccall safe "rl_bindings.h LoadFontFromImage_" c'loadFontFromImage :: Ptr Image -> Ptr Color -> CInt -> IO (Ptr Font)
 
-foreign import ccall safe "rl_bindings.h LoadFontFromMemory_" c'loadFontFromMemory :: CString -> Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> IO (Ptr Raylib.Types.Font)
+foreign import ccall safe "rl_bindings.h LoadFontFromMemory_" c'loadFontFromMemory :: CString -> Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> IO (Ptr Font)
 
 foreign import ccall safe "raylib.h LoadFontData"
   c'loadFontData ::
-    Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.GlyphInfo)
+    Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr GlyphInfo)
 
-foreign import ccall safe "rl_bindings.h GenImageFontAtlas_" c'genImageFontAtlas :: Ptr Raylib.Types.GlyphInfo -> Ptr (Ptr Raylib.Types.Rectangle) -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.Image)
+foreign import ccall safe "rl_bindings.h GenImageFontAtlas_" c'genImageFontAtlas :: Ptr GlyphInfo -> Ptr (Ptr Rectangle) -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Image)
 
 foreign import ccall safe "raylib.h UnloadFontData"
   c'unloadFontData ::
-    Ptr Raylib.Types.GlyphInfo -> CInt -> IO ()
+    Ptr GlyphInfo -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsFontReady_" c'isFontReady :: Ptr Raylib.Types.Font -> IO CBool
+foreign import ccall safe "rl_bindings.h IsFontReady_" c'isFontReady :: Ptr Font -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadFont_" c'unloadFont :: Ptr Raylib.Types.Font -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadFont_" c'unloadFont :: Ptr Font -> IO ()
 
-foreign import ccall safe "rl_bindings.h ExportFontAsCode_" c'exportFontAsCode :: Ptr Raylib.Types.Font -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportFontAsCode_" c'exportFontAsCode :: Ptr Font -> CString -> IO CBool
 
 foreign import ccall safe "raylib.h DrawFPS"
   c'drawFPS ::
     CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawText_" c'drawText :: CString -> CInt -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawText_" c'drawText :: CString -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextEx_" c'drawTextEx :: Ptr Raylib.Types.Font -> CString -> Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextEx_" c'drawTextEx :: Ptr Font -> CString -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextPro_" c'drawTextPro :: Ptr Raylib.Types.Font -> CString -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextPro_" c'drawTextPro :: Ptr Font -> CString -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextCodepoint_" c'drawTextCodepoint :: Ptr Raylib.Types.Font -> CInt -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextCodepoint_" c'drawTextCodepoint :: Ptr Font -> CInt -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTextCodepoints_" c'drawTextCodepoints :: Ptr Raylib.Types.Font -> Ptr CInt -> CInt -> Ptr Raylib.Types.Vector2 -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTextCodepoints_" c'drawTextCodepoints :: Ptr Font -> Ptr CInt -> CInt -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
 
 foreign import ccall safe "raylib.h MeasureText"
   c'measureText ::
     CString -> CInt -> IO CInt
 
-foreign import ccall safe "rl_bindings.h MeasureTextEx_" c'measureTextEx :: Ptr Raylib.Types.Font -> CString -> CFloat -> CFloat -> IO (Ptr Raylib.Types.Vector2)
+foreign import ccall safe "rl_bindings.h MeasureTextEx_" c'measureTextEx :: Ptr Font -> CString -> CFloat -> CFloat -> IO (Ptr Vector2)
 
-foreign import ccall safe "rl_bindings.h GetGlyphIndex_" c'getGlyphIndex :: Ptr Raylib.Types.Font -> CInt -> IO CInt
+foreign import ccall safe "rl_bindings.h GetGlyphIndex_" c'getGlyphIndex :: Ptr Font -> CInt -> IO CInt
 
-foreign import ccall safe "rl_bindings.h GetGlyphInfo_" c'getGlyphInfo :: Ptr Raylib.Types.Font -> CInt -> IO (Ptr Raylib.Types.GlyphInfo)
+foreign import ccall safe "rl_bindings.h GetGlyphInfo_" c'getGlyphInfo :: Ptr Font -> CInt -> IO (Ptr GlyphInfo)
 
-foreign import ccall safe "rl_bindings.h GetGlyphAtlasRec_" c'getGlyphAtlasRec :: Ptr Raylib.Types.Font -> CInt -> IO (Ptr Raylib.Types.Rectangle)
+foreign import ccall safe "rl_bindings.h GetGlyphAtlasRec_" c'getGlyphAtlasRec :: Ptr Font -> CInt -> IO (Ptr Rectangle)
 
 foreign import ccall safe "raylib.h LoadUTF8"
   c'loadUTF8 ::
@@ -1032,10 +1032,6 @@   c'getCodepointCount ::
     CString -> IO CInt
 
--- | Deprecated, use `getCodepointNext`
--- foreign import ccall safe "raylib.h GetCodepoint"
---   getCodepoint ::
---     CString -> Ptr CInt -> IO CInt
 foreign import ccall safe "raylib.h GetCodepointNext"
   c'getCodepointNext ::
     CString -> Ptr CInt -> IO CInt
@@ -1122,165 +1118,165 @@ -- foreign import ccall safe "raylib.h TextToInteger"
 --   textToInteger ::
 --     CString -> IO CInt
-foreign import ccall safe "rl_bindings.h DrawLine3D_" c'drawLine3D :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawLine3D_" c'drawLine3D :: Ptr Vector3 -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPoint3D_" c'drawPoint3D :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPoint3D_" c'drawPoint3D :: Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCircle3D_" c'drawCircle3D :: Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCircle3D_" c'drawCircle3D :: Ptr Vector3 -> CFloat -> Ptr Vector3 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangle3D_" c'drawTriangle3D :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangle3D_" c'drawTriangle3D :: Ptr Vector3 -> Ptr Vector3 -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawTriangleStrip3D_" c'drawTriangleStrip3D :: Ptr Raylib.Types.Vector3 -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawTriangleStrip3D_" c'drawTriangleStrip3D :: Ptr Vector3 -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCube_" c'drawCube :: Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCube_" c'drawCube :: Ptr Vector3 -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCubeV_" c'drawCubeV :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCubeV_" c'drawCubeV :: Ptr Vector3 -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCubeWires_" c'drawCubeWires :: Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCubeWires_" c'drawCubeWires :: Ptr Vector3 -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCubeWiresV_" c'drawCubeWiresV :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCubeWiresV_" c'drawCubeWiresV :: Ptr Vector3 -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawSphere_" c'drawSphere :: Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawSphere_" c'drawSphere :: Ptr Vector3 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawSphereEx_" c'drawSphereEx :: Ptr Raylib.Types.Vector3 -> CFloat -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawSphereEx_" c'drawSphereEx :: Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawSphereWires_" c'drawSphereWires :: Ptr Raylib.Types.Vector3 -> CFloat -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawSphereWires_" c'drawSphereWires :: Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCylinder_" c'drawCylinder :: Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCylinder_" c'drawCylinder :: Ptr Vector3 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCylinderEx_" c'drawCylinderEx :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCylinderEx_" c'drawCylinderEx :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCylinderWires_" c'drawCylinderWires :: Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCylinderWires_" c'drawCylinderWires :: Ptr Vector3 -> CFloat -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawCylinderWiresEx_" c'drawCylinderWiresEx :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> CFloat -> CFloat -> CInt -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawCylinderWiresEx_" c'drawCylinderWiresEx :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CFloat -> CInt -> Ptr Color -> IO ()
 
 foreign import ccall safe "rl_bindings.h DrawCapsule_" c'drawCapsule :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
 foreign import ccall safe "rl_bindings.h DrawCapsuleWires_" c'drawCapsuleWires :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawPlane_" c'drawPlane :: Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawPlane_" c'drawPlane :: Ptr Vector3 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawRay_" c'drawRay :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawRay_" c'drawRay :: Ptr Ray -> Ptr Color -> IO ()
 
 foreign import ccall safe "raylib.h DrawGrid"
   c'drawGrid ::
     CInt -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadModel_" c'loadModel :: CString -> IO (Ptr Raylib.Types.Model)
+foreign import ccall safe "rl_bindings.h LoadModel_" c'loadModel :: CString -> IO (Ptr Model)
 
-foreign import ccall safe "rl_bindings.h LoadModelFromMesh_" c'loadModelFromMesh :: Ptr Raylib.Types.Mesh -> IO (Ptr Raylib.Types.Model)
+foreign import ccall safe "rl_bindings.h LoadModelFromMesh_" c'loadModelFromMesh :: Ptr Mesh -> IO (Ptr Model)
 
-foreign import ccall safe "rl_bindings.h IsModelReady_" c'isModelReady :: Ptr Raylib.Types.Model -> IO CBool
+foreign import ccall safe "rl_bindings.h IsModelReady_" c'isModelReady :: Ptr Model -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadModel_" c'unloadModel :: Ptr Raylib.Types.Model -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadModel_" c'unloadModel :: Ptr Model -> IO ()
 
-foreign import ccall safe "rl_bindings.h UnloadModelKeepMeshes_" c'unloadModelKeepMeshes :: Ptr Raylib.Types.Model -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadModelKeepMeshes_" c'unloadModelKeepMeshes :: Ptr Model -> IO ()
 
-foreign import ccall safe "rl_bindings.h GetModelBoundingBox_" c'getModelBoundingBox :: Ptr Raylib.Types.Model -> IO (Ptr Raylib.Types.BoundingBox)
+foreign import ccall safe "rl_bindings.h GetModelBoundingBox_" c'getModelBoundingBox :: Ptr Model -> IO (Ptr BoundingBox)
 
-foreign import ccall safe "rl_bindings.h DrawModel_" c'drawModel :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawModel_" c'drawModel :: Ptr Model -> Ptr Vector3 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawModelEx_" c'drawModelEx :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawModelEx_" c'drawModelEx :: Ptr Model -> Ptr Vector3 -> Ptr Vector3 -> CFloat -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawModelWires_" c'drawModelWires :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawModelWires_" c'drawModelWires :: Ptr Model -> Ptr Vector3 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawModelWiresEx_" c'drawModelWiresEx :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawModelWiresEx_" c'drawModelWiresEx :: Ptr Model -> Ptr Vector3 -> Ptr Vector3 -> CFloat -> Ptr Vector3 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawBoundingBox_" c'drawBoundingBox :: Ptr Raylib.Types.BoundingBox -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawBoundingBox_" c'drawBoundingBox :: Ptr BoundingBox -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawBillboard_" c'drawBillboard :: Ptr Raylib.Types.Camera3D -> Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawBillboard_" c'drawBillboard :: Ptr Camera3D -> Ptr Texture -> Ptr Vector3 -> CFloat -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawBillboardRec_" c'drawBillboardRec :: Ptr Raylib.Types.Camera3D -> Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawBillboardRec_" c'drawBillboardRec :: Ptr Camera3D -> Ptr Texture -> Ptr Rectangle -> Ptr Vector3 -> Ptr Vector2 -> Ptr Color -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawBillboardPro_" c'drawBillboardPro :: Ptr Raylib.Types.Camera3D -> Ptr Raylib.Types.Texture -> Ptr Raylib.Types.Rectangle -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector2 -> Ptr Raylib.Types.Vector2 -> CFloat -> Ptr Raylib.Types.Color -> IO ()
+foreign import ccall safe "rl_bindings.h DrawBillboardPro_" c'drawBillboardPro :: Ptr Camera3D -> Ptr Texture -> Ptr Rectangle -> Ptr Vector3 -> Ptr Vector3 -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
 
 foreign import ccall safe "raylib.h UploadMesh"
   c'uploadMesh ::
-    Ptr Raylib.Types.Mesh -> CInt -> IO ()
+    Ptr Mesh -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h UpdateMeshBuffer_" c'updateMeshBuffer :: Ptr Raylib.Types.Mesh -> CInt -> Ptr () -> CInt -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateMeshBuffer_" c'updateMeshBuffer :: Ptr Mesh -> CInt -> Ptr () -> CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h UnloadMesh_" c'unloadMesh :: Ptr Raylib.Types.Mesh -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadMesh_" c'unloadMesh :: Ptr Mesh -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawMesh_" c'drawMesh :: Ptr Raylib.Types.Mesh -> Ptr Raylib.Types.Material -> Ptr Raylib.Types.Matrix -> IO ()
+foreign import ccall safe "rl_bindings.h DrawMesh_" c'drawMesh :: Ptr Mesh -> Ptr Material -> Ptr Matrix -> IO ()
 
-foreign import ccall safe "rl_bindings.h DrawMeshInstanced_" c'drawMeshInstanced :: Ptr Raylib.Types.Mesh -> Ptr Raylib.Types.Material -> Ptr Raylib.Types.Matrix -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h DrawMeshInstanced_" c'drawMeshInstanced :: Ptr Mesh -> Ptr Material -> Ptr Matrix -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h ExportMesh_" c'exportMesh :: Ptr Raylib.Types.Mesh -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportMesh_" c'exportMesh :: Ptr Mesh -> CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h GetMeshBoundingBox_" c'getMeshBoundingBox :: Ptr Raylib.Types.Mesh -> IO (Ptr Raylib.Types.BoundingBox)
+foreign import ccall safe "rl_bindings.h GetMeshBoundingBox_" c'getMeshBoundingBox :: Ptr Mesh -> IO (Ptr BoundingBox)
 
 foreign import ccall safe "raylib.h GenMeshTangents"
   c'genMeshTangents ::
-    Ptr Raylib.Types.Mesh -> IO ()
+    Ptr Mesh -> IO ()
 
-foreign import ccall safe "rl_bindings.h GenMeshPoly_" c'genMeshPoly :: CInt -> CFloat -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshPoly_" c'genMeshPoly :: CInt -> CFloat -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshPlane_" c'genMeshPlane :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshPlane_" c'genMeshPlane :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshCube_" c'genMeshCube :: CFloat -> CFloat -> CFloat -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshCube_" c'genMeshCube :: CFloat -> CFloat -> CFloat -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshSphere_" c'genMeshSphere :: CFloat -> CInt -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshSphere_" c'genMeshSphere :: CFloat -> CInt -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshHemiSphere_" c'genMeshHemiSphere :: CFloat -> CInt -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshHemiSphere_" c'genMeshHemiSphere :: CFloat -> CInt -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshCylinder_" c'genMeshCylinder :: CFloat -> CFloat -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshCylinder_" c'genMeshCylinder :: CFloat -> CFloat -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshCone_" c'genMeshCone :: CFloat -> CFloat -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshCone_" c'genMeshCone :: CFloat -> CFloat -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshTorus_" c'genMeshTorus :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshTorus_" c'genMeshTorus :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshKnot_" c'genMeshKnot :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshKnot_" c'genMeshKnot :: CFloat -> CFloat -> CInt -> CInt -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshHeightmap_" c'genMeshHeightmap :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector3 -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshHeightmap_" c'genMeshHeightmap :: Ptr Image -> Ptr Vector3 -> IO (Ptr Mesh)
 
-foreign import ccall safe "rl_bindings.h GenMeshCubicmap_" c'genMeshCubicmap :: Ptr Raylib.Types.Image -> Ptr Raylib.Types.Vector3 -> IO (Ptr Raylib.Types.Mesh)
+foreign import ccall safe "rl_bindings.h GenMeshCubicmap_" c'genMeshCubicmap :: Ptr Image -> Ptr Vector3 -> IO (Ptr Mesh)
 
 foreign import ccall safe "raylib.h LoadMaterials"
   c'loadMaterials ::
-    CString -> Ptr CInt -> IO (Ptr Raylib.Types.Material)
+    CString -> Ptr CInt -> IO (Ptr Material)
 
-foreign import ccall safe "rl_bindings.h LoadMaterialDefault_" c'loadMaterialDefault :: IO (Ptr Raylib.Types.Material)
+foreign import ccall safe "rl_bindings.h LoadMaterialDefault_" c'loadMaterialDefault :: IO (Ptr Material)
 
-foreign import ccall safe "rl_bindings.h IsMaterialReady_" c'isMaterialReady :: Ptr Raylib.Types.Material -> IO CBool
+foreign import ccall safe "rl_bindings.h IsMaterialReady_" c'isMaterialReady :: Ptr Material -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadMaterial_" c'unloadMaterial :: Ptr Raylib.Types.Material -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadMaterial_" c'unloadMaterial :: Ptr Material -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetMaterialTexture_" c'setMaterialTexture :: Ptr Raylib.Types.Material -> CInt -> Ptr Raylib.Types.Texture -> IO ()
+foreign import ccall safe "rl_bindings.h SetMaterialTexture_" c'setMaterialTexture :: Ptr Material -> CInt -> Ptr Texture -> IO ()
 
 foreign import ccall safe "raylib.h SetModelMeshMaterial"
   c'setModelMeshMaterial ::
-    Ptr Raylib.Types.Model -> CInt -> CInt -> IO ()
+    Ptr Model -> CInt -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h LoadModelAnimations"
   c'loadModelAnimations ::
-    CString -> Ptr CUInt -> IO (Ptr Raylib.Types.ModelAnimation)
+    CString -> Ptr CUInt -> IO (Ptr ModelAnimation)
 
-foreign import ccall safe "rl_bindings.h UpdateModelAnimation_" c'updateModelAnimation :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.ModelAnimation -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateModelAnimation_" c'updateModelAnimation :: Ptr Model -> Ptr ModelAnimation -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h UnloadModelAnimation_" c'unloadModelAnimation :: Ptr Raylib.Types.ModelAnimation -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadModelAnimation_" c'unloadModelAnimation :: Ptr ModelAnimation -> IO ()
 
 foreign import ccall safe "raylib.h UnloadModelAnimations"
   c'unloadModelAnimations ::
-    Ptr Raylib.Types.ModelAnimation -> CUInt -> IO ()
+    Ptr ModelAnimation -> CUInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsModelAnimationValid_" c'isModelAnimationValid :: Ptr Raylib.Types.Model -> Ptr Raylib.Types.ModelAnimation -> IO CBool
+foreign import ccall safe "rl_bindings.h IsModelAnimationValid_" c'isModelAnimationValid :: Ptr Model -> Ptr ModelAnimation -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionSpheres_" c'checkCollisionSpheres :: Ptr Raylib.Types.Vector3 -> CFloat -> Ptr Raylib.Types.Vector3 -> CFloat -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionSpheres_" c'checkCollisionSpheres :: Ptr Vector3 -> CFloat -> Ptr Vector3 -> CFloat -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionBoxes_" c'checkCollisionBoxes :: Ptr Raylib.Types.BoundingBox -> Ptr Raylib.Types.BoundingBox -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionBoxes_" c'checkCollisionBoxes :: Ptr BoundingBox -> Ptr BoundingBox -> IO CBool
 
-foreign import ccall safe "rl_bindings.h CheckCollisionBoxSphere_" c'checkCollisionBoxSphere :: Ptr Raylib.Types.BoundingBox -> Ptr Raylib.Types.Vector3 -> CFloat -> IO CBool
+foreign import ccall safe "rl_bindings.h CheckCollisionBoxSphere_" c'checkCollisionBoxSphere :: Ptr BoundingBox -> Ptr Vector3 -> CFloat -> IO CBool
 
-foreign import ccall safe "rl_bindings.h GetRayCollisionSphere_" c'getRayCollisionSphere :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.Vector3 -> CFloat -> IO (Ptr Raylib.Types.RayCollision)
+foreign import ccall safe "rl_bindings.h GetRayCollisionSphere_" c'getRayCollisionSphere :: Ptr Ray -> Ptr Vector3 -> CFloat -> IO (Ptr RayCollision)
 
-foreign import ccall safe "rl_bindings.h GetRayCollisionBox_" c'getRayCollisionBox :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.BoundingBox -> IO (Ptr Raylib.Types.RayCollision)
+foreign import ccall safe "rl_bindings.h GetRayCollisionBox_" c'getRayCollisionBox :: Ptr Ray -> Ptr BoundingBox -> IO (Ptr RayCollision)
 
-foreign import ccall safe "rl_bindings.h GetRayCollisionMesh_" c'getRayCollisionMesh :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.Mesh -> Ptr Raylib.Types.Matrix -> IO (Ptr Raylib.Types.RayCollision)
+foreign import ccall safe "rl_bindings.h GetRayCollisionMesh_" c'getRayCollisionMesh :: Ptr Ray -> Ptr Mesh -> Ptr Matrix -> IO (Ptr RayCollision)
 
-foreign import ccall safe "rl_bindings.h GetRayCollisionTriangle_" c'getRayCollisionTriangle :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> IO (Ptr Raylib.Types.RayCollision)
+foreign import ccall safe "rl_bindings.h GetRayCollisionTriangle_" c'getRayCollisionTriangle :: Ptr Ray -> Ptr Vector3 -> Ptr Vector3 -> Ptr Vector3 -> IO (Ptr RayCollision)
 
-foreign import ccall safe "rl_bindings.h GetRayCollisionQuad_" c'getRayCollisionQuad :: Ptr Raylib.Types.Ray -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> Ptr Raylib.Types.Vector3 -> IO (Ptr Raylib.Types.RayCollision)
+foreign import ccall safe "rl_bindings.h GetRayCollisionQuad_" c'getRayCollisionQuad :: Ptr Ray -> Ptr Vector3 -> Ptr Vector3 -> Ptr Vector3 -> Ptr Vector3 -> IO (Ptr RayCollision)
 
 -- TODO: redesign this
 foreign import ccall safe "wrapper"
@@ -1303,133 +1299,133 @@   c'setMasterVolume ::
     CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadWave_" c'loadWave :: CString -> IO (Ptr Raylib.Types.Wave)
+foreign import ccall safe "rl_bindings.h LoadWave_" c'loadWave :: CString -> IO (Ptr Wave)
 
-foreign import ccall safe "rl_bindings.h LoadWaveFromMemory_" c'loadWaveFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Raylib.Types.Wave)
+foreign import ccall safe "rl_bindings.h LoadWaveFromMemory_" c'loadWaveFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Wave)
 
-foreign import ccall safe "rl_bindings.h LoadSound_" c'loadSound :: CString -> IO (Ptr Raylib.Types.Sound)
+foreign import ccall safe "rl_bindings.h LoadSound_" c'loadSound :: CString -> IO (Ptr Sound)
 
-foreign import ccall safe "rl_bindings.h LoadSoundFromWave_" c'loadSoundFromWave :: Ptr Raylib.Types.Wave -> IO (Ptr Raylib.Types.Sound)
+foreign import ccall safe "rl_bindings.h LoadSoundFromWave_" c'loadSoundFromWave :: Ptr Wave -> IO (Ptr Sound)
 
-foreign import ccall safe "rl_bindings.h UpdateSound_" c'updateSound :: Ptr Raylib.Types.Sound -> Ptr () -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateSound_" c'updateSound :: Ptr Sound -> Ptr () -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsWaveReady_" c'isWaveReady :: Ptr Raylib.Types.Wave -> IO CBool
+foreign import ccall safe "rl_bindings.h IsWaveReady_" c'isWaveReady :: Ptr Wave -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadWave_" c'unloadWave :: Ptr Raylib.Types.Wave -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadWave_" c'unloadWave :: Ptr Wave -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsSoundReady_" c'isSoundReady :: Ptr Raylib.Types.Sound -> IO CBool
+foreign import ccall safe "rl_bindings.h IsSoundReady_" c'isSoundReady :: Ptr Sound -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadSound_" c'unloadSound :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadSound_" c'unloadSound :: Ptr Sound -> IO ()
 
-foreign import ccall safe "rl_bindings.h ExportWave_" c'exportWave :: Ptr Raylib.Types.Wave -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportWave_" c'exportWave :: Ptr Wave -> CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h ExportWaveAsCode_" c'exportWaveAsCode :: Ptr Raylib.Types.Wave -> CString -> IO CBool
+foreign import ccall safe "rl_bindings.h ExportWaveAsCode_" c'exportWaveAsCode :: Ptr Wave -> CString -> IO CBool
 
-foreign import ccall safe "rl_bindings.h PlaySound_" c'playSound :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h PlaySound_" c'playSound :: Ptr Sound -> IO ()
 
-foreign import ccall safe "rl_bindings.h StopSound_" c'stopSound :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h StopSound_" c'stopSound :: Ptr Sound -> IO ()
 
-foreign import ccall safe "rl_bindings.h PauseSound_" c'pauseSound :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h PauseSound_" c'pauseSound :: Ptr Sound -> IO ()
 
-foreign import ccall safe "rl_bindings.h ResumeSound_" c'resumeSound :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h ResumeSound_" c'resumeSound :: Ptr Sound -> IO ()
 
-foreign import ccall safe "rl_bindings.h PlaySoundMulti_" c'playSoundMulti :: Ptr Raylib.Types.Sound -> IO ()
+foreign import ccall safe "rl_bindings.h PlaySoundMulti_" c'playSoundMulti :: Ptr Sound -> IO ()
 
 foreign import ccall safe "raylib.h GetSoundsPlaying"
   c'getSoundsPlaying ::
     IO CInt
 
-foreign import ccall safe "rl_bindings.h IsSoundPlaying_" c'isSoundPlaying :: Ptr Raylib.Types.Sound -> IO CBool
+foreign import ccall safe "rl_bindings.h IsSoundPlaying_" c'isSoundPlaying :: Ptr Sound -> IO CBool
 
-foreign import ccall safe "rl_bindings.h SetSoundVolume_" c'setSoundVolume :: Ptr Raylib.Types.Sound -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetSoundVolume_" c'setSoundVolume :: Ptr Sound -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetSoundPitch_" c'setSoundPitch :: Ptr Raylib.Types.Sound -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetSoundPitch_" c'setSoundPitch :: Ptr Sound -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetSoundPan_" c'setSoundPan :: Ptr Raylib.Types.Sound -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetSoundPan_" c'setSoundPan :: Ptr Sound -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h WaveCopy_" c'waveCopy :: Ptr Raylib.Types.Wave -> IO (Ptr Raylib.Types.Wave)
+foreign import ccall safe "rl_bindings.h WaveCopy_" c'waveCopy :: Ptr Wave -> IO (Ptr Wave)
 
 foreign import ccall safe "raylib.h WaveCrop"
   c'waveCrop ::
-    Ptr Raylib.Types.Wave -> CInt -> CInt -> IO ()
+    Ptr Wave -> CInt -> CInt -> IO ()
 
 foreign import ccall safe "raylib.h WaveFormat"
   c'waveFormat ::
-    Ptr Raylib.Types.Wave -> CInt -> CInt -> CInt -> IO ()
+    Ptr Wave -> CInt -> CInt -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadWaveSamples_" c'loadWaveSamples :: Ptr Raylib.Types.Wave -> IO (Ptr CFloat)
+foreign import ccall safe "rl_bindings.h LoadWaveSamples_" c'loadWaveSamples :: Ptr Wave -> IO (Ptr CFloat)
 
 foreign import ccall safe "raylib.h UnloadWaveSamples"
   c'unloadWaveSamples ::
     Ptr CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h LoadMusicStream_" c'loadMusicStream :: CString -> IO (Ptr Raylib.Types.Music)
+foreign import ccall safe "rl_bindings.h LoadMusicStream_" c'loadMusicStream :: CString -> IO (Ptr Music)
 
-foreign import ccall safe "rl_bindings.h LoadMusicStreamFromMemory_" c'loadMusicStreamFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Raylib.Types.Music)
+foreign import ccall safe "rl_bindings.h LoadMusicStreamFromMemory_" c'loadMusicStreamFromMemory :: CString -> Ptr CUChar -> CInt -> IO (Ptr Music)
 
-foreign import ccall safe "rl_bindings.h IsMusicReady_" c'isMusicReady :: Ptr Raylib.Types.Music -> IO CBool
+foreign import ccall safe "rl_bindings.h IsMusicReady_" c'isMusicReady :: Ptr Music -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadMusicStream_" c'unloadMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadMusicStream_" c'unloadMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h PlayMusicStream_" c'playMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h PlayMusicStream_" c'playMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsMusicStreamPlaying_" c'isMusicStreamPlaying :: Ptr Raylib.Types.Music -> IO CBool
+foreign import ccall safe "rl_bindings.h IsMusicStreamPlaying_" c'isMusicStreamPlaying :: Ptr Music -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UpdateMusicStream_" c'updateMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateMusicStream_" c'updateMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h StopMusicStream_" c'stopMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h StopMusicStream_" c'stopMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h PauseMusicStream_" c'pauseMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h PauseMusicStream_" c'pauseMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h ResumeMusicStream_" c'resumeMusicStream :: Ptr Raylib.Types.Music -> IO ()
+foreign import ccall safe "rl_bindings.h ResumeMusicStream_" c'resumeMusicStream :: Ptr Music -> IO ()
 
-foreign import ccall safe "rl_bindings.h SeekMusicStream_" c'seekMusicStream :: Ptr Raylib.Types.Music -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SeekMusicStream_" c'seekMusicStream :: Ptr Music -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetMusicVolume_" c'setMusicVolume :: Ptr Raylib.Types.Music -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetMusicVolume_" c'setMusicVolume :: Ptr Music -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetMusicPitch_" c'setMusicPitch :: Ptr Raylib.Types.Music -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetMusicPitch_" c'setMusicPitch :: Ptr Music -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetMusicPan_" c'setMusicPan :: Ptr Raylib.Types.Music -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetMusicPan_" c'setMusicPan :: Ptr Music -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h GetMusicTimeLength_" c'getMusicTimeLength :: Ptr Raylib.Types.Music -> IO CFloat
+foreign import ccall safe "rl_bindings.h GetMusicTimeLength_" c'getMusicTimeLength :: Ptr Music -> IO CFloat
 
-foreign import ccall safe "rl_bindings.h GetMusicTimePlayed_" c'getMusicTimePlayed :: Ptr Raylib.Types.Music -> IO CFloat
+foreign import ccall safe "rl_bindings.h GetMusicTimePlayed_" c'getMusicTimePlayed :: Ptr Music -> IO CFloat
 
-foreign import ccall safe "rl_bindings.h LoadAudioStream_" c'loadAudioStream :: CUInt -> CUInt -> CUInt -> IO (Ptr Raylib.Types.AudioStream)
+foreign import ccall safe "rl_bindings.h LoadAudioStream_" c'loadAudioStream :: CUInt -> CUInt -> CUInt -> IO (Ptr AudioStream)
 
-foreign import ccall safe "rl_bindings.h IsAudioStreamReady_" c'isAudioStreamReady :: Ptr Raylib.Types.AudioStream -> IO CBool
+foreign import ccall safe "rl_bindings.h IsAudioStreamReady_" c'isAudioStreamReady :: Ptr AudioStream -> IO CBool
 
-foreign import ccall safe "rl_bindings.h UnloadAudioStream_" c'unloadAudioStream :: Ptr Raylib.Types.AudioStream -> IO ()
+foreign import ccall safe "rl_bindings.h UnloadAudioStream_" c'unloadAudioStream :: Ptr AudioStream -> IO ()
 
-foreign import ccall safe "rl_bindings.h UpdateAudioStream_" c'updateAudioStream :: Ptr Raylib.Types.AudioStream -> Ptr () -> CInt -> IO ()
+foreign import ccall safe "rl_bindings.h UpdateAudioStream_" c'updateAudioStream :: Ptr AudioStream -> Ptr () -> CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsAudioStreamProcessed_" c'isAudioStreamProcessed :: Ptr Raylib.Types.AudioStream -> IO CBool
+foreign import ccall safe "rl_bindings.h IsAudioStreamProcessed_" c'isAudioStreamProcessed :: Ptr AudioStream -> IO CBool
 
-foreign import ccall safe "rl_bindings.h PlayAudioStream_" c'playAudioStream :: Ptr Raylib.Types.AudioStream -> IO ()
+foreign import ccall safe "rl_bindings.h PlayAudioStream_" c'playAudioStream :: Ptr AudioStream -> IO ()
 
-foreign import ccall safe "rl_bindings.h PauseAudioStream_" c'pauseAudioStream :: Ptr Raylib.Types.AudioStream -> IO ()
+foreign import ccall safe "rl_bindings.h PauseAudioStream_" c'pauseAudioStream :: Ptr AudioStream -> IO ()
 
-foreign import ccall safe "rl_bindings.h ResumeAudioStream_" c'resumeAudioStream :: Ptr Raylib.Types.AudioStream -> IO ()
+foreign import ccall safe "rl_bindings.h ResumeAudioStream_" c'resumeAudioStream :: Ptr AudioStream -> IO ()
 
-foreign import ccall safe "rl_bindings.h IsAudioStreamPlaying_" c'isAudioStreamPlaying :: Ptr Raylib.Types.AudioStream -> IO CBool
+foreign import ccall safe "rl_bindings.h IsAudioStreamPlaying_" c'isAudioStreamPlaying :: Ptr AudioStream -> IO CBool
 
-foreign import ccall safe "rl_bindings.h StopAudioStream_" c'stopAudioStream :: Ptr Raylib.Types.AudioStream -> IO ()
+foreign import ccall safe "rl_bindings.h StopAudioStream_" c'stopAudioStream :: Ptr AudioStream -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetAudioStreamVolume_" c'setAudioStreamVolume :: Ptr Raylib.Types.AudioStream -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetAudioStreamVolume_" c'setAudioStreamVolume :: Ptr AudioStream -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetAudioStreamPitch_" c'setAudioStreamPitch :: Ptr Raylib.Types.AudioStream -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetAudioStreamPitch_" c'setAudioStreamPitch :: Ptr AudioStream -> CFloat -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetAudioStreamPan_" c'setAudioStreamPan :: Ptr Raylib.Types.AudioStream -> CFloat -> IO ()
+foreign import ccall safe "rl_bindings.h SetAudioStreamPan_" c'setAudioStreamPan :: Ptr AudioStream -> CFloat -> IO ()
 
 foreign import ccall safe "raylib.h SetAudioStreamBufferSizeDefault"
   c'setAudioStreamBufferSizeDefault ::
     CInt -> IO ()
 
-foreign import ccall safe "rl_bindings.h SetAudioStreamCallback_" c'setAudioStreamCallback :: Ptr Raylib.Types.AudioStream -> Ptr AudioCallback -> IO ()
+foreign import ccall safe "rl_bindings.h SetAudioStreamCallback_" c'setAudioStreamCallback :: Ptr AudioStream -> Ptr AudioCallback -> IO ()
 
-foreign import ccall safe "rl_bindings.h AttachAudioStreamProcessor_" c'attachAudioStreamProcessor :: Ptr Raylib.Types.AudioStream -> Ptr AudioCallback -> IO ()
+foreign import ccall safe "rl_bindings.h AttachAudioStreamProcessor_" c'attachAudioStreamProcessor :: Ptr AudioStream -> Ptr AudioCallback -> IO ()
 
-foreign import ccall safe "rl_bindings.h DetachAudioStreamProcessor_" c'detachAudioStreamProcessor :: Ptr Raylib.Types.AudioStream -> Ptr AudioCallback -> IO ()
+foreign import ccall safe "rl_bindings.h DetachAudioStreamProcessor_" c'detachAudioStreamProcessor :: Ptr AudioStream -> Ptr AudioCallback -> IO ()
 
 foreign import ccall safe "rl_bindings.h AttachAudioMixedProcessor_" c'attachAudioMixedProcessor :: Ptr AudioCallback -> IO ()
 
src/Raylib/Util.hs view
@@ -12,7 +12,7 @@     Vector (normalize, (|-|)),
   )
 
--- | Gets the direction of a camera as a ray
+-- | Gets the direction of a camera as a ray.
 cameraDirectionRay :: Camera3D -> Ray
 cameraDirectionRay camera = Ray (camera3D'position camera) (normalize $ camera3D'target camera |-| camera3D'position camera)