You could change your DrawBlock function to
DrawBlock(ii, jj, zz);
then do all the glTranslatef() stuff inside it (no matrix operations at all would be in these for loops then). Also multiplying with 1.0 does nothing I'm not sure compiler is smart enough to remove it, maybe if you put all optimizations on.
I'm also guessing that loop further bottlenecks the performance inside DrawBlock().
Bookmarks