It is currently Sat Aug 22, 2020 4:28 am


All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Tutorial for Building PolyVox with CodeBlocks, MinGW, Ogre3D
PostPosted: Fri Jul 19, 2013 2:28 am 

Joined: Tue Jul 16, 2013 11:15 pm
Posts: 4
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.


Last edited by emacaco on Mon Jul 22, 2013 6:34 pm, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Fri Jul 19, 2013 10:58 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Fri Jul 19, 2013 11:14 am 

Joined: Tue Jul 16, 2013 11:15 pm
Posts: 4
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Fri Jul 19, 2013 11:38 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Sat Jul 20, 2013 1:26 am 

Joined: Tue Jul 16, 2013 11:15 pm
Posts: 4
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Sun Jul 21, 2013 7:11 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Very nice, I added a link to the main page as I hope this will be useful for some people.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Mon Sep 09, 2013 6:29 pm 

Joined: Mon Sep 09, 2013 6:13 pm
Posts: 5
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!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Tue Sep 10, 2013 8:19 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Tue Sep 10, 2013 11:27 am 

Joined: Mon Sep 09, 2013 6:13 pm
Posts: 5
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


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Tutorial for Building PolyVox with CodeBlocks, MinGW, Og
PostPosted: Wed Sep 11, 2013 8:55 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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?


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net