private CreateWindowSurface ( EGLDisplay dpy, EGLConfig config, IntPtr win, int attrib_list ) : EGLSurface | ||
dpy | EGLDisplay | |
config | EGLConfig | |
win | IntPtr | |
attrib_list | int | |
리턴 | EGLSurface |
public void CreateWindowSurface(IntPtr config) { //some gles2 implementation may supports more eglSurfaceConfig //we if (eglSurfaceConfigs == null) { IntPtr vendor = Egl.QueryString(display, Egl.EXTENSIONS); string eglVendor = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(vendor); if (eglVendor.Contains("EGL_NV_post_sub_buffer")) { //we want some extensions ... eglSurfaceConfigs = new int[] { //key, value AngleProjectEglConfig.EGL_POST_SUB_BUFFER_SUPPORTED_NV, 1, Egl.NONE//end config array with zero }; } else { //blank config eglSurfaceConfigs = new int[] { //key, value Egl.NONE//end config array with zero }; } } Surface = Egl.CreateWindowSurface(Display, config, Handle, eglSurfaceConfigs); int error = Egl.GetError(); if (error != Egl.SUCCESS) { throw new GraphicsContextException(String.Format("[Error] Failed to create EGL window surface, error {0}.", error)); } }
public void CreateWindowSurface(IntPtr config) { this.Surface = Egl.CreateWindowSurface(this.Display, config, this.Handle, (int[])null); if (this.Surface == IntPtr.Zero) { throw new GraphicsContextException(string.Format("[Error] Failed to create EGL window surface, error {0}.", (object)Egl.GetError())); } }
public void CreateWindowSurface(IntPtr config) { Surface = Egl.CreateWindowSurface(Display, config, Handle, IntPtr.Zero); if (Surface == IntPtr.Zero) { throw new GraphicsContextException(String.Format( "[EGL] Failed to create window surface, error {0}.", Egl.GetError())); } }
public void CreateWindowSurface(EGLConfig config) { Surface = Egl.CreateWindowSurface(Display, config, Handle, null); int error = Egl.GetError(); if (error != Egl.SUCCESS) { throw new GraphicsContextException(String.Format("[Error] Failed to create EGL window surface, error {0}.", error)); } }
public void CreateWindowSurface(IntPtr config) { int[] eglSurfaceConfigs = new int[] { //key,value AngleProjectEglConfig.EGL_POST_SUB_BUFFER_SUPPORTED_NV, 1, Egl.NONE//end config array with zero }; Surface = Egl.CreateWindowSurface(Display, config, Handle, eglSurfaceConfigs); int error = Egl.GetError(); if (error != Egl.SUCCESS) { throw new GraphicsContextException(String.Format("[Error] Failed to create EGL window surface, error {0}.", error)); } }