Results 1 to 3 of 3

Thread: Posting surface to a window...

  1. #1
    Junior Member
    Join Date
    May 2007

    Posting surface to a window...

    I've tried to clear surface and post to a window with below implementation using Khononos OpenVG Sample Reference Implementation.

    Code :
    VGfloat clearColor[4] = { 1.0f, 1.0f, 1.0f, 0.7f };
    vgSetfv( VG_CLEAR_COLOR, 4, blackcolor );

    I think it shows gray color (R = 0.7f, G = 0.7f, B = 0.7f). But the window was filled the white color. It looks like alpha value (0.7f) is ignored.

    Please let me wheather alpha value is ignored posting to a window.


  2. #2
    Senior Member
    Join Date
    Feb 2006
    First check which config you are using - how many bits for each color channel (are you using RGBA 888?
    Next check if the eglCreateWindowSurface() succeded [eglGetError() == EGL_SUCCESS].

    If all is ok at this point, keep in mind that the default VG blend state is SRC_OVER_DST if memory serves. As such you will be blending the translucent white with the default black background producing a gray color. Try clearing with a different color (like red) to make sure this is not what is happening.

    Also I don't see your call to vgClear(). You need to call vgClear after setting your clear color - just setting the clear color and calling swapbuffers will have no effect.

    Good luck.

  3. #3
    Senior Member
    Join Date
    May 2006

    Re: Posting surface to a window...

    vgClear does not apply blending, it always overwrites the color in the framebuffer (but clipping and scissoring are still used).

    Quote Originally Posted by ufocd
    Please let me wheather alpha value is ignored posting to a window.
    Yes, alpha is not a displayable property (well, at least not with current display technology), thus only the RGB part will be shown on screen.

    The code shown is missing vgClear, and "blackcolor" should be "clearColor" instead.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

Similar Threads

  1. Multiuple window surface
    By gpgnews in forum OpenGL ES
    Replies: 2
    Last Post: 06-04-2009, 04:58 AM
  2. Replies: 0
    Last Post: 10-05-2008, 09:44 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
Proudly hosted by Digital Ocean