I have successfully tested the "voxeldemo" sample, located in the samples folder of OCC6.6, but now I am trying to create my own code to draw voxels but the next function in VoxelClient_VisDrawer is failing:
static OpenGl_Element* VisDrawerCallBack (const Graphic3d_CUserDraw* theUserDraw)
if (theUserDraw == 0)
// Retrieve the user structure
Voxel_VisData* aUserData = (Voxel_VisData*) (theUserDraw->Data);
if (aUserData == 0)
VoxelClient_VisDrawer::VisElement *aElem =
new VoxelClient_VisDrawer::VisElement (aUserData);
if (theUserDraw->Bounds != 0)
Everything goes fine until returns... Checking in debug mode, "aElem" contains an "OpenGl_Element" and "myHandler" atributes but in my code, myHandler is correctly initialized but OpenGl_Element is nothing; in debug mode says: "this secondary value (OpenGl_Element) cannot be evaluated".
I don't know what I am doing wrong and I am a bit lost right now. My code is in a DLL and I can draw igs shapes and detect voxels with the mouse cursor in a panel without problems, only drawing voxels is failing in my project.
(I am using c++ and visual studio 2008).
Please let me know if you need more information.