mightymandel v16

GPU-based Mandelbrot set explorer

fp32_colour.h File Reference

(v16)

#include <stdbool.h>
#include <GL/glew.h>
+ Include dependency graph for fp32_colour.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fp32_colour
 State structure for colour module. More...

Functions

void fp32_colour_begin (struct fp32_colour *s, GLuint rgb_tex)
 Initialize.
void fp32_colour_end (struct fp32_colour *s)
 Cleanup.
void fp32_colour_do (struct fp32_colour *s, int win_width, int win_height, int width, int height, bool update, bool update2, GLuint errs, float thickness, int slice, int slice_n)
 Perform colouring from a texture to the window.
void fp32_colour_clear (struct fp32_colour *s, int width, int height)

Variables

const char * fp32_colour_vert
 Source from fp32_colour_vert.glsl.
const char * fp32_colour_frag
 Source from fp32_colour_frag.glsl.
const char * fp32_colour2_vert
 Source from fp32_colour2_vert.glsl.
const char * fp32_colour2_frag
 Source from fp32_colour2_frag.glsl.

Data Structure Documentation

struct fp32_colour

State structure for colour module.

Definition at line 14 of file fp32_colour.h.

Data Fields
GLint aspect Shader uniform aspect ratio.
GLint aspect2 Pass-through shader uniform aspect ratio.
GLint errs Shader uniform show glitches flag.
GLuint fbo Frame buffer object.
GLint ida0 Shader uniform raw results texture sampler.
GLuint program Shader program.
GLuint program2 Pass-through shader program.
GLint pt Shader attribute vertex coordinates.
GLint pt2 Pass-through shader attribute vertex coordinates.
GLint rgb2 Pass-through shader uniform rgb texture sampler.
GLint slice_coords Shader uniform slice coords texture sampler.
GLint slice_number Shader uniform slice number texture sampler.
GLint slicing Shader uniform slicing parameters.
GLint thickness Shader uniform colouring thickness.
GLint update Shader uniform update uncalculated pixels.
GLint update2 Shader uniform use small slice deltas.
GLuint vao Vertex array object.
GLuint vao2 Pass-through vertex array object.
GLuint vbo Vertex buffer object for full screen triangle strip.

Function Documentation

void fp32_colour_begin ( struct fp32_colour s,
GLuint  rgb_tex 
)

Initialize.

Parameters
sThe fp32_colour state.
rgb_texThe RGB colour texture.

Definition at line 10 of file fp32_colour.c.

References compile_program(), D, fp32_colour::errs, fp32_colour::fbo, fp32_colour2_frag, fp32_colour2_vert, fp32_colour_frag, fp32_colour_vert, fp32_colour::ida0, fp32_colour::program, fp32_colour::program2, fp32_colour::pt, fp32_colour::pt2, fp32_colour::rgb2, fp32_colour::slice_coords, fp32_colour::slice_number, fp32_colour::slicing, TEX_RAW, TEX_RGB, TEX_SLICE_COORDS, TEX_SLICE_NUMBER, fp32_colour::thickness, fp32_colour::update, fp32_colour::update2, fp32_colour::vao, fp32_colour::vao2, and fp32_colour::vbo.

Referenced by render_begin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fp32_colour_clear ( struct fp32_colour s,
int  width,
int  height 
)

Definition at line 99 of file fp32_colour.c.

References D, and fp32_colour::fbo.

Referenced by render_start().

+ Here is the caller graph for this function:

void fp32_colour_do ( struct fp32_colour s,
int  win_width,
int  win_height,
int  width,
int  height,
bool  update,
bool  update2,
GLuint  errs,
float  thickness,
int  slice,
int  slice_n 
)

Perform colouring from a texture to the window.

Parameters
sThe fp32_colour state.
win_widthThe window width.
win_heightThe window height.
widthThe image width.
heightThe image height.
updateWhether to update uncalculated pixels or discard them.
update2Whether to use small slice deltas.
errsWhether to highlight glitches or try to mask them.
thicknessThe boundary colouring thickness.
sliceThe slicing level.
slice_nThe current slice index.

Perform colouring from a texture to the window.

OpenGL state changes: glBindFramebuffer, glActiveTexture

Definition at line 72 of file fp32_colour.c.

References D, fp32_colour::errs, fp32_colour::fbo, fp32_colour::program, fp32_colour::program2, fp32_colour::slicing, TEX_RGB, fp32_colour::thickness, fp32_colour::update, fp32_colour::update2, fp32_colour::vao, and fp32_colour::vao2.

void fp32_colour_end ( struct fp32_colour s)

Cleanup.

Parameters
sThe fp32_colour state.

Definition at line 58 of file fp32_colour.c.

References D, fp32_colour::fbo, fp32_colour::program, fp32_colour::program2, fp32_colour::vao, fp32_colour::vao2, and fp32_colour::vbo.

Referenced by render_end().

+ Here is the caller graph for this function:

Variable Documentation

const char* fp32_colour2_frag

Source from fp32_colour2_frag.glsl.

Referenced by fp32_colour_begin().

const char* fp32_colour2_vert

Source from fp32_colour2_vert.glsl.

Referenced by fp32_colour_begin().

const char* fp32_colour_frag

Source from fp32_colour_frag.glsl.

Referenced by fp32_colour_begin().

const char* fp32_colour_vert

Source from fp32_colour_vert.glsl.

Referenced by fp32_colour_begin().