Manage calculation and rendering. More...
#include "fp32_fillc.h"
#include "fp32_colour.h"
#include "fp32_init.h"
#include "fp32_step.h"
#include "fp32_unescaped.h"
#include "fp32_escaped.h"
#include "fp64_init.h"
#include "fp64_step.h"
#include "fp64_unescaped.h"
#include "fp64_escaped.h"
#include "fpxx_init.h"
#include "fpxx_approx.h"
#include "fpxx_step.h"
#include "fpxx_unescaped.h"
#include "fpxx_escaped.h"
#include "ref_set.h"
#include "blob_set.h"
#include "completion.h"
#include "stopwatch.h"
#include "poll.h"
#include "slice.h"
Go to the source code of this file.
Data Structures | |
struct | render_options |
Render options state structure. More... | |
struct | idlefunc_t |
struct | render |
Render state structure. More... |
Enumerations | |
enum | render_result { render_complete, render_aborted } |
Functions | |
void | render_options_init (struct render_options *o) |
void | render_options_end (struct render_options *o) |
void | render_options_copy (struct render_options *o, const struct render_options *p) |
void | render_options_set_location (struct render_options *o, const mpfr_t cx, const mpfr_t cy, const mpfr_t r) |
void | render_begin (struct render *s) |
void | render_end (struct render *s) |
void | render_start (struct render *s, const struct render_options *o) |
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) |
bool | render_reshape (struct render *s, int new_width, int new_height, int new_slice, GLsizei *bytes_allocated) |
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.h.
struct render_options |
Render options state structure.
Should be read-only outside render.c.
Data Fields | ||
---|---|---|
bool | calculate_de | Calculate distance estimates. |
mpfr_t | centerx | View center (real coordinate). |
mpfr_t | centery | View center (imaginary coordinate). |
char * | filename | The filename that was loaded, or null. |
int | height | Image height in pixels. |
int | max_blob | Maximum glitch blob size in pixels. |
double | max_glitch | Maximum glitch percentage. |
enum render_method_t | method | Calculation method. |
mpfr_t | radius | View radius. |
bool | save_screenshot | Save a screenshot on next display. |
bool | series_approx | Use series approximation optimisation. |
double | sharpness | Interior sharpness threshold. |
bool | show_de | Colour using distance estimates. |
bool | show_glitches | Highlight glitches in ugly colours. |
int | slice | Slice factor (1 << slice in each dimension). |
double | weight | Boundary colouring weight. |
int | width | Image width in pixels. |
int | win_height | Window height in pixels. |
int | win_width | Window width in pixels. |
struct render |
Render state structure.
Should be read-only outside render.c
Data Fields | ||
---|---|---|
bool | aborted | Should rendering be aborted? |
GLuint | active_count | Number of active pixels. |
bool | all_done | Is the rendering complete for multiple references? |
bool | begun | Flag for one-time initializations. |
struct blob_set * | blobs | Collection of blobs. |
struct completion | completion | Completion testing. |
struct completion | completion2 | Completion testing for multiple references. |
bool | done | Is the rendering complete for multiple slices? |
double | escaperadius2 | Squared escape radius. |
GLuint | fbo | Frame buffer object. |
struct fp32_colour | fp32_colour | |
struct fp32_escaped | fp32_escaped | |
struct fp32_fillc | fp32_fillc | |
struct fp32_init | fp32_init | |
struct fp32_step | fp32_step | |
struct fp32_unescaped | fp32_unescaped | |
struct fp64_escaped | fp64_escaped | |
struct fp64_init | fp64_init | |
struct fp64_step | fp64_step | |
struct fp64_unescaped | fp64_unescaped | |
struct fpxx_approx | fpxx_approx | |
struct fpxx_escaped | fpxx_escaped | |
struct fpxx_init | fpxx_init | |
struct fpxx_step | fpxx_step | |
struct fpxx_unescaped | fpxx_unescaped | |
struct idlefunc_t | idle | Next task callback. |
int | last_active_count | History buffer for multiple references completion. |
struct render_options | options | Current rendering options. |
int | pass | Glitch correction pass count. |
struct poll * | poll | |
GLuint | query | Query object. |
struct ref_set * | refs | Collection of reference coordinates. |
struct stopwatch * | render_time | Time since render started. |
GLuint | rgb_tex | Texture to store rgb output. |
bool | slice_done | Is the rendering complete? |
int | slice_n | Index of current slice, in [0, 1 << (slice << 1)). |
struct slice_table * | slice_table | Slice table. |
GLuint | tex | Texture to store raw output. |
GLuint | tex2 | Texture to store reference iterations. |
bool | timeout | Should rendering be stopped cleanly? |
GLuint | vbo | Vertex buffer objects for ping-pong GPGPU. |
enum render_result |
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().
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_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().
const char* render_method_name[3] |
Definition at line 27 of file render.c.
Referenced by log_result().