graphics/EGL spec

eglSwapBuffer 이야기

cufe 2010. 8. 3. 23:29
1. SwapBuffer는 double-buffered window surface를 사용하는 application에서만 유효하다.
2. ms windows와 같은 native window system에서의 SwapBuffer는 rendering pipe를 비우고(glFlush), back buffer에 rendering이 complete되면 이 back buffer를 window system에 update하도록 명령한다. 즉, back buffer는 front buffer로 바뀐다.
3. window system이 없는 몇몇 임베디드 시스템에서는 두 개의 back buffer를 두고(double buffering 목적) 이를 on screen으로 copy하는 경우에 vsync를 check한 후에 dma를 하는 방식이 유용할 수 있다.
4. SwapBuffer시, color buffer만 swap하고 다른 framebuffer는 swap하지 않아도 된다.
5. 최근  spec에서는 이전 프레임에 color buffer를 유지하도록 하는 옵션이 추가되었고, 이를 충족하기 위해서는 swap시 buffer를 바꾸는 방식이 아닌 copy방식을 채택할 수도 있다.