removed gtk dependency

rework
Anton Lydike 5 years ago
parent 7b8b6e844d
commit 450373fb25

4
.gitignore vendored

@ -1,6 +1,4 @@
*.bmp *.bmp
*.png *.png
*.out *.out
out/
!/renders/*.png

@ -5,17 +5,23 @@ Visit the website at [renders.datenvorr.at](https://renders.datenvorr.at)
![infinite spheres](renders/mandelbulb-pow3.png) ![infinite spheres](renders/mandelbulb-pow3.png)
## Compiling: ## Compiling:
in fish:
```fish ```bash
# load requirements # load requirements
nix-shell --run fish nix-shell --run fish
# run gcc with flags # run gcc with flags
gcc (pkg-config --cflags --libs gtk+-3.0 | string split " ") -lm -Wall -Wextra -o march.out main.c gcc -lm -Wall -Wextra -o march.out main.c
``` ```
## Running ## Running
give it the number of threads you want to use give it the number of threads you want to use
```bash ```bash
./march.out <num threads> ./march.out <power> <file name>
``` ```
## Animating the power
Make sure you compiled a version of the program wich takes the power as first arg and target file name as second arg. I would suggest you hardcode the number of threads to use and set up a suitable camera location manually.
Then edit the parameters in the animate script (it's a fish script, just beware of that) and run it. Depending on your parameters this might take a loooong time to complete. The animate script will not show output of each individual render, but instread display a little progress meter showing the percent of frames complete, the starting power, current power, and the power we want to reach.

@ -2,6 +2,6 @@ with import <nixpkgs> {};
stdenv.mkDerivation { stdenv.mkDerivation {
name = "raymarcher-dev-env"; name = "raymarcher-dev-env";
buildInputs = [ buildInputs = [
gtk3 pkgconfig gdb pkgconfig gdb
]; ];
} }

@ -1 +1 @@
Subproject commit a070980af1171f7f7966ba5e8b2fb6ba529feb10 Subproject commit e20f4cb891ae1f6ac34f7572ea6847957b7195db

@ -1,4 +1,3 @@
#include <gtk/gtk.h>
#include <math.h> #include <math.h>
#include "images/images.h" #include "images/images.h"
#include "marcher.h" #include "marcher.h"

@ -1,4 +1,5 @@
#include "../marcher.h" #include "../marcher.h"
#include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/mman.h> #include <sys/mman.h>

@ -1,7 +1,7 @@
#include "../marcher.h" #include "../marcher.h"
#include "../images/images.h" #include "../images/images.h"
#include <limits.h> #include <float.h>
static Image* current_image; static Image* current_image;
static Scene* current_scene; static Scene* current_scene;

Loading…
Cancel
Save