Results 1 to 2 of 2

Thread: vgGeti(VG_MAX_IMAGE_WIDTH) returning 0

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    1

    vgGeti(VG_MAX_IMAGE_WIDTH) returning 0

    Hello,

    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
    Posts
    3

    Re: vgGeti(VG_MAX_IMAGE_WIDTH) returning 0

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

    Regards
    Eben

Similar Threads

  1. GetUniformLocation returning -1
    By EricHosick in forum WebGL - General
    Replies: 1
    Last Post: 11-13-2011, 04:32 AM
  2. Returning a single value from kernel!
    By Atmapuri in forum OpenCL
    Replies: 1
    Last Post: 05-10-2011, 04:08 AM
  3. readPixels returning undefined
    By pjsmith88 in forum WebGL - General
    Replies: 1
    Last Post: 04-19-2011, 09:39 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
  •