devwaker / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

esUtil.c mistakes? #453

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
   // Get configs
   if ( !eglGetConfigs(display, NULL, 0, &numConfigs) )
   {
      return EGL_FALSE;
   }

   // Choose config
   if ( !eglChooseConfig(display, configAttribList, &config, 1, &numConfigs) )
   {
      return EGL_FALSE;
   }

I think that there is no need to get the total number of configs, so the first 
if statement can be removed.

The second if statement should be followed by:

if (numConfigs != 1) 
{
return EGL_FALSE;
}

Because eglChooseConfig can return EGL_TRUE even if there are 0 appropriate 
configurations.

Original issue reported on code.google.com by Jason.A....@gmail.com on 25 Jul 2013 at 2:04

GoogleCodeExporter commented 9 years ago
esUtil.c, and everything in the samples/gles2_book directory, come from the 
OpenGL ES 2.0 Programming Guide. The source included in the guide is now being 
maintained in its own Google Code project, so the place to file suspected 
issues would be there: https://code.google.com/p/opengles-book-samples/

Original comment by shannonw...@chromium.org on 30 Jul 2013 at 7:43