mightymandel v16

GPU-based Mandelbrot set explorer

tiling.c File Reference

(v16)

Handle state related to tiled rendering. More...

#include "tiling.h"
#include "utility.h"
+ Include dependency graph for tiling.c:

Go to the source code of this file.

Functions

void tiling_begin (struct tiling *tiling, int cols, int rows, int width, int height, const mpfr_t centerx, const mpfr_t centery, const mpfr_t radius)
 Initialize a tiling.
void tiling_end (struct tiling *tiling)
 Clean up a tiling.
bool tiling_next (struct tiling *tiling)
 Advance to the next tile.

Detailed Description

Handle state related to tiled rendering.

Definition in file tiling.c.

Function Documentation

void tiling_begin ( struct tiling tiling,
int  cols,
int  rows,
int  width,
int  height,
const mpfr_t  centerx,
const mpfr_t  centery,
const mpfr_t  radius 
)

Initialize a tiling.

Parameters
tilingThe tiling to initialize.
colsThe number of tiles horizontally.
rowsThe number of tiles vertically.
widthThe image width of each tile in pixels.
heightThe image height of each tile in pixels.
centerxThe real coordinate of the tiled view center.
centeryThe imaginary coordinate of the tiled view center.
radiusThe radius of the tiled view.

Definition at line 25 of file tiling.c.

References tiling::centerx, tiling::centery, tiling::col, tiling::height, tiling::radius, tiling::row, tiling::tiled_centerx, tiling::tiled_centery, tiling::tiled_cols, tiling::tiled_radius, tiling::tiled_rows, and tiling::width.

Referenced by main().

+ Here is the caller graph for this function:

void tiling_end ( struct tiling tiling)

Clean up a tiling.

Parameters
tilingThe tiling to clean up.

Definition at line 46 of file tiling.c.

References tiling::centerx, tiling::centery, tiling::radius, tiling::tiled_centerx, tiling::tiled_centery, and tiling::tiled_radius.

Referenced by main().

+ Here is the caller graph for this function:

bool tiling_next ( struct tiling tiling)

Advance to the next tile.

Should be called before rendering the first tile.

Parameters
tilingThe tiling to advance.
Returns
Success (true) or failure (false, there are no more tiles).

Definition at line 58 of file tiling.c.

References tiling::centerx, tiling::centery, tiling::col, tiling::height, pixel_coordinate(), tiling::radius, tiling::row, tiling::tiled_centerx, tiling::tiled_centery, tiling::tiled_cols, tiling::tiled_radius, tiling::tiled_rows, and tiling::width.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: