[Mono-bugs] [Bug 635565] Support OpenGLES 2.0 in AndroidGameView

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 30 15:41:37 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=635565

https://bugzilla.novell.com/show_bug.cgi?id=635565#c1


Dominique Louis <Dominique at SavageSoftware.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Dominique at SavageSoftware.co
                   |                            |m.au

--- Comment #1 from Dominique Louis <Dominique at SavageSoftware.com.au> 2010-08-30 19:41:36 UTC ---
I would be happy with an
AndroidGameView.ContextRenderingApi 
and
enum EGLRenderingAPI 
{
  OpenGLES1,
  OpenGLES2,
};

I noticed that AndroidGameView has a context property, but does this actually
map to an EGLContext? 
If it doesn't then some of us will have issues loading textures on a background
thread as we need the ability to store the current OpenGL rendering context and
also its associated ShareGroup, so that it we can switch contexts when on the
Main thread and also a background thread 

Currently on MonoTouch I can do the following, where _view is a pointer to the
currently running iPhoneOSGameView...

_view.MainContext/*local variable*/ = _view.EAGLContext;
_view.ShareGroup/*local variable*/ = _view.MainContext.ShareGroup;
_view.BackgroundContext/*local variable*/ = new
MonoTouch.OpenGLES.EAGLContext(_view.ContextRenderingApi, _view.ShareGroup);

then in the thread where you are loading the textures you need to do something
like this...

// Switch to our shared Context
EAGLContext.SetCurrentContext(_view.BackgroundContext);

// Load your textures here....

// Switch to our main Context
EAGLContext.SetCurrentContext(_view.MainContext);

Anyway worth keeping in mind if adding the MonoTouch compatibility.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list