Manage calculation and rendering. More...
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "render.h"
#include "utility.h"
#include "find_ref.h"
#include "atom.h"
#include "logging.h"
#include "mightymandel.h"
#include "image.h"
#include "stopwatch.h"
#include "poll.h"
#include "texture.h"
Go to the source code of this file.
Macros | |
#define | CHECK assert(vbo_bytes > 0 && "--size is too big for my tiny GLsizei, try increasing --slice") |
#define | PINGPONG(fp, FP) |
#define | COLOUR |
Functions | |
void | render_options_init (struct render_options *o) |
void | render_options_end (struct render_options *o) |
void | render_options_set_location (struct render_options *o, const mpfr_t cx, const mpfr_t cy, const mpfr_t r) |
void | render_options_copy (struct render_options *o, const struct render_options *p) |
void | render_begin (struct render *s) |
void | render_end (struct render *s) |
static void | fpX_start (struct render *s) |
bool | render_reshape (struct render *s, int new_width, int new_height, int new_slice, GLsizei *bytes_allocated) |
static bool | render_update_options (struct render *s, const struct render_options *o) |
void | render_start (struct render *s, const struct render_options *o) |
void | render_cont (struct render *s) |
void | render_next_slice (struct render *s) |
void | fp32_start (struct render *s) |
void | fp64_start (struct render *s) |
bool | fpxx_start_atom_abort (void *userdata) |
void | fpxx_start (struct render *s) |
bool | render_calculate (struct render *s, const struct render_options *o, struct poll *poll) |
bool | render_display (struct render *s, const struct render_options *o, struct poll *poll) |
enum render_result | render_do (struct render *render, struct render_options *render_options, struct poll *poll) |
Variables | |
const char * | render_method_name [3] |
Manage calculation and rendering.
Definition in file render.c.
#define CHECK assert(vbo_bytes > 0 && "--size is too big for my tiny GLsizei, try increasing --slice") |
Referenced by render_reshape().
#define COLOUR |
Referenced by render_display().
#define PINGPONG | ( | fp, | |
FP | |||
) |
void fp32_start | ( | struct render * | s | ) |
Definition at line 305 of file render.c.
References render::active_count, render_options::centerx, render_options::centery, render::completion, completion_start(), render::escaperadius2, idlefunc_t::f, render::fbo, render::fp32_escaped, fp32_escaped_start(), render::fp32_fillc, fp32_fillc_do(), render::fp32_init, fp32_init_do(), render::fp32_step, fp32_step_start(), render::fp32_unescaped, fp32_unescaped_start(), render_options::height, render::idle, render::options, render::pass, render::query, render_options::radius, render_options::slice, render::slice_done, render::slice_n, render::slice_table, slice_table_coords(), render::tex, render::tex2, render::vbo, and render_options::width.
Referenced by fpX_start().
void fp64_start | ( | struct render * | s | ) |
Definition at line 319 of file render.c.
References render::active_count, render_options::centerx, render_options::centery, render::completion, completion_start(), render::escaperadius2, idlefunc_t::f, render::fbo, render::fp32_fillc, fp32_fillc_do(), render::fp64_escaped, fp64_escaped_start(), render::fp64_init, fp64_init_do(), render::fp64_step, fp64_step_start(), render::fp64_unescaped, fp64_unescaped_start(), render_options::height, render::idle, render::options, render::pass, render::query, render_options::radius, render_options::slice, render::slice_done, render::slice_n, render::slice_table, slice_table_coords(), render::tex, render::tex2, render::vbo, and render_options::width.
Referenced by fpX_start().
|
static |
Definition at line 419 of file render.c.
References D, render::fbo, fp32_start(), fp64_start(), fpxx_start(), LOG_DEBUG, log_message, render_options::method, render::options, render_method_fp32, render_method_fp64, render_method_fpxx, and render::slice_n.
Referenced by render_cont(), render_next_slice(), and render_start().
void fpxx_start | ( | struct render * | s | ) |
Definition at line 346 of file render.c.
References render::aborted, render::active_count, render::all_done, blob_set_delete(), blob_set_new(), render::blobs, boxperiod(), render_options::centerx, render_options::centery, render::completion, render::completion2, completion_done(), completion_reset(), completion_start(), completion_update(), D, render::escaperadius2, idlefunc_t::f, render::fbo, render::fp32_fillc, fp32_fillc_do(), render::fpxx_approx, fpxx_approx_do(), render::fpxx_escaped, fpxx_escaped_start(), render::fpxx_init, fpxx_init_do(), fpxx_start_atom_abort(), render::fpxx_step, fpxx_step_start(), render::fpxx_unescaped, fpxx_unescaped_start(), render_options::height, render::idle, completion::iteration_target, render::last_active_count, muatom(), render::options, render::pass, pixel_coordinate(), render::query, render_options::radius, ref_set_contains(), ref_set_insert(), ref_set_new(), render::refs, render_options::series_approx, ref_set::set, render_options::slice, render::slice_done, render::slice_n, render::slice_table, slice_table_coords(), render::tex, render::tex2, render::vbo, render_options::width, ref_set_node::x, and ref_set_node::y.
Referenced by fpX_start().
bool fpxx_start_atom_abort | ( | void * | userdata | ) |
Definition at line 333 of file render.c.
References render::aborted, render::poll, poll_abort, poll_continue, poll_display, poll_timeout, poll_ui(), and render::timeout.
Referenced by fpxx_start().
void render_begin | ( | struct render * | s | ) |
Definition at line 90 of file render.c.
References render::active_count, render::begun, render::blobs, D, render::escaperadius2, idlefunc_t::f, render::fbo, render::fp32_colour, fp32_colour_begin(), render::fp32_escaped, fp32_escaped_begin(), render::fp32_fillc, fp32_fillc_begin(), render::fp32_init, fp32_init_begin(), render::fp32_step, fp32_step_begin(), render::fp32_unescaped, fp32_unescaped_begin(), FP64, render::fp64_escaped, fp64_escaped_begin(), render::fp64_init, fp64_init_begin(), render::fp64_step, fp64_step_begin(), render::fp64_unescaped, fp64_unescaped_begin(), render::fpxx_approx, fpxx_approx_begin(), render::fpxx_escaped, fpxx_escaped_begin(), render::fpxx_init, fpxx_init_begin(), render::fpxx_step, fpxx_step_begin(), render::fpxx_unescaped, fpxx_unescaped_begin(), render::idle, render::options, render::query, render::refs, render_options_init(), render::render_time, render::rgb_tex, render::slice_table, slice_table_new(), stopwatch_new(), render::tex, render::tex2, TEX_FILLC, TEX_RAW, TEX_RGB, and render::vbo.
Referenced by main().
bool render_calculate | ( | struct render * | s, |
const struct render_options * | o, | ||
struct poll * | poll | ||
) |
Definition at line 429 of file render.c.
References render::aborted, debug_message, idlefunc_t::f, render::idle, render::poll, poll_abort, poll_continue, poll_display, poll_timeout, poll_ui(), ref_set_delete(), render::refs, render_display(), render_start(), render::render_time, render_update_options(), stopwatch_elapsed(), stopwatch_reset(), and render::timeout.
Referenced by render_do().
void render_cont | ( | struct render * | s | ) |
Definition at line 256 of file render.c.
References render::all_done, debug_message, idlefunc_t::f, fpX_start(), render::idle, LOG_INFO, log_message, render_options::method, render::options, render::pass, render_method_fpxx, and render::slice_n.
Referenced by render_display().
bool render_display | ( | struct render * | s, |
const struct render_options * | o, | ||
struct poll * | poll | ||
) |
Definition at line 455 of file render.c.
References render::aborted, render::all_done, render::blobs, render_options::centerx, render_options::centery, COLOUR, debug_message, render::done, idlefunc_t::f, render_options::filename, find_ref(), find_ref_complete, find_ref_failure, find_ref_success, render::fpxx_approx, render_options::height, render::idle, image_result(), LOG_INFO, log_message, log_result(), render_options::max_blob, render_options::max_glitch, render_options::method, render::pass, render_options::radius, render::refs, render_cont(), render_method_fpxx, render::render_time, result_deep, result_glitch, result_ok, result_timeout, render::slice_done, stopwatch_elapsed(), render::timeout, fpxx_approx::too_deep, and render_options::width.
Referenced by render_calculate(), and render_do().
enum render_result render_do | ( | struct render * | render, |
struct render_options * | render_options, | ||
struct poll * | poll | ||
) |
Definition at line 539 of file render.c.
References render::aborted, render_aborted, render_calculate(), render_complete, render_display(), and render::timeout.
Referenced by main().
void render_end | ( | struct render * | s | ) |
Definition at line 160 of file render.c.
References D, render::fbo, render::fp32_colour, fp32_colour_end(), render::fp32_escaped, fp32_escaped_end(), render::fp32_fillc, fp32_fillc_end(), render::fp32_init, fp32_init_end(), render::fp32_step, fp32_step_end(), render::fp32_unescaped, fp32_unescaped_end(), FP64, render::fp64_escaped, fp64_escaped_end(), render::fp64_init, fp64_init_end(), render::fp64_step, fp64_step_end(), render::fp64_unescaped, fp64_unescaped_end(), render::fpxx_approx, fpxx_approx_end(), render::fpxx_escaped, fpxx_escaped_end(), render::fpxx_init, fpxx_init_end(), render::fpxx_step, fpxx_step_end(), render::fpxx_unescaped, fpxx_unescaped_end(), render::options, render::query, render_options_end(), render::render_time, render::rgb_tex, render::slice_table, slice_table_delete(), stopwatch_delete(), render::tex, render::tex2, and render::vbo.
Referenced by main().
void render_next_slice | ( | struct render * | s | ) |
Definition at line 268 of file render.c.
References render::done, idlefunc_t::f, fpX_start(), render::idle, render::options, render_options::slice, and render::slice_n.
void render_options_copy | ( | struct render_options * | o, |
const struct render_options * | p | ||
) |
Definition at line 66 of file render.c.
References render_options::calculate_de, render_options::centerx, render_options::centery, render_options::height, render_options::max_blob, render_options::max_glitch, render_options::method, render_options::radius, render_options::save_screenshot, render_options::series_approx, render_options::sharpness, render_options::show_de, render_options::show_glitches, render_options::slice, render_options::weight, render_options::width, render_options::win_height, and render_options::win_width.
Referenced by main(), render_start(), and render_update_options().
void render_options_end | ( | struct render_options * | o | ) |
Definition at line 40 of file render.c.
References render_options::centerx, render_options::centery, and render_options::radius.
Referenced by render_end().
void render_options_init | ( | struct render_options * | o | ) |
Definition at line 33 of file render.c.
References render_options::centerx, render_options::centery, and render_options::radius.
Referenced by main(), and render_begin().
void render_options_set_location | ( | struct render_options * | o, |
const mpfr_t | cx, | ||
const mpfr_t | cy, | ||
const mpfr_t | r | ||
) |
Definition at line 46 of file render.c.
References render_options::centerx, render_options::centery, FP64, render_options::height, render_options::method, pxbits(), render_options::radius, render_method_fp32, render_method_fp64, and render_method_fpxx.
Referenced by main(), and poll_ui().
bool render_reshape | ( | struct render * | s, |
int | new_width, | ||
int | new_height, | ||
int | new_slice, | ||
GLsizei * | bytes_allocated | ||
) |
Definition at line 196 of file render.c.
References CHECK, D, DE, render_options::height, render::options, render_options::slice, TEX_FILLC, TEX_RAW, TEX_RGB, render::vbo, and render_options::width.
Referenced by main(), and render_update_options().
void render_start | ( | struct render * | s, |
const struct render_options * | o | ||
) |
Definition at line 242 of file render.c.
References render::all_done, debug_message, render::done, idlefunc_t::f, render::fp32_colour, fp32_colour_clear(), fpX_start(), render_options::height, render::idle, LOG_INFO, log_message, render::options, render::pass, render_options_copy(), render::slice_done, render::slice_n, render::timeout, and render_options::width.
Referenced by render_calculate().
|
static |
Definition at line 228 of file render.c.
References render_options::calculate_de, render_options::centerx, render_options::centery, render_options::height, render_options::method, render::options, render_options::radius, render_options_copy(), render_reshape(), render_options::slice, and render_options::width.
Referenced by render_calculate().
const char* render_method_name[3] |
Definition at line 27 of file render.c.
Referenced by log_result().