- make sure we don't restart the rendering thread indefinitely, instead we have now a new property RenderThreadRestartRetries which specifies how many times we retry start the rendering thread - we also catch rendering thread exception and save it to the RenderThreadException so that it can be handled in the new RenderingThreadExited event
- which also brings us closer to the upstream OpenTK
- check for EGL_KHR_create_context extension
* Apps crashes with the following message: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Auto Layout still required after executing -layoutSubviews. EAGLView's implementation of -layoutSubviews needs to call super. Fix is to call base.LayoutSubviews (); on LayoutSubviews () in iPhoneOSGameView.
not an NSTimer, the parameter is a CADisplayLink. I am using NSObject, as we do not actually care about the sender, nor do we pass this information. This should fix: 22195
- it governs whether the rendering happens on non-UI thread - this helps with the performance and makes the rendering more fluent, but requires more attention to using the GL context only in the rendering thread - for most fluent rendering set RenderOnUIThread to false and AutoSetContextOnRenderFrame to false. it is also good to disable hardware acceletation for Android UI
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=2139 Added support for creating an additional opengl context. This is accomplished by creating a PBuffer surface to which the new context can be attached. The PBuffer should be created with a fixed power of 2 size for maximum compatability across devices. The actual size of the PBuffer does not really matter as the background context is not usually used for rendering but for loading graphical assets such as textures and shaders. If the device does not support PBuffers then a secondary context will not work. Support for PBuffers is checked by querying the SurfaceType attribute in the Graphics Mode config and ensuring that the PBUFFER_BIT is set. If PBuffers are not supported or when creating the new PBuffer it returns a NoSurface value, an exception will be thrown. Note that for GLES 1.1 some devices report that they support PBuffers but actually lock up when trying to use them. This seems limited to mainly NVIDIA chips. However this does not seem to be the case for GLES 2.0+ With the new PBuffer surface, the context can also be created. The context should use the same config and attributes as the main context otherwise the context creation will fail with an BAD_MATCH error. If for some reason the seconday context cannot be created an exception will be thrown. To create a seconday context use the following code backgroundContext = new AndroidGraphicsContext (GraphicsMode, WindowInfo, GraphicsContext, this.ContextRenderingApi, GraphicsContextFlags.Embedded); To use the background context you MUST first make sure that the primary context is not going to render. This can be accomplished by using a sync/lock object. Next you MUST clear the current context using backgroundContext.MakeCurrent (null); If this is not done any attempt to use the background context will fail. While skipping this step might work on some GPU's its better to do it to make sure you don't get errors. Next you can call backgroundContext.MakeCurrent(WindowInfo); and use the context. I would as recommend calling MakeCurrent(null) again at the end of the background processing just to make sure everything is ready for the primary context to start again.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=8182 Turns out the issue with this particular bug was that we did not clear down the current context prior to shutting down the activity/pausing. This left OpenGL in some kind of weird state where it could not use the surface and context current again until the activity was destroyed.
…me issue with anonymous delegates (ref: bug #20118)
- add the new delegates - added new enums where needed - keep old ones in ES.Obsolete.cs - regenerated ES30.iPhoneOS bindings
- add the new delegates - added new enums where needed - keep old ones in ES.Obsolete.cs - regenerated ES30.Android bindings
- regenerated Enums.cs as well