title: OpenGL 4 GLSL 1282 INVALID OPERATION SIMPLE CODE
body: <p>my problem is not properly drawing simple plane;
  I dont know why i get once error at begining : Invalid Operation 1282.
  Can someone check that?</p>
  
  <p>My variables : 
  <code>GLfloat *tab</code> for verticies plane 
  <code>int *tab2</code> for indecies</p>
  
  <p>this is my init funcion:</p>
  
  <pre><code>// kolor tła - zawartość bufora koloru
  glClearColor( 1.0f, 1.0f, 1.0f, 1.0f );
  
  // wczytanie shaderów i przygotowanie obsługi programu
  program=LoadShaders("shader.vert","shader.frag" );
  
  //Vertexy
  //VertexArrayID;
  glGenVertexArrays(1, &amp;VertexArrayID);
  glBindVertexArray(VertexArrayID);
  
  //Verticies;
  glGenBuffers(1, &amp;Verticies);
  glBindBuffer(GL_ARRAY_BUFFER, Verticies);
  glBufferData( GL_ARRAY_BUFFER,foo*sizeof(GLfloat), tab, GL_STATIC_DRAW );
  
  unsigned int m_ciezarkow[]={0,1,0};
  
  
  //Indicies
  glGenBuffers(1,&amp;Indeksy);
  glBindBuffer(GL_ARRAY_BUFFER,Indeksy);
  glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int)*size, tab2, GL_STATIC_DRAW); 
  
  
  
  glUseProgram( program );
  
  pos_cam=glGetUniformLocation( program, "camera" );
  pos_color=glGetUniformLocation( program, "_color" );
  
  glUseProgram(0);
  </code></pre>
  
  <p>This is my draw function:   </p>
  
  <pre><code>glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glUseProgram(program);
  //my camera
  glUniformMatrix4fv(pos_cam,1,GL_FALSE,&amp;cam.matrix()[0][0]);
  
  //Verticies
  glEnableVertexAttribArray(0);
  glBindBuffer(GL_ARRAY_BUFFER, Verticies);
  glVertexAttribPointer( 0, 3 , GL_FLOAT, GL_FALSE, 0, (void*)0 );
  
  //Masa
  //glEnableVertexAttribArray(1);
  //glBindBuffer(GL_ARRAY_BUFFER, Masa);
  //glVertexAttribPointer( 0, 3 , GL_FLOAT, GL_FALSE, 0, (void*)0 );
  
  //Indicies
  glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,Indeksy);
  
  glDrawElements(GL_TRIANGLES,size,GL_UNSIGNED_INT,(void*)0); 
  glUseProgram( 0 );
  glDisableVertexAttribArray(0);`
  </code></pre>