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

Tutorial for Building PolyVox with CodeBlocks, MinGW, Ogre3D
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=522
Page 1 of 2

Author:  emacaco [ Fri Jul 19, 2013 2:28 am ]
Post subject:  Tutorial for Building PolyVox with CodeBlocks, MinGW, Ogre3D

Hi, I'm new around here and my skills at programming are very rusty. Once upon a time I was a computer science student but the only thing I've done in years and years is some very simple Python scripting. I'm trying to get back into the swing of things but it's been a long time since I had to deal with compiler dependencies and linkers or build systems like Make and I remember almost none of it.

Anyway, I was trying to get Ogre3D set up with PolyVox and found the documentation to be lacking. I found a few threads where people tried to do this and they all seemed to figure it out but they were much smarter than I was and I couldn't follow directly.

To make a long story short, I finally muddled my way through it and finally got it going. In an attempt to save others from the same headaches I had I wrote something of an in-depth tutorial on the wiki from the basics of getting all the tools needed and how to configure them, through building PolyVox and then also setting up CodeBlocks so the wizard will create projects for you that include all the dependencies for both Ogre3D and PolyVox.

The tutorial is here:
https://bitbucket.org/volumesoffun/poly ... d%20Ogre3D

I have to point out at this point that setting up the environment is as far as I've gotten. I'm still muddling through PolyVox and getting code to actually render voxels in Ogre. I'd appreciate any feedback on the tutorial. I don't typically contribute to wikis so the formatting may not be ideal and the organization may need some work.

Author:  David Williams [ Fri Jul 19, 2013 10:58 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Great stuff! We've had a number of people ask about compiling with MinGW, and Ogre is a popular choice of rendering engine so I'm sure many people will find this useful.

I see that you modified the CMakeLists.txt to always use the Boost stuff. Was this really necessary? Boost is intended to support older compilers, whereas more recent compilers should not need to use it as they should have support for C++11.

Author:  emacaco [ Fri Jul 19, 2013 11:14 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

I was just about to post and say that it probably wasn't. I've been messing around with it a bit more and it seems I did a lot of things that I probably didn't need to when all I really needed was to tell the compiler to use it's experimental c++11 mode.

I had been using version 0.2.1 but this morning decided to try compiling the develop version. Everything compiles just fine with no modifications at all as long as the environment is set up correctly. I'll probably rewrite the tutorial to just use C++11 instead as it seems to be working. All it requires is a simple change to the wizard script for CodeBlocks.

I feel somewhat foolish now, but it was a good learning experience.

Author:  David Williams [ Fri Jul 19, 2013 11:38 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

No need to feel foolish - everything in life is easy once you know how to do it ;-)

The next release of PolyVox (0.3) should be similar to the develop version in terms of the build process. For the version after that (0.4) we will probably remove the Boost stuff on the assumption that most compilers support C++11 by then. So using C++11 is the more future-proof approach if you can get it to work.

Author:  emacaco [ Sat Jul 20, 2013 1:26 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Updated to build with C++11 and also added some example code to render a volume in Ogre.

Currently nothing on the wiki links to it though so I don't know if anyone will find it. I'm not sure if you want to link to it from the front page where the other tutorials are.

Author:  David Williams [ Sun Jul 21, 2013 7:11 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Very nice, I added a link to the main page as I hope this will be useful for some people.

Author:  ZetaHunter [ Mon Sep 09, 2013 6:29 pm ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Hey guys I tried following the guide, done everything as it said, now when I get to the point of compiling it threw some problems with the integer's but I fixed that one after some googling.
Now I have a bit more of problem as in process of compilation it throws this
Code:
F:\Programing\C++\Ogre3d\VoxTest\VoxTestApplication.cpp|29|error: variable or field 'createSphereInVolume' declared void|

I am just a newbie at C++ (Like a big one, I had read a book on C++ but that was fwe months ago)
So if anyone could help me with this one it would be grate, cause I really want to play around with voxels!

Author:  David Williams [ Tue Sep 10, 2013 8:19 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Can you show the code which is causing the problem? In the guide the function is indeed declared void (i.e. it doesn't return anything):

Code:
void createSphereInVolume(SimpleVolume<uint8_t>& volData, float fRadius)
{
   ...
}


The example code in the guide also does not attempt to use a return value (as there isn't one):

Code:
createSphereInVolume(volData, 30);


Does this help... and if not can you post some code snippets?

Author:  ZetaHunter [ Tue Sep 10, 2013 11:27 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

Source: http://pastebin.com/QxSkY2HR
Header: http://pastebin.com/34Px4YaP
I hope you can help me, id really love to play with voxels around :D

Author:  David Williams [ Wed Sep 11, 2013 8:55 am ]
Post subject:  Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og

I'm afraid it's not obvious to me what the problem is. Is the error message you gave the first one which is printed? Perhaps you can give the whole output?

Does it compile if you remove the call to 'createSphereInVolume' which is on line 66? What if you also remove the function definition from lines 29 to 60? Or what if you leave the function in place but remove its contents? Do these tests provide any insight into what is going on?

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