Last week I was working on a voxel engine (well at least a basic ideea of it) .I scanned a image into a matrix and used red values in each of it's pixels to draw a height map. Here's the really bad part : i drew cubes (this were my voxels)(aprox 100 hy 100) every time i redrew the viewport, and i drew them all. Now I saw a example code (pretty vague) and they were drawing only the voxels that were inside some rays or something like that (I think it was the frustrum).
My question is: How do I do that? or anything that can help me.
P.S. : I used Borland C++ Builder with OpenGL API.