Пример #1
0
        ////////////////////////////////////////////////////////////
        /// <summary>
        /// Create the window
        /// </summary>
        /// <param name="mode">Video mode to use</param>
        /// <param name="title">Title of the window</param>
        /// <param name="style">Window style (Resize | Close by default)</param>
        /// <param name="settings">Creation parameters</param>
        ////////////////////////////////////////////////////////////
        public Window(VideoMode mode, string title, Styles style, ContextSettings settings) :
            base(IntPtr.Zero)
        {
            // Copy the title to a null-terminated UTF-32 byte array
            byte[] titleAsUtf32 = System.Text.Encoding.UTF32.GetBytes(title + '\0');

            unsafe
            {
                fixed(byte *titlePtr = titleAsUtf32)
                {
                    SetThis(sfWindow_createUnicode(mode, (IntPtr)titlePtr, style, ref settings));
                }
            }
        }
Пример #2
0
 static extern bool sfVideoMode_isValid(VideoMode Mode);
Пример #3
0
 static extern IntPtr sfWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params);
Пример #4
0
 ////////////////////////////////////////////////////////////
 /// <summary>
 /// Create the window with default creation settings
 /// </summary>
 /// <param name="mode">Video mode to use</param>
 /// <param name="title">Title of the window</param>
 /// <param name="style">Window style (Resize | Close by default)</param>
 ////////////////////////////////////////////////////////////
 public Window(VideoMode mode, string title, Styles style) :
     this(mode, title, style, new ContextSettings(0, 0))
 {
 }