コード例 #1
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool SwapBuffers(EGLDisplay dpy, EGLSurface surface);
コード例 #2
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool DestroySurface(EGLDisplay dpy, EGLSurface surface);
コード例 #3
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
コード例 #4
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static EGLContext CreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list)
 {
     IntPtr ptr = eglCreateContext(dpy, config, share_context, attrib_list);
     if (ptr == IntPtr.Zero)
         throw new GraphicsContextException(String.Format("Failed to create EGL context, error: {0}.", Egl.GetError()));
     return ptr;
 }
コード例 #5
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool ChooseConfig(EGLDisplay dpy, int[] attrib_list, [In, Out] EGLConfig[] configs, int config_size, out int num_config);
コード例 #6
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
コード例 #7
0
ファイル: Egl.cs プロジェクト: RockyTV/opentk
 public static extern EGLSurface CreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType native_window, int[] attrib_list);
コード例 #8
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 //[return: MarshalAsAttribute(UnmanagedType.I1)]
 public static extern bool Initialize(EGLDisplay dpy, out int major, out int minor);
コード例 #9
0
        public GraphicsMode SelectGraphicsMode(ColorFormat color, int depth, int stencil, int samples, ColorFormat accum, int buffers, bool stereo)
        {
            EGLConfig[] configs    = new EGLConfig[1];
            int[]       attribList = new int[]
            {
                //Egl.SURFACE_TYPE, Egl.WINDOW_BIT,

                Egl.RED_SIZE, color.Red,
                Egl.GREEN_SIZE, color.Green,
                Egl.BLUE_SIZE, color.Blue,
                Egl.ALPHA_SIZE, color.Alpha,

                Egl.DEPTH_SIZE, depth > 0 ? depth : 0,
                Egl.STENCIL_SIZE, stencil > 0 ? stencil : 0,

                //Egl.SAMPLE_BUFFERS, samples > 0 ? 1 : 0,
                Egl.SAMPLES, samples > 0 ? samples : 0,

                Egl.NONE,
            };

            // Todo: what if we don't wish to use the default display?
            EGLDisplay display = Egl.GetDisplay(EGLNativeDisplayType.Default);
            int        major, minor;

            if (!Egl.Initialize(display, out major, out minor))
            {
                throw new GraphicsModeException(String.Format("Failed to initialize display connection, error {0}", Egl.GetError()));
            }

            int num_configs;

            if (!Egl.GetConfigs(display, null, 0, out num_configs))
            {
                throw new GraphicsModeException(String.Format("Failed to retrieve GraphicsMode configurations, error {0}", Egl.GetError()));
            }

            if (!Egl.ChooseConfig(display, attribList, configs, configs.Length, out num_configs))
            {
                throw new GraphicsModeException(String.Format("Failed to retrieve GraphicsMode, error {0}", Egl.GetError()));
            }

            // See what we really got
            EGLConfig active_config = configs[0];
            int       r, g, b, a;

            Egl.GetConfigAttrib(display, active_config, Egl.RED_SIZE, out r);
            Egl.GetConfigAttrib(display, active_config, Egl.GREEN_SIZE, out g);
            Egl.GetConfigAttrib(display, active_config, Egl.BLUE_SIZE, out b);
            Egl.GetConfigAttrib(display, active_config, Egl.ALPHA_SIZE, out a);
            int d, s;

            Egl.GetConfigAttrib(display, active_config, Egl.DEPTH_SIZE, out d);
            Egl.GetConfigAttrib(display, active_config, Egl.STENCIL_SIZE, out s);
            int sample_buffers;

            Egl.GetConfigAttrib(display, active_config, Egl.SAMPLES, out sample_buffers);
            Egl.GetConfigAttrib(display, active_config, Egl.SAMPLES, out samples);

            return(new GraphicsMode(active_config.Handle.Value, new ColorFormat(r, g, b, a), d, s, sample_buffers > 0 ? samples : 0, 0, 2, false));
        }
コード例 #10
0
ファイル: Egl.cs プロジェクト: RockyTV/opentk
 public static extern bool QuerySurfacePointerANGLE(EGLDisplay display, EGLSurface surface, int attribute, out IntPtr value);
コード例 #11
0
 public EglWindowInfo(IntPtr handle, EGLDisplay display, EGLSurface surface)
 {
     Handle  = handle;
     Display = display;
     Surface = surface;
 }
コード例 #12
0
 public EglWindowInfo(IntPtr handle, EGLDisplay display)
 {
     Handle  = handle;
     Display = display;
 }
