title: Very basic volume rendering using OpenGL functions (for teaching purposes)
body: <p>I have some students doing a project on volume rendering. I am trying to devise the most basic possible example to get them started.  What I want to do is have a window and set each pixel in the window independently, based on raycasts through the underlying volume dataset. This could easily be done with Windows API functions, for example.  But we want to use OpenGL.</p>
  
  <p>Two ideas I've had:</p>
  
  <ol>
  <li>Use glut to create a window.</li>
  <li>Manually set each pixel in the window using some OpenGL function.</li>
  </ol>
  
  <p>Or, slightly more complex...</p>
  
  <ol>
  <li>Use glut to create a window.</li>
  <li>Create an off-screen texture the same size as the window.</li>
  <li>Set each pixel individually in the texture, based on the results of raycasting.</li>
  <li>Flip the texture to the window contents.</li>
  </ol>
  
  <p>So my question is twofold: is there a better method than these options? and can someone point me to the relevant OpenGL functions to accomplish these methods?</p>