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

https://bugzilla.novell.com/show_bug.cgi?id=638017#c0


           Summary: Support opengl context sharing across threads
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


Split from bug 635565 .

Comment by 'Dominique Louis':

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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to