Results 1 to 2 of 2

Thread: eglTerminate()

  1. #1
    Senior Member
    Join Date
    Feb 2006
    Posts
    115

    eglTerminate()

    Small question:

    If a context is current, my reading of the spec is that it's resources should not be immediately released until after a eglMakeCurrent().

    Termination marks all EGL-specific resources associated with the specified display
    for deletion. If contexts or surfaces created with respect to dpy are current (see
    section 3.7.3) to any thread, then they are not actually released while they remain
    current. Such contexts and surfaces will be destroyed, and all future references to
    them will become invalid, as soon as any otherwise valid eglMakeCurrent call is
    made from the thread they are bound to.
    But doesn't terminating the display, invalidate the parameters needed by the eglMakeCurrent(display, read, write, context) call? I.e. the function must return an EGL_NOT_INITIALIZED error? Or should eglMakeCurrent(display, NULL, NULL, NULL); work even if the display has been terminated. I feel like I'm missing something obvious.

    It would make most sense to me if eglTerminate(display) did an implicit eglMakeCurrent(display, 0,0,0);, otherwise I fear memory leaks are unvoidable.

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: eglTerminate()

    The display parameter to eglMakeCurrent is required to identify the context and surfaces. If you use EGL_NO_CONTEXT/EGL_NO_SURFACE there is no need for a display, therefore you can use EGL_NO_DISPLAY.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •