22 s->
pxs = glGetUniformLocation(s->
program,
"pxs");
25 glGenVertexArrays(1, &s->
vao);
D;
30 glDeleteVertexArrays(1, &s->
vao);
D;
33 void fp64_escaped_start(
struct fp64_escaped *s, GLuint tex, GLuint fbo, GLuint vbo,
double escaperadius2,
int width,
int height,
const mpfr_t centerx0,
const mpfr_t centery0,
const mpfr_t radius0) {
35 glBindFramebuffer(GL_FRAMEBUFFER, fbo);
D;
36 glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 0);
37 GLenum buffers[1] = { GL_COLOR_ATTACHMENT0 };
38 glDrawBuffers(1, buffers);
39 glBindFramebuffer(GL_FRAMEBUFFER, 0);
D;
42 double centerx = mpfr_get_d(centerx0, MPFR_RNDN);
43 double centery = mpfr_get_d(centery0, MPFR_RNDN);
44 double radius = mpfr_get_d(radius0, MPFR_RNDN);
45 double aspect = width / (double) height;
46 glUniform2d(s->
center, centerx, centery);
D;
47 glUniform1d(s->
radius, radius);
D;
48 glUniform1d(s->
aspect, 1 / aspect);
D;
49 glUniform1d(s->
loger2, log(escaperadius2));
D;
50 glUniform1d(s->
pxs, height / (2.0 * radius));
D;
53 glBindVertexArray(s->
vao);
D;
54 glBindBuffer(GL_ARRAY_BUFFER, vbo);
D;
55 glVertexAttribLPointer(s->
cne0, 4, GL_DOUBLE, (
DE ? 8 : 6) *
sizeof(GLdouble), 0);
D;
56 glVertexAttribLPointer(s->
zdz0,
DE ? 4 : 2, GL_DOUBLE, (
DE ? 8 : 6) *
sizeof(GLdouble), ((GLbyte *)0)+(4*
sizeof(GLdouble)));
D;
57 glEnableVertexAttribArray(s->
cne0);
D;
58 glEnableVertexAttribArray(s->
zdz0);
D;
59 glBindBuffer(GL_ARRAY_BUFFER, 0);
D;
60 glBindVertexArray(0);
D;
66 glBindVertexArray(s->
vao);
D;
67 glDrawArrays(GL_POINTS, 0, active_count);
D;
68 glBindVertexArray(0);
D;