Results 1 to 2 of 2

Thread: What is the difference bettwen VGImage and EGLSurface?

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    3

    What is the difference bettwen VGImage and EGLSurface?

    What is the difference between a VGImage and an EGLSurface? Or to ask a bit differently: What IS an EGLSurface? The OpenVG spec defines a VGImages as "a rectangular collection of pixels", but that is true for surfaces too, isn't it? The EGL spec just lists some examples for EGLSurfaces, but doesn't define what it IS.

    There are things you can do with images that you can't do with surfaces. For example, you can use an image as surface, but not vice versa. Why is that?

    Thanks.

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

    Re: What is the difference bettwen VGImage and EGLSurface?

    An EGLSurface is part of EGL. Because it's part of EGL, it may or may not be used by other APIs like OpenGL ES, Open GL ES2 or most recently Open GL (as well as OpenVG). A surface is something that can be rendered into. Depending on how it was created, it may be able to display itself onto the screen/where-ever when you call eglSwapBuffers(). As such, surfaces are linked to the display that the driver is designed to run on (displays often support formats that OpenVG does not - like RGB332, luminance-alpha, or 24-bit RGB [so those will be the formats allowed by EGL in the EGLconfig]).

    An VGImage is part of the OpenVG Spec (it's not defined outside OpenVG). The only way you can render into it is if the EGL implementation supports the eglCreatePbufferFromClientBuffer() call and bind a surface to it. Otherwise VGImages cannot be rendered into (i.e. vgDrawPath()) and can only be rendered onto the drawing surface (or used as a paint for rendering onto the drawing surface). They can never be rendered direct to the screen (only to a surface which is then displayed on the screen).

    Ultimately, at the most basic level, both surfaces and images are just a series of pixels, so some implentations may have similar implementations for both under the hood, but that's driver specific. Keep in mind though, that even then there are differences however. Surfaces may need to support things like GL's mip-mapping, and VGImages need to support things like child images, have texture sampling and color conversion functions, etc.

Similar Threads

  1. Opacity animation for VGImage
    By jrabbani in forum OpenVG and VGU
    Replies: 1
    Last Post: 12-23-2010, 10:51 AM
  2. -O0 and -O3 speed difference
    By deNorma in forum OpenCL
    Replies: 2
    Last Post: 01-15-2010, 02:43 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
  •