Esempio n. 1
0
 public static void GetVideoModeValues(GLFWVideoMode vidmode, out int width, out int height, out int redbits, out int greenbits, out int bluebits, out int refreshrate)
 {
     width       = vidmode.Width;
     height      = vidmode.Height;
     redbits     = vidmode.RedBits;
     greenbits   = vidmode.GreenBits;
     bluebits    = vidmode.BlueBits;
     refreshrate = vidmode.RefreshRate;
 }
Esempio n. 2
0
        internal static unsafe GLFWVideoMode[] __LoadVideoModes(GLFWMonitor monitor, out GLFWVideoMode activeMode)
        {
            IntPtr *nptrArr = Glfw_HelperFunctions.__GetVideoModes(monitor.Handle, out int count);
            IntPtr  active  = Glfw.__GetVideoMode(monitor.Handle);

            GLFWVideoMode[] modeArr = new GLFWVideoMode[count];
            activeMode = null;

            for (int i = 0; i < count; i++)
            {
                modeArr[i] = new GLFWVideoMode(nptrArr[i]);
                if (nptrArr[i].Equals(active))
                {
                    activeMode = modeArr[i];
                }
            }

            //Cleanup the array we created to store the pointers to the videomodes.
            Glfw_HelperFunctions.__DeleteVideoModeArr(nptrArr);

            return(modeArr);
        }