25 glGenVertexArrays(1, &s->
vao);
D;
30 glDeleteVertexArrays(1, &s->
vao);
D;
33 void fp32_escaped_start(
struct fp32_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) {
34 double centerx = mpfr_get_d(centerx0, MPFR_RNDN);
35 double centery = mpfr_get_d(centery0, MPFR_RNDN);
36 double radius = mpfr_get_d(radius0, MPFR_RNDN);
37 double aspect = width / (double) height;
38 glBindFramebuffer(GL_FRAMEBUFFER, fbo);
D;
39 glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 0);
D;
40 GLenum buffers[1] = { GL_COLOR_ATTACHMENT0 };
41 glDrawBuffers(1, buffers);
D;
42 glBindVertexArray(s->
vao);
D;
43 glBindBuffer(GL_ARRAY_BUFFER, vbo);
D;
45 glUniform1f(s->
loger2, log(escaperadius2));
D;
46 glUniform2f(s->
center, centerx, centery);
D;
47 glUniform1f(s->
radius, radius);
D;
48 glUniform1f(s->
aspect, 1 / aspect);
D;
49 glUniform1f(s->
pxs, height / (2.0 * radius));
D;
50 glEnableVertexAttribArray(s->
cne0);
D;
51 glEnableVertexAttribArray(s->
zdz0);
D;
52 glVertexAttribPointer(s->
cne0, 4, GL_FLOAT, GL_FALSE, (
DE ? 8 : 6) *
sizeof(GLfloat), 0);
D;
53 glVertexAttribPointer(s->
zdz0,
DE ? 4 : 2, GL_FLOAT, GL_FALSE, (
DE ? 8 : 6) *
sizeof(GLfloat), ((GLbyte *)0)+(4*
sizeof(GLfloat)));
D;
54 glBindVertexArray(0);
D;
55 glBindBuffer(GL_ARRAY_BUFFER, 0);
D;
56 glBindFramebuffer(GL_FRAMEBUFFER, 0);
D;
62 glBindVertexArray(s->
vao);
D;
63 glDrawArrays(GL_POINTS, 0, active_count);
D;
64 glBindVertexArray(0);
D;