thargor6 / mb3d

Mandelbulb3D
GNU Lesser General Public License v2.1
176 stars 34 forks source link

compiling on linux #1

Closed gambhiro closed 8 years ago

gambhiro commented 8 years ago

Hello, thanks for putting this out in the open!

Do you think there is a chance it would compile on Linux?

For the sake of native performance of course, things are quite laggy through wine.

I'm on Ubuntu 16.10. It has the free pascal compiler, but I'm lost for which file to open and compile.

fraterchaos commented 8 years ago

It is a windows native program, so no, it will NOT compile on Linux... it will, however, run perfectly under WINE.

Be sure you have WINE, wine-mono, and wine-gecko installed on your system, then simply extract the files to a folder (the best place will be under /home/.wine/C:/Program Files_x_86/Mandelbulb3D) then right click the MB3D exe file and chose "open with WINE Windows Program Loader" and it should run fine

If you have any prblems, you can post questions on the "Mandelbulb Maniacs" group on Facebook, lots of helpful people are there.

gambhiro commented 8 years ago

Thanks for the comments.

Btw, do I understand right that this does CPU raymarching? I.e. when it is calculating some params, I should see all CPU cores spin up?

fraterchaos commented 8 years ago

yes indeed. It does NOT use GPU rendering at all (at least in the current incarnation)

It uses CPU only, and when rendering a fractal, (depending on your settings) it will usually use all the power of all your cores.

There is an "Internals" tab in the main window where you can set the number of threads and the priority, so if you do not want it to use all your CPU power, you can limit the number of threads it uses, and set a lower priority if you like.

3Dickulus commented 8 years ago

Has anyone looked at "Lazarus IDE" http://www.lazarus-ide.org/ ? for compiling pascal on linux? I haven't tried yet but apparently it will convert a Delphi project to a Lazarus project and convert the forms to use LCL (lazarus component library) for the GUI dialogs and such, with an option to use Qt ui forms, the source code remains pascal, it uses the free pascal compiler FPC.

gambhiro commented 8 years ago

Yes, I tried compiling with lazarus and also with free pascal fpc. The results were not conclusive, I think I just didn't use them right.

In the project folder in the shell:

lazarus-ide MandelBulb3D.dpr

It opened the file. I tried the Compile and Build actions from the menu, and it did compile something, it produced a 19 MB binary in ~/tmp but I think it compiled some default project.

Also tried fpc MandelBulb3D.dpr, but it couldn't find a Form unit, although fpc -vut MandelBulb3D.dpr printed all the right folders where free pascal was installed on the system.