예제 #1
0
파일: Application.cs 프로젝트: koush/Xaml
        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);
        }
예제 #2
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
예제 #3
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool GetConfigs(EGLDisplay dpy, EGLConfig[] configs, int config_size, out int num_config);
예제 #4
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool Terminate(EGLDisplay dpy);
예제 #5
0
파일: egl.cs 프로젝트: koush/OpenGLES
 static extern IntPtr eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
예제 #6
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
예제 #7
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool SwapInterval(EGLDisplay dpy, int interval);
예제 #8
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool QuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
예제 #9
0
 public static extern bool GetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute, out int value);
예제 #10
0
 public static extern bool ChooseConfig(EGLDisplay dpy, int[] attrib_list, EGLConfig[] configs, int config_size, out int num_config);
예제 #11
0
 public static extern bool GetConfigs(EGLDisplay dpy, EGLConfig[] configs, int config_size, out int num_config);
예제 #12
0
 public static extern IntPtr QueryString(EGLDisplay dpy, int name);
예제 #13
0
 public static extern bool Terminate(EGLDisplay dpy);
예제 #14
0
 public static extern bool Initialize(EGLDisplay dpy, out int major, out int minor);
예제 #15
0
파일: egl.cs 프로젝트: 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;
 }
예제 #16
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
예제 #17
0
 static extern IntPtr eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
예제 #18
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
예제 #19
0
 static extern IntPtr eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
예제 #20
0
파일: egl.cs 프로젝트: 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;
 }
예제 #21
0
 public static extern EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, int[] attrib_list);
예제 #22
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool SwapBuffers(EGLDisplay dpy, EGLSurface surface);
예제 #23
0
 public static extern bool DestroySurface(EGLDisplay dpy, EGLSurface surface);
예제 #24
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool Initialize(EGLDisplay dpy, out int major, out int minor);
예제 #25
0
 public static extern bool QuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, out int value);
예제 #26
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern IntPtr QueryString(EGLDisplay dpy, int name);
예제 #27
0
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
예제 #28
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool ChooseConfig(EGLDisplay dpy, int[] attrib_list, EGLConfig[] configs, int config_size, out int num_config);
예제 #29
0
 public static extern bool SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value);
예제 #30
0
파일: egl.cs 프로젝트: koush/Xaml
 static extern IntPtr eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, IntPtr win, int[] attrib_list);
예제 #31
0
 public static extern bool ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
예제 #32
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, int[] attrib_list);
예제 #33
0
 public static extern bool SwapInterval(EGLDisplay dpy, int interval);
예제 #34
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool DestroySurface(EGLDisplay dpy, EGLSurface surface);
예제 #35
0
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
예제 #36
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, int buftype, EGLClientBuffer buffer, EGLConfig config, int[] attrib_list);
예제 #37
0
 public static extern bool DestroyContext(EGLDisplay dpy, EGLContext ctx);
예제 #38
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, int buffer);
예제 #39
0
 public static extern bool MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
예제 #40
0
파일: egl.cs 프로젝트: koush/Xaml
 static extern IntPtr eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, int[] attrib_list);
예제 #41
0
 public static extern bool QueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, out int value);
예제 #42
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool DestroyContext(EGLDisplay dpy, EGLContext ctx);
예제 #43
0
 public static extern bool SwapBuffers(EGLDisplay dpy, EGLSurface surface);
예제 #44
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool QueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, out int value);
예제 #45
0
 public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
예제 #46
0
파일: egl.cs 프로젝트: koush/Xaml
 public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
예제 #47
0
파일: egl.cs 프로젝트: koush/Xaml
 public static EGLDisplay GetDisplay(EGLNativeDisplayType display_id)
 {
     IntPtr ptr = eglGetDisplay(display_id);
     EGLDisplay ret = new EGLDisplay();
     ret.Pointer = ptr;
     return ret;
 }