aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests/OpenGL/Extensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/OpenGL/Extensions.cs')
-rw-r--r--Tests/OpenGL/Extensions.cs23
1 files changed, 0 insertions, 23 deletions
diff --git a/Tests/OpenGL/Extensions.cs b/Tests/OpenGL/Extensions.cs
index 17fe6086..0dd1cca6 100644
--- a/Tests/OpenGL/Extensions.cs
+++ b/Tests/OpenGL/Extensions.cs
@@ -35,30 +35,7 @@ namespace Crow
public static bool IsInBetween(this int v, int min, int max){
return v >= min & v <= max;
}
- public static Vector4 UnProject(ref Matrix4 projection, ref Matrix4 view, int[] viewport, Vector2 mouse)
- {
- Vector4 vec;
- vec.X = 2.0f * mouse.X / (float)viewport[2] - 1;
- vec.Y = -(2.0f * mouse.Y / (float)viewport[3] - 1);
- vec.Z = 0f;
- vec.W = 1.0f;
-
- Matrix4 viewInv = Matrix4.Invert(view);
- Matrix4 projInv = Matrix4.Invert(projection);
-
- Vector4.Transform(ref vec, ref projInv, out vec);
- Vector4.Transform(ref vec, ref viewInv, out vec);
-
- if (vec.W > float.Epsilon || vec.W < float.Epsilon)
- {
- vec.X /= vec.W;
- vec.Y /= vec.W;
- vec.Z /= vec.W;
- }
-
- return vec;
- }
}
}