# eglSwapInterval = 0 tearing problem

**URL:** <https://forums.imgtec.com/t/eglswapinterval-0-tearing-problem/2356>\
**Category:** PowerVR Insider\
**Tags:** pvrtune\
**Created:** [August 26, 2015, 10:45am UTC](https://forums.imgtec.com/t/eglswapinterval-0-tearing-problem/2356 "2015-08-26T10:45:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![zulkarnine](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@zulkarnine](https://forums.imgtec.com/u/zulkarnine)\
**Post date:** [August 27, 2015, 1:21pm UTC](https://forums.imgtec.com/t/eglswapinterval-0-tearing-problem/2356/5 "2015-08-27T13:21:14Z")

</div>

Try this code.  
I’m not convinced that all of the frames always match with the VSYNC just by chance.  
[pre]  
for (int i=0;;i++)  
{  
int colorFlag=i%3;  
colorFlag=(0x01\<\<colorFlag);  
glClearColor(0x01&colorFlag,(0x02&colorFlag)\>\>1,(0x04&colorFlag)\>\>2,1);

```
	glClear(GL_COLOR_BUFFER_BIT);
	eglSwapBuffers( display, surface);
	Sleep(rand()%17);
}

```

[/pre]

---

_[View the full topic](https://forums.imgtec.com/t/eglswapinterval-0-tearing-problem/2356)._
