smrendererv3/SMCode/SM.Base/Utility/Util.cs
Michel Fedde 5bb690e45f 2021-15-03
+ GenericTransformation.InWorldSpace (Merges the object transformation and the last master transformation)
+ Ray class for Raycasting (may not work correctly)
+ Util.CallGarbageCollector() can call the garbage collector.
+ GLWindow.WindowFlags allow to easly switch between Window <-> Borderless Window (this will cause the window to fill the entire screen) <-> Exclusive Fullscreen.

~ Made the bloom-texture scale a constructor-parameter.

SM.OGL:
+ OpenGL-GarbageCollector integration.
+ BoundingBox.GetBounds(Matrix4, out Vector3,out Vector3) allows for easy transformation of the bounding box.
+ GLObjects can now marked as not compiled. Where it always returns false at WasCompiled.

SM2D:
~ Improved the Mouse2D.MouseOver Algorithm.
2021-03-15 18:11:58 +01:00

23 lines
No EOL
464 B
C#

using System;
namespace SM.Utility
{
public class Util
{
public static void Activate(IInitializable obj)
{
if (!obj.IsInitialized)
{
obj.Initialization();
obj.IsInitialized = true;
}
obj.Activate();
}
public static void CallGarbageCollector()
{
GC.Collect();
GC.WaitForPendingFinalizers();
}
}
}