nanovg icon indicating copy to clipboard operation
nanovg copied to clipboard

Rendering Artifacts OpenglES2

Open cejasmasmas opened this issue 5 years ago • 3 comments
trafficstars

Hi, first great library, thank you for it, I have an issue with artifacts while rendering, doesn't happen on Windows the other platform i've tested, only on the raspberry pi3B, Everything works fine but, it would seem that it doesn't clear the stencil buffer or is misaligned I took the color wheel from the example and I'm attaching an image, it looks like quads are drawing behind whenever a "hole" is present dump

thank you

cejasmasmas avatar May 14 '20 21:05 cejasmasmas

When you are clearing the framebuffer, are you clearing all the relevant bits ? This works for me:

glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);

mulle-kybernetik-tv avatar Jun 16 '20 19:06 mulle-kybernetik-tv

I recently had the same problem. In my case, the device had chosen a configuration with no stencil buffer. If possible, try adjusting your call to eglChooseConfig:

const EGLint desiredAttributes[] = {
    ...
    EGL_STENCIL_SIZE, 8, // NanoVG requires the stencil buffer
    ...
    EGL_NONE
};
eglChooseConfig(..., desiredAttributes, ...);

Calvin-L avatar Oct 03 '20 00:10 Calvin-L

thank you for your comments, the STENCIL BUFFER is ENABLED, thas is why I find this strange

cejasmasmas avatar Oct 06 '20 15:10 cejasmasmas