mightymandel
v16
GPU-based Mandelbrot set explorer
render.h
Go to the documentation of this file.
1
// mightymandel -- GPU-based Mandelbrot Set explorer
2
// Copyright (C) 2012,2013,2014,2015 Claude Heiland-Allen
3
// License GPL3+ http://www.gnu.org/licenses/gpl.html
4
5
#ifndef RENDER_H
6
#define RENDER_H 1
7
13
#include "
fp32_fillc.h
"
14
#include "
fp32_colour.h
"
15
#include "
fp32_init.h
"
16
#include "
fp32_step.h
"
17
#include "
fp32_unescaped.h
"
18
#include "
fp32_escaped.h
"
19
#include "
fp64_init.h
"
20
#include "
fp64_step.h
"
21
#include "
fp64_unescaped.h
"
22
#include "
fp64_escaped.h
"
23
#include "
fpxx_init.h
"
24
#include "
fpxx_approx.h
"
25
#include "
fpxx_step.h
"
26
#include "
fpxx_unescaped.h
"
27
#include "
fpxx_escaped.h
"
28
#include "
ref_set.h
"
29
#include "
blob_set.h
"
30
#include "
completion.h
"
31
#include "
stopwatch.h
"
32
#include "
poll.h
"
33
#include "
slice.h
"
34
35
extern
const
char
*
render_method_name
[3];
36
42
struct
render_options
{
43
enum
render_method_t
method
;
44
bool
calculate_de
;
45
bool
series_approx
;
46
mpfr_t
centerx
;
47
mpfr_t
centery
;
48
mpfr_t
radius
;
49
double
weight
;
50
double
max_glitch
;
51
int
max_blob
;
52
double
sharpness
;
53
bool
show_de
;
54
bool
show_glitches
;
55
bool
save_screenshot
;
56
int
width
;
57
int
height
;
58
int
win_width
;
59
int
win_height
;
60
int
slice
;
61
char
*
filename
;
62
};
63
64
void
render_options_init
(
struct
render_options
*o);
65
void
render_options_end
(
struct
render_options
*o);
66
void
render_options_copy
(
struct
render_options
*o,
const
struct
render_options
*p);
67
void
render_options_set_location
(
struct
render_options
*o,
const
mpfr_t cx,
const
mpfr_t cy,
const
mpfr_t r);
68
69
struct
render
;
// forward declaration
70
struct
idlefunc_t
{ void (*
f
)(
struct
render
*); };
71
72
enum
render_result
{
73
render_complete
,
74
render_aborted
75
};
76
82
struct
render
{
83
bool
begun
;
84
struct
render_options
options
;
85
struct
idlefunc_t
idle
;
86
double
escaperadius2
;
87
GLuint
rgb_tex
;
88
GLuint
tex
;
89
GLuint
tex2
;
90
GLuint
fbo
;
91
GLuint
query
;
92
GLuint
vbo
[2];
93
GLuint
active_count
;
94
struct
fp32_fillc
fp32_fillc
;
95
struct
fp32_colour
fp32_colour
;
96
struct
fp32_init
fp32_init
;
97
struct
fp32_step
fp32_step
;
98
struct
fp32_unescaped
fp32_unescaped
;
99
struct
fp32_escaped
fp32_escaped
;
100
struct
fp64_init
fp64_init
;
101
struct
fp64_step
fp64_step
;
102
struct
fp64_unescaped
fp64_unescaped
;
103
struct
fp64_escaped
fp64_escaped
;
104
struct
fpxx_init
fpxx_init
;
105
struct
fpxx_approx
fpxx_approx
;
106
struct
fpxx_step
fpxx_step
;
107
struct
fpxx_unescaped
fpxx_unescaped
;
108
struct
fpxx_escaped
fpxx_escaped
;
109
int
pass
;
110
struct
ref_set
*
refs
;
111
struct
blob_set
*
blobs
;
112
struct
completion
completion
;
113
struct
completion
completion2
;
114
int
last_active_count
;
115
bool
slice_done
;
116
bool
done
;
117
bool
all_done
;
118
bool
aborted
;
119
bool
timeout
;
120
struct
stopwatch
*
render_time
;
121
struct
slice_table
*
slice_table
;
122
int
slice_n
;
123
struct
poll
*
poll
;
124
};
125
126
void
render_begin
(
struct
render
*s);
127
void
render_end
(
struct
render
*s);
128
void
render_start
(
struct
render
*s,
const
struct
render_options
*o);
129
bool
render_calculate
(
struct
render
*s,
const
struct
render_options
*o,
struct
poll
*
poll
);
130
bool
render_display
(
struct
render
*s,
const
struct
render_options
*o,
struct
poll
*
poll
);
131
bool
render_reshape
(
struct
render
*s,
int
new_width,
int
new_height,
int
new_slice, GLsizei *bytes_allocated);
132
133
enum
render_result
render_do
(
struct
render
*
render
,
struct
render_options
*
render_options
,
struct
poll
*
poll
);
134
135
#endif
src
render.h
Generated on Mon Jan 19 2015 16:18:12 for mightymandel by
1.8.1.2