public GlPlatformFeature(IAvnGlDisplay display) { _display = display; var immediate = display.CreateContext(null); var deferred = display.CreateContext(immediate); int major, minor; GlInterface glInterface; using (immediate.MakeCurrent()) { var basic = new GlBasicInfoInterface(display.GetProcAddress); basic.GetIntegerv(GlConsts.GL_MAJOR_VERSION, out major); basic.GetIntegerv(GlConsts.GL_MINOR_VERSION, out minor); _version = new GlVersion(GlProfileType.OpenGL, major, minor); glInterface = new GlInterface(_version, (name) => { var rv = _display.GetProcAddress(name); return(rv); }); } GlDisplay = new GlDisplay(display, glInterface, immediate.SampleCount, immediate.StencilSize); ImmediateContext = new GlContext(GlDisplay, immediate, _version); DeferredContext = new GlContext(GlDisplay, deferred, _version); }
public GlContext(GlDisplay display, GlContext sharedWith, IAvnGlContext context, GlVersion version) { _display = display; _sharedWith = sharedWith; Context = context; Version = version; }
public GlPlatformFeature(IAvnGlDisplay display) { var immediate = display.CreateContext(null); var deferred = display.CreateContext(immediate); GlDisplay = new GlDisplay(display, immediate.SampleCount, immediate.StencilSize); ImmediateContext = new GlContext(Display, immediate); DeferredContext = new GlContext(Display, deferred); }
public GlContext(GlDisplay display, IAvnGlContext context) { Display = display; Context = context; }
public GlPlatformSurfaceRenderingSession(GlDisplay display, IAvnGlSurfaceRenderingSession session) { Display = display; _session = session; }
public GlPlatformFeature(IAvnGlFeature feature) { Display = new GlDisplay(feature.ObtainDisplay()); ImmediateContext = new GlContext(Display, feature.ObtainImmediateContext()); }
public GlContext(GlDisplay display, IAvnGlContext context, GlVersion version) { _display = display; Context = context; Version = version; }