diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-20 07:41:03 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-20 07:41:03 +0200 |
| commit | 09a819b2ef927adf5239a73f91cdfcefd6774688 (patch) | |
| tree | 8602814faa153aae01acc95a557d45b24c028f3b /inc | |
| parent | 70bf7ac330545f14ab9babddfdf0cb5df9e9ee69 (diff) | |
| download | mandelbrot-09a819b2ef927adf5239a73f91cdfcefd6774688.tar.gz mandelbrot-09a819b2ef927adf5239a73f91cdfcefd6774688.tar.bz2 mandelbrot-09a819b2ef927adf5239a73f91cdfcefd6774688.zip | |
Added colors with 1D texture
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/mandel.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/inc/mandel.h b/inc/mandel.h index a537f87..ca2988e 100644 --- a/inc/mandel.h +++ b/inc/mandel.h @@ -22,15 +22,11 @@ error_check_gl(#x, __FILE__, __LINE__); \ } while (0) -typedef union +typedef struct { - uint32_t data; - struct - { - uint8_t b; - uint8_t g; - uint8_t r; - }; + uint8_t r; + uint8_t b; + uint8_t g; } Color; typedef struct @@ -53,13 +49,12 @@ typedef struct { int width; int height; - - float real_start; - float real_end; - float imag_start; - float imag_end; - + int real_start; + int real_end; + int imag_start; + int imag_end; int iterations; + int texture; } location; } Shader; @@ -103,7 +98,7 @@ void error_clear_gl(void); void error_check_gl(const char *code, const char *filename, int line_num); // color.c -Color *color_palette_new(Color *palette, int iterations); +unsigned int color_texture_new(int iterations); // shader.c bool shader_init(Shader *shader); |
