Results 1 to 8 of 8

Thread: OpenVG on X window

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Location
    Libertyville, IL
    Posts
    10

    OpenVG on X window

    Hi All,

    I'm trying to display some OpenVG stuff on an X-window. The X window gets created, but for some reason the output remains black.
    I can successfully clear the screen which causes the background color to change; but as soon as I try to draw anything (even a small line) the entire screen turns black. Could anybody help me understand what may be causing this behaviour?

    I'm trying to use the ShivaVG software implementation for OpenVG, along with the Mesa3D library for OpenGL and an EGL implementation for GLX.
    One important point is that if I make only OpenGL calls in my application, the output is seen successfully in the X window.

    I have set the "EGL_RENDERABLE_TYPE" attribute to "EGL_OPENVG_BIT" when choosing the config.
    Also, I have called the "vgCreateContextSH" api in the beginning as required by ShivaVG.

    Any help anybody can give will be much appreciated.

    - Googie

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    102

    Re: OpenVG on X window

    My understanding was that ShivaVG was built completely on top of OpenGL, so you should have no need for EGL. I'm guessing your window creation is getting mangled by mixing contexts/surfaces. Have you tried using glut to create a window, then creating the ShivaVG context?

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Location
    Libertyville, IL
    Posts
    10

    Re: OpenVG on X window

    Thanks for your reply Joel.

    You're right, I don't really need EGL in this case because I'm independently creating an X window and trying to render into it. But I want to retain EGL so that I can completely remove all X window creation calls in future and make my app independent of the windowing system.

    Also, I think your guess about mixed up contexts and surfaces is spot-on.
    What would probably work best for me is to have an EGL implementation that supports both OpenVG and OpenGL-ES as the client API. This is almost the exact same requirement as posted by Ajay in his 2nd question here.

    Do you know if there exists such a solution?

    - Googie

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Location
    Libertyville, IL
    Posts
    10

    Re: OpenVG on X window

    Hi All,

    I've been stuck with this the whole day today

    But I tried a few experiments thanks to which I know a little more. I can successfully change the background color to whatever I want.
    But the area on which OpenVG tries to render becomes black.

    If you look at the attached image, I can change the white background to any other color; but the black rectangle stays that way. The black rectangle is actually the OpenVG drawing area, which I have scaled down to be smaller than the window.

    Any idea why this may be happening?

    - Googie
    Attached Images Attached Images

  5. #5
    Junior Member
    Join Date
    Aug 2008
    Posts
    1

    Re: OpenVG on X window

    Hi,
    I ran into this problem myself. The most likely reason is that you have forgotten to request a stencil buffer (something about ShivaVG using the stencil buffer for storing fill volumes).

    Good luck,
    - DL.

  6. #6
    Junior Member
    Join Date
    Jul 2006
    Location
    Rimini, Italy
    Posts
    18

    Re: OpenVG on X window

    Quote Originally Posted by devanl
    (something about ShivaVG using the stencil buffer for storing fill volumes).
    ShivaVG doesn't triangulate paths; this library performs non-simple, concave, holed, ... polygons rendering using this stencil buffer tecnique.
    Michele Fabbri - Mazatech Srl

  7. #7
    Senior Member
    Join Date
    May 2008
    Posts
    102

    Re: OpenVG on X window

    Quote Originally Posted by gthm159
    You're right, I don't really need EGL in this case because I'm independently creating an X window and trying to render into it. But I want to retain EGL so that I can completely remove all X window creation calls in future and make my app independent of the windowing system.
    This may be difficult with ShivaVG as it requires a desktop GL context, it is not implemented as an EGL client API. Which means, there is no integration between ShivaVG and any existing EGL implementation that I'm aware of.

    Quote Originally Posted by gthm159
    What would probably work best for me is to have an EGL implementation that supports both OpenVG and OpenGL-ES as the client API.
    Indeed that would be the ideal solution, but keep in mind, an implementation of either client APIs must be written for a particular implementation of EGL. The EGL specification does not define a common interface between the client APIs and EGL.

    Quote Originally Posted by gthm159
    This is almost the exact same requirement as posted by Ajay in his 2nd question here.
    His question was based on using an EGL based openvg implementation with opengles, ShivaVG does not fall into this category.

    Quote Originally Posted by gthm159
    But I tried a few experiments thanks to which I know a little more. I can successfully change the background color to whatever I want.
    But the area on which OpenVG tries to render becomes black.

    If you look at the attached image, I can change the white background to any other color; but the black rectangle stays that way. The black rectangle is actually the OpenVG drawing area, which I have scaled down to be smaller than the window.

    Any idea why this may be happening?
    By the looks of it, I would guess you're creating a window with glut, then creating an egl window surface. Assuming when you say OpenVG you mean ShivaVG, then as previously mentioned, any ShivaVG calls will render to the desktop GL window, and not the egl window surface. If you're goal is to be able to render to the same surface using ShivaVG and OpenGL, don't use EGL. If your trying to use EGL for portability purpose, you won't be able to using ShivaVG without either porting it to opengles, or using some hack for window creation which would not be portable.

    Quote Originally Posted by mfabbri
    Quote Originally Posted by devanl
    (something about ShivaVG using the stencil buffer for storing fill volumes).
    ShivaVG doesn't triangulate paths; this library performs non-simple, concave, holed, ... polygons rendering using this stencil buffer tecnique.
    That's pretty cool, it's been a pretty hot topic lately in relation to acceleration of openvg using the 3d pipeline.

  8. #8
    Junior Member
    Join Date
    Feb 2012
    Posts
    3

    Re: OpenVG on X window

    Hi all,

    I want to ask the same question, I still didn't undstand how to change the background color using shivavg with glut let's say when i reset the vg clear and us glpostredisplay
    then the screen become black....can any one help. thanks,


    Kathy

Similar Threads

  1. How to draw OpenVG rendering image on MFC window?
    By isen0617 in forum Cross API and window system integration
    Replies: 0
    Last Post: 03-18-2009, 06:01 AM
  2. Window!
    By GoodBud in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 01-19-2006, 03:35 PM

Posting Permissions

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