コード例 #1
0
 public GlxContext(GlxInterface glx, IntPtr handle, GlxDisplay display, X11Info x11, IntPtr defaultXid)
 {
     Handle      = handle;
     Glx         = glx;
     _x11        = x11;
     _defaultXid = defaultXid;
     Display     = display;
 }
コード例 #2
0
 public static GlxGlPlatformFeature TryCreate(X11Info x11, List <GlVersion> glProfiles)
 {
     try
     {
         var disp = new GlxDisplay(x11, glProfiles);
         return(new GlxGlPlatformFeature
         {
             Display = disp,
             DeferredContext = disp.DeferredContext
         });
     }
     catch (Exception e)
     {
         Logger.TryGet(LogEventLevel.Error, "OpenGL")?.Log(null, "Unable to initialize GLX-based rendering: {0}", e);
         return(null);
     }
 }
コード例 #3
0
ファイル: GlxContext.cs プロジェクト: yahiheb/Avalonia
 public GlxContext(GlxInterface glx, IntPtr handle, GlxDisplay display,
                   GlVersion version, int sampleCount, int stencilSize,
                   X11Info x11, IntPtr defaultXid,
                   bool ownsPBuffer)
 {
     Handle       = handle;
     Glx          = glx;
     _x11         = x11;
     _defaultXid  = defaultXid;
     _ownsPBuffer = ownsPBuffer;
     Display      = display;
     Version      = version;
     SampleCount  = sampleCount;
     StencilSize  = stencilSize;
     using (MakeCurrent())
         GlInterface = new GlInterface(version, GlxInterface.SafeGetProcAddress);
 }
コード例 #4
0
ファイル: GlxPlatformFeature.cs プロジェクト: zjmsky/Avalonia
 public static GlxGlPlatformFeature TryCreate(X11Info x11)
 {
     try
     {
         var disp = new GlxDisplay(x11);
         return(new GlxGlPlatformFeature
         {
             Display = disp,
             ImmediateContext = disp.ImmediateContext,
             DeferredContext = disp.DeferredContext
         });
     }
     catch (Exception e)
     {
         Logger.Error("OpenGL", null, "Unable to initialize GLX-based rendering: {0}", e);
         return(null);
     }
 }
コード例 #5
0
 public GlxGlPlatformSurface(GlxDisplay display, GlxContext context, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo info)
 {
     _display = display;
     _context = context;
     _info    = info;
 }
コード例 #6
0
 public GlxContext(IntPtr handle, GlxDisplay display, X11Info x11)
 {
     Handle  = handle;
     _x11    = x11;
     Display = display;
 }