Jump to content
  • Advertisement
Sign in to follow this  
Alaric

EGLInterface error C2078: too many initializers

This topic is 4784 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Edit: This is C++ code High everybody. I'm creating an EGLInterface class to encapsulate all of my EGL stuff. But, I'm having a little bit of trouble. Inside my EGLInterface.h header, I create my EGLint configAttribs[] and in my EGLInterface.cpp, I set
const			 EGLint			 configAttribs	= {
		EGL_ALPHA_SIZE,	0,
		EGL_RED_SIZE,	8,
		EGL_GREEN_SIZE,	8,
		EGL_BLUE_SIZE,	8,
		EGL_DEPTH_SIZE,	24,
		EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
		EGL_NONE
		};	




Whenever I compile, I get
errorC2078: too many initializers
Here are the relevant chunks "Cut and Pasted" from my header and source files. Header:

class EGLInterface
{
.
.
.
private:
     EGLint             configAttribs[25]; /*I know this is bigger than it needs to be, but it wouldn't let me define it empty, and whenever I set size equal to 13, it still threw the error C2078.  I just set it to this size to ensure that it was large enough
*/

}




Source
#include "EGLInterface.h"

.
.
.
const			 EGLint			 configAttribs	= {
		EGL_ALPHA_SIZE,	0,
		EGL_RED_SIZE,	8,
		EGL_GREEN_SIZE,	8,
		EGL_BLUE_SIZE,	8,
		EGL_DEPTH_SIZE,	24,
		EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
		EGL_NONE
		};	
.
.
.




any help would be greatly appreciated. ...Also, I sporadically get an error
C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\emulator\GLES\egltypes.h(38): Could not find the file e32def.h.




but, if I compile again (without any changes whatsoever) it magically disappears. Anybody know what causes this?

Share this post


Link to post
Share on other sites
Advertisement
*jaw drops* it's official. I'm retarded. ...Maybe it's a phase of the Moon or something. Earlier today I sat around and stared for 30 minutes at code that wasn't working because I had forgotten to include the header file that I had created for the class (had all of my other includes in it).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!