mightymandel v16

GPU-based Mandelbrot set explorer

mightymandel.c File Reference

(v16)

#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpfr.h>
#include "startup.h"
#include "interact.h"
#include "render.h"
#include "parse.h"
#include "tiling.h"
#include "zoom.h"
#include "record.h"
#include "utility.h"
#include "filename.h"
#include "stopwatch.h"
#include "metadata.h"
#include "vram.h"
#include "poll.h"
#include "version.h"
#include "image.h"
+ Include dependency graph for mightymandel.c:

Go to the source code of this file.

Macros

#define ADD(key, format,...)

Functions

static void motion_handler (GLFWwindow *w, double x, double y)
static void button_handler (GLFWwindow *w, int button, int action, int mods)
static void scroll_handler (GLFWwindow *w, double xoffset, double yoffset)
static void key_press_handler (GLFWwindow *w, int key, int scancode, int action, int mods)
static GLFWwindow * create_window (enum log_level_t level, int major, int minor, int width, int height)
char * collect_metadata_to_string (const char *prefix, struct render_options *render_options, struct tiling *tiling, struct zoom *zoom, int pass)
int main (int argc, char **argv)

Variables

int opengl_error_printout_count = 0
 Counts how many OpenGL errors have been printed, for flood control.
bool FP64 = true
 True if 64bit double precision floating point is available on GPU.
bool DE = true
 True if rendering should use distance estimates.
static double mouse_x = 0
static double mouse_y = 0

Macro Definition Documentation

#define ADD (   key,
  format,
  ... 
)
Value:
do{ \
if (0 <= mpfr_asprintf(&s, format, __VA_ARGS__)) { \
metadata_update(meta, key, s); \
mpfr_free_str(s); \
} \
} while(0)

Referenced by collect_metadata_to_string().

Function Documentation

static void button_handler ( GLFWwindow *  w,
int  button,
int  action,
int  mods 
)
static

Definition at line 48 of file mightymandel.c.

References b_left, b_middle, b_right, interact_mouse(), mouse_x, and mouse_y.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* collect_metadata_to_string ( const char *  prefix,
struct render_options render_options,
struct tiling tiling,
struct zoom zoom,
int  pass 
)
static GLFWwindow* create_window ( enum log_level_t  level,
int  major,
int  minor,
int  width,
int  height 
)
static

Definition at line 107 of file mightymandel.c.

References log_message.

Referenced by main().

+ Here is the caller graph for this function:

static void key_press_handler ( GLFWwindow *  w,
int  key,
int  scancode,
int  action,
int  mods 
)
static

Definition at line 76 of file mightymandel.c.

References interact_keyboard(), k_down, k_left, k_quit, k_right, k_save_screenshot, k_show_glitches, k_up, k_weight_0, k_weight_1, k_weight_2, k_weight_3, k_weight_4, k_weight_5, k_weight_6, k_weight_7, k_weight_8, k_weight_9, k_zoom_in, and k_zoom_out.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 192 of file mightymandel.c.

References render::begun, button_handler(), render_options::calculate_de, zoom::centerx, tiling::centerx, options::centerx, render_options::centerx, zoom::centery, tiling::centery, options::centery, render_options::centery, collect_metadata_to_string(), create_window(), DE, options::file_to_load, render_options::filename, filename_begin(), filename_name(), FP64, options::geometry, options::height, render_options::height, options::help, interact_begin(), interact_end(), options::interactive, key_press_handler(), load_parameter_file(), LOG_ERROR, LOG_FATAL, LOG_INFO, log_level, options::log_level, log_message, LOG_NOTICE, log_result(), log_target, LOG_WARN, options::max_blob, render_options::max_blob, options::max_glitch, render_options::max_glitch, render_options::method, motion_handler(), options::oneshot, options::overhead, parse_command_line(), render::pass, poll_continue, poll_delete(), poll_new(), poll_set_timeout(), poll_ui(), print_banner(), print_usage(), print_version(), zoom::radius, tiling::radius, options::radius, render_options::radius, record_begin(), record_do(), record_end(), render_begin(), render_complete, options::render_de, render_do(), render_end(), render_method_fp32, render_method_fpxx, render_options_copy(), render_options_init(), render_options_set_location(), render_reshape(), result_parse, scroll_handler(), options::series_approx, render_options::series_approx, options::sharpness, render_options::sharpness, render_options::show_de, options::show_glitches, render_options::show_glitches, options::size, options::slice, render_options::slice, stopwatch_elapsed(), stopwatch_new(), stopwatch_reset(), options::tile, options::tile_height, options::tile_width, tiling_begin(), tiling_end(), tiling_next(), poll::timeout, options::timeout, options::version, options::view_supplied, vram_available(), options::weight, render_options::weight, options::width, render_options::width, options::win_height, render_options::win_height, options::win_width, render_options::win_width, options::zoom, zoom_begin(), zoom_end(), options::zoom_frames, and zoom_next().

+ Here is the call graph for this function:

static void motion_handler ( GLFWwindow *  w,
double  x,
double  y 
)
static

Definition at line 41 of file mightymandel.c.

References mouse_x, and mouse_y.

Referenced by main().

+ Here is the caller graph for this function:

static void scroll_handler ( GLFWwindow *  w,
double  xoffset,
double  yoffset 
)
static

Definition at line 62 of file mightymandel.c.

References b_down, b_up, interact_mouse(), mouse_x, and mouse_y.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool DE = true

True if rendering should use distance estimates.

DE is a global variable that should not be modified anywhere apart from main() during startup (ie, before initializing shaders, or anything else that needs it).

Definition at line 33 of file mightymandel.c.

Referenced by compile_shader(), fp32_escaped_start(), fp32_step_start(), fp32_unescaped_start(), fp64_escaped_start(), fp64_step_start(), fp64_unescaped_start(), fpxx_approx_do(), fpxx_escaped_start(), fpxx_step_begin(), fpxx_step_do(), fpxx_step_start(), fpxx_unescaped_start(), main(), and render_reshape().

bool FP64 = true

True if 64bit double precision floating point is available on GPU.

FP64 is a global variable that should not be modified anywhere apart from main() during startup (ie, before initializing shaders, or anything else that needs it).

Definition at line 32 of file mightymandel.c.

Referenced by compile_shader(), main(), render_begin(), render_end(), and render_options_set_location().

double mouse_x = 0
static

Definition at line 37 of file mightymandel.c.

Referenced by button_handler(), motion_handler(), and scroll_handler().

double mouse_y = 0
static

Definition at line 38 of file mightymandel.c.

Referenced by button_handler(), motion_handler(), and scroll_handler().

int opengl_error_printout_count = 0

Counts how many OpenGL errors have been printed, for flood control.

opengl_error_printout_count is a global variable that should not be modified anywhere apart from main() at startup, and the D macro.

Definition at line 31 of file mightymandel.c.