Commits

Cliff Biffle committed e5a7f2d

The Quads renderer now takes a parameter specifying the rasterization mode. I had hoped that GL_POINT and GL_LINE could obviate the need for separate point and mesh renderers, but it turns out they're reeeeally slow, at least on my 9400M.

  • Participants
  • Parent commits 24a5525

Comments (0)

Files changed (1)

File KVDepthView.m

 - (void) drawDepthFieldAsPoints;
 - (void) drawDepthFieldAsCards;
 - (void) drawDepthFieldAsMesh;
-- (void) drawDepthFieldAsQuads;
+- (void) drawDepthFieldAsQuadsUsingMode: (GLenum)mode;
 @end
 
 @implementation KVDepthView
   };
 }
 
-- (void) drawDepthFieldAsQuads {
+- (void) drawDepthFieldAsQuadsUsingMode: (GLenum)mode {
   axes();
   
   const GLfloat *depths = [linearDepthField bytes];
   
+  glPolygonMode(GL_FRONT, mode);
   glBegin(GL_QUADS);
   for (int y = 0; y < 479; y++) {
     for (int x = 0; x < 639; x++) {