title: opengl code to display human body graphics, reading vertices from binary file
body: <p>I have a binary file which contains the vertices and normals to make a human body graphics in opengl. The graphics are made up of small  triangles. The numbers (floating points ) in the binary files are in the order,  X, Y, Z of the first vertice of a triangle followed by the normals(x,y,z) to it, Similarly two more of such set completes a triangle.( thus every 18 set of floating numbers in the binary files makes a triangle) and binary files contains several thousands of such triangles.I have written a opengl code in  windows form in c++ , to display the graphics, following is the rendering function.I am ignoring the normals and using only vertices</p>
  
  <pre><code>void OpenGL::RenderScene()
  </code></pre>
  
  <p>{</p>
  
  <pre><code>size_t file_size;
      ifstream file;
      file.open("male_16_do`enter code here`wn.bin",ios::binary|ios::in);
      if(!file){
       cout&lt;&lt;"Couldnt find the file"&lt;&lt;endl;
      }
  
      file.seekg(0,ios::end);
      file_size=file.tellg();
      file_size/=(sizeof(float));
      file.seekg(0,ios::beg);
  
  
  std::vector&lt;float&gt; data(file_size);
  
  file.read(reinterpret_cast&lt;char*&gt;(&amp;data[0]),file_size*sizeof(float)); 
  for(size_t i=0;i&lt;file_size;i++){
    //cout&lt;&lt;fixed&lt;&lt;setprecision(3)&lt;&lt;data[i]&lt;&lt;endl;
  }
  vector&lt;float&gt;::iterator iter;
  
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
  glLoadIdentity();                                   
  glTranslatef(1.5f,1.0f,0.0f);
  for(iter=data.begin();iter!=data.end();iter++){
  
  glBegin(GL_TRIANGLE_STRIP); 
  int i=0;
      glColor3f(1,0.0f,0.0f);                 
  glVertex3f( data[i], data[i+1], data[i+2]);     
    glColor3f(1,0.0f,0.0f);   
  glVertex3f(data[i+6],data[i+7], data[i+8]);                 
    glColor3f(1,0.0f,0.0f);                       
  glVertex3f( data[i+12],data[i+13], data[i+14]);     
  
  glEnd();
  i=i+18;
  }   
  SwapBuffers(m_hDC);
  </code></pre>
  
  <p>}</p>
  
  <p>The code appears to be right , but  on rendering  there is nothing shown in the window, can anyone suggest me what could be possibly wrong here ? Viewport is set to match the width and height of window.</p>