Hello…
In my Screensaver a Bird flys over the ground. When he moves i have to repaint the part of the Displaylist (ground) which is overlapped by the Bird. How can i do this ???
I think i missunderstand how the stencilbuffer works … this is my attempt…
INIT:
glClearStencil(0);
glEnable(GL_STENCIL_TEST);
glClear(GL_STENCIL_BUFFER_BIT);
REPAINT:
glStencilMask(bird);
glStencilFunc(GL_EQUAL,1,1);
glStencilOp(GL_KEEP,GL_KEEP,GL_KEEP);
glCallList(ground);
bird and ground are Displaylists