void glTexCoord2f( GLfloat x, GLfloat y)
{
    AssertFatal( (beginEndMode >= 0), "glTexCoord2f(): called outside glBegin/glEnd");
    CHECK_ARRAY_SIZE( &beginEndTexCoord2f, &beginEndTexCoord2f_alloc, &beginEndTexCoord2f_size, GLfloat, 2 );
    beginEndTexCoord2f[ beginEndTexCoord2f_size*2 ] = x;
    beginEndTexCoord2f[ beginEndTexCoord2f_size*2+1 ] = y;
    beginEndTexCoord2f_size++;
    int glError;
    glError = TEST_FOR_OPENGL_ERRORS
}
void glNormal3f( GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
    AssertFatal( (beginEndMode >= 0), "glNormal3f(): called outside glBegin/glEnd");
    CHECK_ARRAY_SIZE( &beginEndNormal, &beginEndNormal_alloc, &beginEndNormal_size, GLfloat, 3 );
    beginEndNormal[ beginEndNormal_size*3 ] = x;
    beginEndNormal[ beginEndNormal_size*3+1 ] = y;
    beginEndNormal[ beginEndNormal_size*3+2 ] = z;
    beginEndNormal_size++;
    int glError;
    glError = TEST_FOR_OPENGL_ERRORS
}
const char*
LangTypes::getLanguageAsString(LangTypes::language_t langType, 
                               bool fullName)
{
   // Check the array size and add 1 since nbrLanguages is also in list.
   CHECK_ARRAY_SIZE( languageAsString, LangTypes::nbrLanguages + 1);
   if (langType < LangTypes::nbrLanguages) {
      return languageAsString[langType][fullName];
   } else {
      return languageAsString[LangTypes::invalidLanguage][fullName];
   }
}
void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
    AssertFatal( (beginEndMode >= 0), "glVertex3f(): called outside glBegin/glEnd");
    CHECK_ARRAY_SIZE( &beginEndVertex, &beginEndVertex_alloc, &beginEndVertex_size, GLfloat, 4 );
    beginEndVertex[ beginEndVertex_size*4 ] = x;
    beginEndVertex[ beginEndVertex_size*4+1 ] = y;
    beginEndVertex[ beginEndVertex_size*4+2 ] = z;
    beginEndVertex[ beginEndVertex_size*4+3 ] = w;
    beginEndVertex_size++;
    int glError;
    glError = TEST_FOR_OPENGL_ERRORS
}