Results 1 to 4 of 4

Thread: How can we use same VGPath in multiple threads

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Location
    Noida
    Posts
    6

    How can we use same VGPath in multiple threads

    Hello,

    I am using OpenVG for Map Rendering. I want to know how can i use the vgPath created in one thread and drawing in another thread. This requirements come because I get the map data in different thread, now if I create the vgPath in that thread, VG_NO_CONTEXT error comes. is it possible to create the vgPath in different thread?
    Thanks is advance.

    Sachin

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

    Re: How can we use same VGPath in multiple threads

    Strange - I thought it should be ok to use them directly... odd.

    Anyways, since it's not, create a shared context with the first thread for the second thread (eglCreateContext(display, config, share_context, attribs) and make it current). This will allow you to share resources (like paths) across threads.

    That is, if you are using EGL (if not, there may still be something similar available in whatever you're using). If you're not, I don't really know.

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Location
    Noida
    Posts
    6

    Re: How can we use same VGPath in multiple threads

    Yes, I am using EGL. Also I already tried this thing but when I create the context using eglCreateContext with shared context is not null then it returns into an error EGL_BAD_CONTEXT.

    What might be the issue?

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

    Re: How can we use same VGPath in multiple threads

    The EGL spec says that EGL_BAD_CONTEXT is returned when the share-context is not a valid context of the same client API as the one you're creating. My guess is it's just the driver saying: "I don't support that". Theoretically, it should be working just fine.

    Check with your driver vendor to see if they are limiting contexts to only per application, or if they have some other mechanisms to get past that.

Similar Threads

  1. Incrementing value from multiple threads
    By clamport in forum OpenCL
    Replies: 3
    Last Post: 03-24-2010, 11:15 AM
  2. OpenGL ES calls across multiple threads
    By hbar in forum OpenGL ES general technical discussions
    Replies: 6
    Last Post: 01-15-2009, 04:54 AM

Posting Permissions

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