forked from nkast/MonoGame
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename _version * GLVersion * use GLVersion
- Loading branch information
Showing
16 changed files
with
105 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright (C)2025 Nick Kastellanos | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Microsoft.Xna.Framework.Graphics | ||
{ | ||
[StructLayout(LayoutKind.Explicit)] | ||
internal struct GLVersion | ||
{ | ||
[FieldOffset(0)] | ||
public short Major; | ||
[FieldOffset(2)] | ||
public short Minor; | ||
|
||
[FieldOffset(0)] | ||
public int PackedValue; | ||
|
||
public GLVersion(short major, short minor) : this() | ||
{ | ||
this.Major = major; | ||
this.Minor = minor; | ||
} | ||
|
||
public GLVersion(int major, int minor) : this() | ||
{ | ||
this.Major = (short)major; | ||
this.Minor = (short)minor; | ||
} | ||
|
||
public static bool operator <(GLVersion l, GLVersion r) | ||
{ | ||
return l.PackedValue < r.PackedValue; | ||
} | ||
|
||
public static bool operator >(GLVersion l, GLVersion r) | ||
{ | ||
return l.PackedValue > r.PackedValue; | ||
} | ||
|
||
public static bool operator <=(GLVersion l, GLVersion r) | ||
{ | ||
return l.PackedValue <= r.PackedValue; | ||
} | ||
|
||
public static bool operator >=(GLVersion l, GLVersion r) | ||
{ | ||
return l.PackedValue >= r.PackedValue; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return String.Format("{0}.{1}", Major, Minor); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters