Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Getting polyvox working in visual studio 2010
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=596
Page 2 of 2

Author:  David Williams [ Sun Jul 20, 2014 12:16 pm ]
Post subject:  Re: Getting polyvox working in visual studio 2010

I don't see exactly what is wrong - can you identify which line is the problem? Perhaps remove other lines and even simplify the offending line if necessary? Just focus on the first error message.

Also be aware that the Ogre example code may not be up-to-date (with respect to PolyVox or Ogre), so you may need to make adjustments if things have changed.

Author:  StenrReisa [ Mon Jul 21, 2014 2:05 am ]
Post subject:  Re: Getting polyvox working in visual studio 2010

The problem is with the following two lines:

for(vector<PolyVox::PositionMaterialNormal>::const_iterator it = mesh.getVertices().begin(); it != mesh.getVertices().end(); ++it)
and
for(vector<uint32_t>::const_iterator it = mesh.getIndices().begin(); it != mesh.getIndices().end(); ++it)

When I mouseover mesh it says there is no suitable user defined conversion, and when i mouseover != it says that no operator matches these operands.

Author:  David Williams [ Mon Jul 21, 2014 10:54 am ]
Post subject:  Re: Getting polyvox working in visual studio 2010

I'm sorry, I don't see what is wrong here. I think you'll have to break it down further to debug. For example, you say this line is the problem:

Code:
for(vector<PositionMaterialNormal>::const_iterator it = mesh.getVertices().begin(); it != mesh.getVertices().end(); ++it)


So what if you remove all the for loop and just try compiling this line:

Code:
vector<PositionMaterialNormal>::const_iterator it = mesh.getVertices().begin();


Or if that doesn't work can you break it down further:

Code:
vector<PositionMaterialNormal> vertices = mesh.getVertices(); // <-- Could also try making a reference here?
vector<PositionMaterialNormal>::iterator = vertices.begin(); // Try with iterator vs. const_iterator?


Can you see where exactly it is failing? Otherwise could you restructure the loop so that it uses indices into the vector instead of iterators?

It could also be that the code is out-of-date with regard to PolyVox/Ogre, to be honest I don't remember exactly how the interface looks so you might have to dive into the PolyVox source code.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/