Imagination PowerVR SDK Blog

OpenVG on X window


#1

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. For EGL I’m linking against the “…/SDKPackage/Builds/OGLES/LinuxPC/Lib/libgles_cm.so.0” library present inside the SDK package.
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

p.s: I have posted the same query in the Khronos forums as well: http://www.khronos.org/message_boards/viewtopic.php?f=6&t=1251
Hoping for a reply from somewhere!


#2
gthm159 wrote:
I'm trying to use the ShivaVG software

implementation for OpenVG, along with the Mesa3D library for OpenGL and

an EGL implementation for GLX. For EGL I'm linking against the ".../SDKPackage/Builds/OGLES/LinuxPC/Lib/libgles_cm.so.0" library present inside the SDK package.

It is not clear to me what you are trying to achieve. The EGL implementation in our PC emulation SDKs only supports the OpenGL ES emulation library, it is not aware of any OpenVG implementation you might be using. Could you explain why exactly you are using this library?

#3

Xmas wrote:

It is not clear to me what you are trying to achieve. The EGL implementation in our PC emulation SDKs only supports the OpenGL ES emulation library, it is not aware of any OpenVG implementation you might be using. Could you explain why exactly you are using this library?


Hi Xmas,

My goal right now is to create an X window and display both 2D (using OpenVG) and 3D (using OpenGL-ES) graphics inside it. To start off with, I'm trying to write two independent programs using OpenVG & OpenGL-ES. Once both these APIs can render into the X window, I plan to combine everything into one program (mixed-rendering).

My independent OpenGL-ES program is running fine, but not the OpenVG one. Do you guys have an SDK (or a shared object) that supports OpenVG (for Linux)?

- Googie
gthm1592008-08-14 20:54:21

#4


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


(edit: For some reason, the image is not appearing here. You can see the output here: http://www.khronos.org/message_boards/download/file.php?id=4)




gthm1592008-08-15 01:50:29

#5
gthm159 wrote:
Hi Xmas,My goal right now is to create an X window and display both 2D (using OpenVG) and 3D (using OpenGL-ES) graphics inside it.

I'm sorry but you cannot (reliably) mix our OpenGL ES emulation library with another graphics library.



In the case of ShivaVG, both it and our OpenGL ES library use OpenGL, and both are designed to be the sole user of the OpenGL context. OpenGL is a state machine, so having the same context used by both libraries means you get an unpredictable mix of state from both libraries.