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

[Resolved]Compiler errors in opengl example project
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=15&t=311
Page 1 of 1

Author:  drwbns [ Wed Jan 11, 2012 7:55 pm ]
Post subject:  [Resolved]Compiler errors in opengl example project

Hello, I was trying to build the latest PolyVox from download page and I ran into this error when building the solution in VS2008, is there a fix for it? -

Code:
Error   1   error C2782: 'PolyVox::Vector<Size,Type> PolyVox::operator /(const PolyVox::Vector<Size,Type> &,const Type &) throw()' : template parameter 'Type' is ambiguous   c:\Users\Andrew\Downloads\PolyVox-GIT-2e4bf67\examples\OpenGL\Shapes.cpp   33   OpenGLExample

Author:  David Williams [ Wed Jan 11, 2012 8:57 pm ]
Post subject:  Re: Compiler errors in opengl example project

I'm not sure why it's ambiguous... can you try replacing:

Code:
//This vector hold the position of the center of the volume
Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner()) / 2;


with:

Code:
//This vector hold the position of the center of the volume
Vector3DInt32 v3dVolCenter = (volData.getEnclosingRegion().getUpperCorner() - volData.getEnclosingRegion().getLowerCorner());
int32_t divisor = 2;
v3dVolCenter = v3dVolCenter / divisor;


Does it give the same error?

Author:  drwbns [ Thu Jan 12, 2012 3:03 pm ]
Post subject:  Re: Compiler errors in opengl example project

Yes, that worked. But why?

Author:  David Williams [ Thu Jan 12, 2012 4:09 pm ]
Post subject:  Re: [Resolved]Compiler errors in opengl example project

I don't exactly know... can you change it back to how it was, rebuild, and give me the full compiler output (not just the list of errors)? I think in there it should say what the candidates are.

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