title: SDL2 -Opengl 3.3+ what's wrong with it?
body: <p>Here is my code:</p>
  
  <pre><code>int main(int argc, char* argv[]) {
  
      if(SDL_Init(SDL_INIT_EVERYTHING) &lt; 0) {
          return false;
      }
      SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
      SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
      SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
      SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
      SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 ) ;
      SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4 ) ;
       if((window = SDL_CreateWindow("SDL opengl",100,100,640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN)) == NULL) {
          return false;
      }
      maincontext = SDL_GL_CreateContext(window);
      SDL_GL_SetSwapInterval(0);
      glewExperimental=true;
      GLenum err=glewInit();
  
      Chapter* chapter1 = new Chapter();
      chapter1-&gt;init();
  
      glClearColor(0.0,0.0,0.0,1.0);
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      gluPerspective(45.0,640.0/480.0,1.0,500.0);
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
  
  
      SDL_Event Event;
  
      while(Running) {
  
          while(SDL_PollEvent(&amp;Event)) {
              event_update(&amp;Event);
          }
          //main loop
  
          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
          glColor3f(1.0f, 1.0f, 1.0f);
  
          glBegin(GL_TRIANGLES);
              glVertex3f(0.0f, 1.0f, 0.0f);
              glVertex3f(-1.0f, -1.0f, 0.0f);
              glVertex3f(1.0f, -1.0f, 0.0f);
          glEnd();
  
          glTranslatef(3.0f, 0.0f, 0.0f);
  
          glBegin(GL_QUADS);
              glVertex3f(-1.0f, 1.0f, 0.0f);
              glVertex3f(1.0f, 1.0f, 0.0f);
              glVertex3f(1.0f, -1.0f, 0.0f);
              glVertex3f(-1.0f, -1.0f, 0.0f);
          glEnd();
          SDL_GL_SwapWindow(window);
  
      }
      return 0;
  }
  </code></pre>
  
  <p>And my problem is that nothing more is visible just the cleared color. What can be the problem with it? (and when Im init.ing there is no error or something) Im using Visual Stuido 2010 if its important.</p>