Exemplo n.º 1
0
        void InitializeOpenGL()
        {
            ourDisplay = egl.GetDisplay(new EGLNativeDisplayType(IntPtr.Zero));

            int major, minor;
            bool ret = egl.Initialize(ourDisplay, out major, out minor);

            EGLConfig[] configs = new EGLConfig[10];
            int[] attribList = new int[]
            {
                egl.EGL_RED_SIZE, 5,
                egl.EGL_GREEN_SIZE, 6,
                egl.EGL_BLUE_SIZE, 5,
                egl.EGL_DEPTH_SIZE, 16 ,
                egl.EGL_SURFACE_TYPE, egl.EGL_WINDOW_BIT,
                egl.EGL_STENCIL_SIZE, egl.EGL_DONT_CARE,
                egl.EGL_NONE, egl.EGL_NONE
            };

            int numConfig;
            if (!egl.ChooseConfig(ourDisplay, attribList, configs, configs.Length, out numConfig) || numConfig < 1)
                throw new InvalidOperationException("Unable to choose config.");

            ourConfig = configs[0];
            ourContext = egl.CreateContext(ourDisplay, ourConfig, EGLContext.None, null);
        }
Exemplo n.º 2
0
        public static EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list)
        {
            IntPtr     ptr = eglCreatePbufferSurface(dpy, config, attrib_list);
            EGLSurface ret = new EGLSurface();

            ret.Pointer = ptr;
            return(ret);
        }
Exemplo n.º 3
0
        public static EGLContext CreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list)
        {
            IntPtr ptr = eglCreateContext(dpy, config, share_context, attrib_list);

            EGLContext ret = new EGLContext();

            ret.Pointer = ptr;
            return(ret);
        }
Exemplo n.º 4
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
Exemplo n.º 5
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
Exemplo n.º 6
0
Arquivo: egl.cs Projeto: koush/Xaml
 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();
     ret.Pointer = ptr;
     return ret;
 }
Exemplo n.º 7
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
Exemplo n.º 8
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
Exemplo n.º 9
0
Arquivo: egl.cs Projeto: koush/Xaml
 static extern IntPtr eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
Exemplo n.º 10
0
 static extern IntPtr eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
Exemplo n.º 11
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern bool ChooseConfig(EGLDisplay dpy, int[] attrib_list, EGLConfig[] configs, int config_size, out int num_config);
Exemplo n.º 12
0
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
Exemplo n.º 13
0
Arquivo: egl.cs Projeto: koush/Xaml
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
Exemplo n.º 14
0
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
Exemplo n.º 15
0
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
Exemplo n.º 16
0
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
Exemplo n.º 17
0
 static extern IntPtr eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
Exemplo n.º 18
0
 static extern IntPtr eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
Exemplo n.º 19
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static EGLContext CreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list)
 {
     IntPtr ptr = eglCreateContext(dpy, config, share_context, attrib_list);
     EGLContext ret = new EGLContext();
     ret.Pointer = ptr;
     return ret;
 }
Exemplo n.º 20
0
Arquivo: egl.cs Projeto: koush/Xaml
 public static extern bool GetConfigs(EGLDisplay dpy, EGLConfig[] configs, int config_size, out int num_config);