Results 1 to 2 of 2

Thread: vgGeti(VG_MAX_IMAGE_WIDTH) returning 0

  1. #1
    Email address no longer exists
    Join Date
    Jun 2010

    vgGeti(VG_MAX_IMAGE_WIDTH) returning 0


    I m trying to use EGL over OpenVG to initialize 1 offscreen surface,
    but after initialization, vgGeti() on VG_MAX_IMAGE_WIDTH and HEIGTH
    return 0 instead of something like 2048 ...

    Did I miss something during my initialization ?

    Thank you for your help

    Code :
        egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
        if (!eglInitialize(egl_display, &major, &minor)) {
        if (!eglBindAPI(EGL_OPENVG_API)) {
        if (!eglChooseConfig(egl_display, configAttrs, &config, 1, &numConfigs)) {
        egl_context = eglCreateContext(egl_display, config, EGL_NO_CONTEXT, contextAttrs);
    => check width and height
        if (width > vgGeti (VG_MAX_IMAGE_WIDTH) ||
    	height > vgGeti (VG_MAX_IMAGE_HEIGHT))
    	fprintf(stderr, "Surface creation failed, size %dx%d exceeding %dx%d .\n", width, height, vgGeti (VG_MAX_IMAGE_WIDTH), vgGeti (VG_MAX_IMAGE_HEIGHT));
    	return -1;
        image = vgCreateImage (format, width, height, VG_IMAGE_QUALITY_BETTER);

  2. #2
    Junior Member
    Join Date
    Jul 2010

    Re: vgGeti(VG_MAX_IMAGE_WIDTH) returning 0

    I believe you need to make the context current (and probably create a surface to render to as well).


Similar Threads

  1. Returning a single value from kernel!
    By Atmapuri in forum OpenCL
    Replies: 1
    Last Post: 05-10-2011, 04:08 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
Proudly hosted by Digital Ocean