mightymandel v16

GPU-based Mandelbrot set explorer

render.h File Reference

(v16)

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"
+ Include dependency graph for render.h:
+ This graph shows which files directly or indirectly include this file:

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]

Detailed Description

Manage calculation and rendering.

Definition in file render.h.


Data Structure Documentation

struct render_options

Render options state structure.

Should be read-only outside render.c.

Definition at line 42 of file render.h.

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

Definition at line 82 of file render.h.

+ Collaboration diagram for render:
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.

Enumeration Type Documentation

Enumerator:
render_complete 
render_aborted 

Definition at line 72 of file render.h.

Function Documentation

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const char* render_method_name[3]

Definition at line 27 of file render.c.

Referenced by log_result().