Stencil Buffer on the Dell Axim X51v

gio

Newcomer
I'm developing graphics applications for the Dell PDA's, specifically for the models with the Intel 2700G graphics accelerator (MBX based graphics hardware). According to the white papers on tile-based rendering published by PowerVR (who developed the MBX technology), stenciling is supported and it's certainly supported by OpenGL ES, but when I try to query for a config, I can't find out that supports a stencil buffer. Anyone have any idea if this graphics implementation actually supports stenciling? Also, I've had issues trying to read from the framebuffer using glReadPixels. Does anyone have any experience with graphics programming on these devices?
Thanks.
 
Try the code I pasted below. It requests a minimum of 1-bit stencil buffer. eglChooseConfig will return a config if it can meet (or exceed) these minimum requirements. If a config is returned you can query it to see how many stencil bits it contains, otherwise your platform likely does not support stencil.

Code:
static void initialize_egl(void)
{
    EGLConfig config[1];
    EGLint num_configs;
    EGLint value;
    EGLint major_ver, minor_ver;
    
    const EGLint config_attribs[] = {
        EGL_BUFFER_SIZE, window_bpp,
        EGL_DEPTH_SIZE,  window_depth,
        EGL_STENCIL_SIZE, 1
        EGL_NONE,
    };
    
    dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);

    eglInitialize(dpy, &major_ver, &minor_ver);

    eglChooseConfig(dpy, config_attribs, config, 1, &num_configs);

    if (num_configs == 0) {
        printf("No configurations can meet the specified requirements\n");
        exit(0);
    }

    eglGetConfigAttrib(dpy, config[0], EGL_STENCIL_BITS, &stncl_value);

    printf("number of stencil bits: %i\n", stncl_value);

    sfc = eglCreateWindowSurface(dpy, config[0], NULL, NULL);

    ctx = eglCreateContext(dpy, config[0], NULL, NULL);

    eglMakeCurrent(dpy, sfc, sfc, ctx);
}
 
Last edited by a moderator:
Hate to disappoint you, but this platform does not support a stencil buffer.

gio said:
Also, I've had issues trying to read from the framebuffer using glReadPixels.
What kind of issues are you encountering exactly? Feel free to contact devrel@powervr.com if you see unexpected behaviour from the OpenGL ES driver.
 
Thanks for the code. That's pretty much exactly what I've already done though. In fact I also wrote a program that iterated through all the available configs (there were only 3) and checked to see if any had a stencil buffer. None of them did. So, yes, it definitely seems like there isn't support for stenciling, but I'm still pretty surprised about it. Thanks again.
 
Xmas said:
Hate to disappoint you, but this platform does not support a stencil buffer.


What kind of issues are you encountering exactly? Feel free to contact devrel@powervr.com if you see unexpected behaviour from the OpenGL ES driver.

I'm sort of surprised about the lack of a stencil buffer. All the info I find out the PowerVR website (which isn't much) implies that they support stencil buffers.

glReadPixels never returned any data. In fact, it left the buffer that I passed to it completely untouched. No error was returned. I'll see if I can find the code I was using and I'll post it here.
 
Back
Top