diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-19 22:45:04 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-19 22:45:04 +0200 |
| commit | 70bf7ac330545f14ab9babddfdf0cb5df9e9ee69 (patch) | |
| tree | f8d6d124e6ac82e4aadf80ff21310caa7746e84d /inc/mandel.h | |
| parent | 3b2e7cc2347d88dbd8d7697a7cbd8354e7728fc0 (diff) | |
| download | mandelbrot-70bf7ac330545f14ab9babddfdf0cb5df9e9ee69.tar.gz mandelbrot-70bf7ac330545f14ab9babddfdf0cb5df9e9ee69.tar.bz2 mandelbrot-70bf7ac330545f14ab9babddfdf0cb5df9e9ee69.zip | |
Simple (but insanly fast compared to CPU) fragment shader to draw mandelbrot set
Diffstat (limited to 'inc/mandel.h')
| -rw-r--r-- | inc/mandel.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/inc/mandel.h b/inc/mandel.h index f55466c..a537f87 100644 --- a/inc/mandel.h +++ b/inc/mandel.h @@ -51,7 +51,15 @@ typedef struct unsigned int id; struct { - int iteration; + int width; + int height; + + float real_start; + float real_end; + float imag_start; + float imag_end; + + int iterations; } location; } Shader; @@ -64,6 +72,7 @@ typedef struct int height; unsigned int vertex_buf; + unsigned int vertex_array; unsigned int texture; Shader shader; @@ -98,5 +107,6 @@ Color *color_palette_new(Color *palette, int iterations); // shader.c bool shader_init(Shader *shader); +void shader_set_uniforms(Shader *shader, State *state); #endif |
