daly update on 20230502 by nitload youmu
This commit is contained in:
@@ -42,17 +42,30 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
internal static unsafe partial class GL
|
||||
{
|
||||
private static IntPtr api;
|
||||
|
||||
private static ref GLcontext Context
|
||||
{
|
||||
get { return ref *(GLcontext*)api; }
|
||||
}
|
||||
private static GLcontext* context;
|
||||
|
||||
public static IntPtr CurrentContextHandle
|
||||
{
|
||||
get { return (IntPtr)api; }
|
||||
set { api = value; }
|
||||
get { return (IntPtr)context; }
|
||||
set
|
||||
{
|
||||
context = (GLcontext*)value;
|
||||
}
|
||||
}
|
||||
|
||||
private static ref GLcontext Context
|
||||
{
|
||||
get
|
||||
{
|
||||
#if DEBUG
|
||||
if ((IntPtr)context==IntPtr.Zero)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
#endif
|
||||
return ref *context;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
Reference in New Issue
Block a user