I did a C++ program performing calculations to get a huge list of voxels (3D pixels). My voxels are objects with parameters describing their first corner position in space (x1,y1,z1) and a side measure.
Now, I want to display these cubes(voxels) in a 3D cartesian plan using glut.
I tried to use the glutSolidCube(dim) function to generate each voxel by looping in my list but it doesn’t work. I tried to place this loop inside the usual, as presented in tutorials, Display function. I feel I’m trying to force an unorthodox method of doing…
Can you point me an example, a reference site or explain the concepts usually used to proceed in such cases. I dont know where to check anymore. I just want to hack my way and then refine my prog.
Make sure that you’re linking with the regular OpenGL libraries, like OPENGL.DLL or GL.DLL (I don’t actually know what it is on Windows, but it’s something like that). That library should define glEnable.
First, thanks to all of you for taking the time to answer my questions.
I fix the compilation issue by going with Visual Studio instead of Codeblocks. It’s sad, cause I prefer CB.
Anyway, I continue my learning of OpenGl with the SuperBible cause my program is just freezing. My list is huge, something like 10^6 entries… and I know my use of the API is just bad. I’m closer by using double buffering, but I think I really need to fill a data structure, which I don’t know yet, and then draw. I’ll give you news once I find my trail.