MVVadim
Posts: 7
Joined: Sat Feb 09, 2013 11:02 am

eglCreateWindowSurface fails

Wed Mar 20, 2013 7:39 am

Hello everybody,
When I create and destroy my egl client (very much the same as the hello_triangle) in a loop, it fails to initialize after 1024 iterations exactly. All the time, without dependency on resolution of textures it is 1024 iterations. Line where it falls:
eglCreateWindowSurface( display, config, &nativewindow, NULL);

Can anybody help to find out the reason?

I tried to put in the same kind of loop hello_triangle example, but there is the same problem after the same 1024 iterations. So it looks like:

Code: Select all

int k=0;
for(k=0; 1; k++){
   bcm_host_init();
   memset(state, 0, sizeof(*state) );
   .....
   exit_func();
   bcm_host_deinit();
   printf("%d\n",k);
}

User avatar
PeterO
Posts: 5829
Joined: Sun Jul 22, 2012 4:14 pm

Re: eglCreateWindowSurface fails

Wed Mar 20, 2013 10:09 am

While this could be a memory leak somewhere, or a missing matching "destroy" in your code, I'm curious why you need to call eglCreateWindowSurface than many times ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

MVVadim
Posts: 7
Joined: Sat Feb 09, 2013 11:02 am

Re: eglCreateWindowSurface fails

Wed Mar 20, 2013 10:21 am

PeterO wrote:While this could be a memory leak somewhere, or a missing matching "destroy" in your code, I'm curious why you need to call eglCreateWindowSurface than many times ?
PeterO
Thanks, indeed I can eliminate it, but still I'm curious to know)

Return to “OpenGLES”