public EvasGlLoader(IntPtr evas) { glEvas = evas; var unmanagedGlApi = evas_gl_api_get(glEvas); api = Marshal.PtrToStructure <EvasGlApi> (unmanagedGlApi); }
public EvasGlLoader(IntPtr evas) { glEvas = evas; var glContext = evas_gl_current_context_get(glEvas); var apiPtr = glContext != IntPtr.Zero ? evas_gl_context_api_get(glEvas, glContext) : evas_gl_api_get(glEvas); api = Marshal.PtrToStructure <EvasGlApi> (apiPtr); }