コード例 #13
0
ファイル: Egl.cs プロジェクト: hobum-kwon/opentk
 public static extern EGLSurface CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType native_pixmap, int[] attrib_list);
コード例 #14
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
コード例 #15
0
ファイル: Egl.cs プロジェクト: RockyTV/opentk
 public static extern EGLSurface CreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType native_pixmap, int[] attrib_list);
コード例 #16
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
コード例 #17
0
 public EglWindowInfo(IntPtr handle, EGLDisplay display)
 {
     Handle = handle;
     Display = display;
 }
コード例 #18
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern IntPtr QueryString(EGLDisplay dpy, int name);
コード例 #19
0
 public EglWindowInfo(IntPtr handle, EGLDisplay display, EGLSurface surface)
 {
     Handle = handle;
     Display = display;
     Surface = surface;
 }
コード例 #20
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern  EGLSurface CreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
コード例 #21
0
ファイル: Egl.cs プロジェクト: cwensley/xamarin-macios
 static extern IntPtr eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
コード例 #22
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool QuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
コード例 #23
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
コード例 #24
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool SwapInterval(EGLDisplay dpy, int interval);
コード例 #25
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 public static extern bool DestroyContext(EGLDisplay dpy, EGLContext ctx);
コード例 #26
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
コード例 #27
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 public static extern bool MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
コード例 #28
0
ファイル: Egl.cs プロジェクト: hobum-kwon/opentk
 public static extern EGLSurface CreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType native_window, int[] attrib_list);
コード例 #29
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 public static extern bool QueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, out int value);
コード例 #30
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool QuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
コード例 #31
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
コード例 #32
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
コード例 #33
0
ファイル: Egl.cs プロジェクト: asmboom/PixelFarm
 public static extern bool SwapBuffers(EGLDisplay dpy, EGLSurface surface);
コード例 #34
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool SwapInterval(EGLDisplay dpy, int interval);
コード例 #35
0
ファイル: Egl.cs プロジェクト: jcnossen/upspring.net
 public static EGLDisplay GetDisplay(EGLNativeDisplayType display_id)
 {
     IntPtr ptr = eglGetDisplay(display_id);
     EGLDisplay ret = new EGLDisplay(ptr);
     return ret;
 }
コード例 #36
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 //[return: MarshalAsAttribute(UnmanagedType.I1)]
 public static extern bool Terminate(EGLDisplay dpy);
コード例 #37
0
ファイル: Egl.cs プロジェクト: jcnossen/upspring.net
 public static EGLSurface CreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list)
 {
     IntPtr ptr = eglCreateWindowSurface(dpy, config,  win, attrib_list);
     EGLSurface ret = new EGLSurface(ptr);
     return ret;
 }
コード例 #38
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool GetConfigs(EGLDisplay dpy, EGLConfig[] configs, int config_size, out int num_config);
コード例 #39
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 //[return: MarshalAsAttribute(UnmanagedType.I1)]
 public static extern bool Initialize(EGLDisplay dpy, out int major, out int minor);
コード例 #40
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
コード例 #41
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 //[return: MarshalAsAttribute(UnmanagedType.I1)]
 public static extern bool Terminate(EGLDisplay dpy);
コード例 #42
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
コード例 #43
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern IntPtr QueryString(EGLDisplay dpy, int name);
コード例 #44
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool DestroySurface(EGLDisplay dpy, EGLSurface surface);
コード例 #45
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool GetConfigs(EGLDisplay dpy, EGLConfig[] configs, int config_size, out int num_config);
コード例 #46
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
コード例 #47
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool ChooseConfig(EGLDisplay dpy, int[] attrib_list, [In, Out] EGLConfig[] configs, int config_size, out int num_config);
コード例 #48
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
コード例 #49
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
コード例 #50
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
コード例 #51
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern EGLSurface CreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, IntPtr attrib_list);
コード例 #52
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool DestroyContext(EGLDisplay dpy, EGLContext ctx);
コード例 #53
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
コード例 #54
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool QueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, out int value);
コード例 #55
0
ファイル: Egl.cs プロジェクト: valera6285/opentk
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
コード例 #56
0
ファイル: Egl.cs プロジェクト: White-Wolf/Minesharp
 public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
コード例 #57
0
ファイル: Egl.cs プロジェクト: hobum-kwon/opentk
 public static extern bool QuerySurfacePointerANGLE(EGLDisplay display, EGLSurface surface, int attribute, out IntPtr value);