now I want to use GL_ADI_clear_all_primitives() to clear my previous drawn work, can it clear the specific buffer? that is ,I have two overlay buffer,pingOverlayBuffer and pongOverlayBuffer, if I am going the draw in the pingOverlayBuffer ,I will clear the pongOverlay first.And I have some welcome message. this message will not change, is it possible for the GL_ADI_clear_all_primitives() not clear the welcome messege so that i will call the welcome message function only once instead of called it repeatly. Thanks.
Yes, the API will clear the specific buffer set using API GLUT_ADI_set_draw_overlay().
What you can do is that first set the draw overlay ID as 0, i.e. PingOverlayBuffer, and then draw your welcome message. Now change the overlay ID as 1, PongFrameBuffer and then draw your other primitives.
Please help me understand your display buffer scenario. Are you getting new buffers everytime or using set of display buffer from a circular list?
PingOverlayBuffer and pongOverlay Buffer are got from a circular list. when draw the marks in either of overlayBuffer.then the mark in overlayBuffer will be combined with images captured from camera through PIXC.and the other overlaybuffer will be cleared to prepare for the next marks. I have tried set the draw overlay Id as 0 and 1,however ,only the overlaybuffer which id is set as 0,the mark can be drawn in it .and if the overlay id of the buffer is set as 1.it will not display at all. and there is no mark in the overlay,which can be seen in ImageView.I want to know is there any configuration that will be added if the overlay id is set as 1?
For displaying something drawn on overlay ID 1, you need to set the display overlay ID as 1 too, using API GLUT_ADI_set_disp_overlay().
You are saying that you don't see drawing on overlay 1, even after setting the overlay ID. Have you passed both the overlay buffers in memory array while initializing the graphics engine?