It is currently Sat Aug 22, 2020 12:26 pm


All times are UTC




Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Linux Version of PolyVox
PostPosted: Mon Mar 30, 2009 8:54 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
milliams wrote:
[update]
That change seems to work and then the example builds completely. However, I do get a seg fault when trying to run it. The backtrace is:
Code:
#0  0x0000000000000000 in ?? ()
#1  0x000000000043acb6 in BuildOpenGLSurfacePatch (isp=@0x71ec10)
    at /home/matt/thermite/PolyVox/examples/OpenGL/OpenGLVertexBufferObjectSupport.cpp:34
#2  0x000000000043b378 in OpenGLWidget::setVolume (this=0x7fffffffd8f0, volData=<value optimized out>)
    at /home/matt/thermite/PolyVox/examples/OpenGL/OpenGLWidget.cpp:59
#3  0x00000000004393e1 in main (argc=1, argv=0x7fffffffdb88)
    at /home/matt/thermite/PolyVox/examples/OpenGL/main.cpp:51


I also get a seg fault now, but how do you build a debug version under Linux? Also, do you need to 'make install'? If not (and I didn't) then how does it find the .so files?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Linux Version of PolyVox
PostPosted: Mon Mar 30, 2009 9:38 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
To get debug symbols, you need to set CMAKE_BUILD_TYPE to Debug or RelWithDebInfo. Since you're used to it, you'll probably find it easier to use the cmake gui rather than the raw command line - it's accessed with 'cmake-gui' and it's the same Qt GUI as on Windows.

You don't need to a 'make install' since after a during a 'make' the binaries are built with an RPATH (or RUNPATH, I forget which) which tells the binaries to look in the correct build directory. Upon doing a 'make install' it will remove this RPATH setting before copying them. This is why you'll see CMake relinking all the binaries when you do a make install. See http://www.cmake.org/Wiki/CMake_RPATH_handling for more info.

As an aside: To check whether a library or executable can correctly find it's dynamic libraries as well as which versions it's linking against you can use the 'ldd' command on the .so or executable files.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Linux Version of PolyVox
PostPosted: Thu Apr 02, 2009 9:52 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I fixed it :-) Well, kind of. Open OpenGLWidget.cpp, go to OpenGLWidget::initializeGL(), and change the first line to:

Code:
m_bUseOpenGLVertexBufferObjects = false;


Changing this value from true to false causes the application to use OpenGL 'immediate mode', rather than trying to load extensions though GLEW. Immediate mode is much slower then using vertex buffer objects but at least it does work.

I'll have to look into getting vertex buffer objects working when I have a proper Linux installation, i.e. not though VirtualBox. But VirtualBox is supreamly cool - it's nice to just alt-tab between Windows and Linux!

Note that the demo deon't really do anything yet - you can't even rotate the model. But it will come...


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Linux Version of PolyVox
PostPosted: Thu Apr 02, 2009 10:48 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
David Williams wrote:
Immediate mode is much slower then using vertex buffer objects but at least it does work.
Yup, that fixes it for me too

David Williams wrote:
But VirtualBox is supreamly cool - it's nice to just alt-tab between Windows and Linux!
Yeah, it's a great piece of kit. In full integration mode (from the addons package) you can even have individual windows from one OS as windows in the host OS. Seamless :)

_________________
Matt Williams
Linux/CMake guy


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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