using StgSharp.Control;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public static unsafe partial class Graphic
{
///
/// Creates a window and its associated context.
///
/// Required width
/// Required width
/// Tittle of the window
///
///
/// The handle of created window
///
public static unsafe IntPtr GLcreateWindow(int width, int height, char[] tittle, IntPtr monitor, IntPtr share)
{
IntPtr windowPtr = glIO.InternalGLcreateWindow(width, height, tittle, monitor, share);
if ((int)windowPtr == -1 || (int)windowPtr == -2)
{
throw new Exception("Cannot create window instance!");
}
return windowPtr;
}
///
/// Creates a window and its associated context.
///
/// Required width
/// Required width
/// Tittle of the window
///
///
/// The handle of created window
///
public static unsafe IntPtr GLcreateWindow(int width, int height, string tittle, IntPtr monitor, IntPtr share)
{
IntPtr windowPtr = glIO.InternalGLcreateWindow(width, height, null, monitor, share);
if ((int)windowPtr == -1 || (int)windowPtr == -2)
{
throw new Exception("Cannot create window instance!");
}
return windowPtr;
}
}
}