stencil renderbuffer creation not working w/ES2emu

This topic contains 7 replies, has 3 voices, and was last updated by  Tobias Hector 6 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #30592


    When I create a stencil render buffer, no gl errors are reported, but the created buffer has no dimensions or size. This is the relevant code and resulting values:

    when setting up:

    EGLint stencilSize;

    eglGetConfigAttrib(eglDisplay, config, EGL_STENCIL_SIZE , &stencilSize);

    // stencilSize is 8

    later on when creating the renderbuffer:

    GLint maxRenderBufferSize;

    glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &maxRenderBufferSize);

    // maxRenderBufferSize is 2048

    GLuint stencilRenderbufferObject;

    glGenRenderbuffers(1, &stencilRenderbufferObject);

    glBindRenderbuffer(GL_RENDERBUFFER, stencilRenderbufferObject);

    GLenum err = glGetError(); // err is 0

    err = glGetError(); // err is 0

    glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, 512, 512);

    err = glGetError(); // err is 0

    GLint val[9];

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &val[0]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &val[1]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_INTERNAL_FORMAT, &val[2]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_RED_SIZE, &val[3]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_GREEN_SIZE, &val[4]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_BLUE_SIZE, &val[5]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_ALPHA_SIZE, &val[6]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_DEPTH_SIZE, &val[7]);

    glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_STENCIL_SIZE, &val[8]);

    // width is 0

    // height is 0

    // format is GL_STENCIL_INDEX8

    // red size is 0

    // green size is 0

    // blue size is 0

    // alpha size is 0

    // depth size is 0

    // stencil size is 0

    Does the PowerVR OGLES2 emulator on Windows just simply not support a stencil renderbuffer? I didn’t see anything in any docs about it.



    It is a limitation of PVRVFrame (BRN34096) . As a workaround please use an extensionOES_packed_depth_stencil that is provided . So call glRenderbufferStorage with  GL_DEPTH24_STENCIL8_OES . 


    jacekc2011-08-02 17:30:28



    Jacek, thanks for the response.

    Is GL_OES_packed_depth_stencil supported, though? glGetString(GL_EXTENSIONS) does not return that as a supported extension. (It’s also not listed in the supported extensions noted in section 4 of “OGLES PVRFrame.User Manual.1.16f.External.pdf”.)jbuck2011-08-02 20:14:17



    I’m sorry but for the version you are using, it is not there. It will be included within our next release (end of august ). So actually  PVRVFrame that comes from SDK 2.8 does not support Renderbuffer of Stencil format. 

    Thanks for bringing this issue to our attention




    Ahh, cool, I look forward to grabbing that. Is there a list of other features/fixes in that version? I’m using the lib verrry intimately for a port of a PS3/360 game to iOS (using the PowerVR OGLES2.0 “emulator” for a Windows build of the iOS game), so it would be great to find out such details.



    As for our next release, the version that will be part of it is still in heavy development process and there is no list of features / fixes yet. Normally when release is done there are release notes that contains that information. For now on there we are not able to provide such a list of changes.



    Wow, spam is getting more and more clever each day.. this one just merely taking the original post from this thread: At least, I *hope* that was automated..


    Yes that *was* spam, don’t worry 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.