summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-04-21 14:18:21 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-04-21 14:18:21 -0700
commitf1557bea361602224f07965b8292b694ef570690 (patch)
treef9d56542d179dbd45f3f12117c227dc2ff117755 /src
parentd1a7170c350553bb55f3a55fc807802fee0ed33e (diff)
*: s/renderer/module/g
Make consistent with the source directory structure naming.
Diffstat (limited to 'src')
-rw-r--r--src/modules/julia/julia.c2
-rw-r--r--src/modules/plasma/plasma.c2
-rw-r--r--src/modules/ray/ray.c2
-rw-r--r--src/modules/roto/roto.c4
-rw-r--r--src/modules/sparkler/sparkler.c2
-rw-r--r--src/modules/stars/stars.c2
-rw-r--r--src/rototiller.c48
-rw-r--r--src/rototiller.h4
8 files changed, 33 insertions, 33 deletions
diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c
index 1afb3cc..f8072a8 100644
--- a/src/modules/julia/julia.c
+++ b/src/modules/julia/julia.c
@@ -108,7 +108,7 @@ static void julia(fb_fragment_t *fragment)
rr += .01;
}
-rototiller_renderer_t julia_renderer = {
+rototiller_module_t julia_module = {
.render = julia,
.name = "julia",
.description = "Julia set fractal morpher",
diff --git a/src/modules/plasma/plasma.c b/src/modules/plasma/plasma.c
index 59c394a..211a032 100644
--- a/src/modules/plasma/plasma.c
+++ b/src/modules/plasma/plasma.c
@@ -117,7 +117,7 @@ static void plasma(fb_fragment_t *fragment)
rr += 3;
}
-rototiller_renderer_t plasma_renderer = {
+rototiller_module_t plasma_module = {
.render = plasma,
.name = "plasma",
.description = "Oldskool plasma effect",
diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c
index 12d4bc8..1652aa2 100644
--- a/src/modules/ray/ray.c
+++ b/src/modules/ray/ray.c
@@ -166,7 +166,7 @@ static void ray(fb_fragment_t *fragment)
}
-rototiller_renderer_t ray_renderer = {
+rototiller_module_t ray_module = {
.render = ray,
.name = "ray",
.description = "Multi-threaded ray tracer",
diff --git a/src/modules/roto/roto.c b/src/modules/roto/roto.c
index d789f85..c44d624 100644
--- a/src/modules/roto/roto.c
+++ b/src/modules/roto/roto.c
@@ -287,7 +287,7 @@ static void roto64(fb_fragment_t *fragment)
}
-rototiller_renderer_t roto32_renderer = {
+rototiller_module_t roto32_module = {
.render = roto32,
.name = "roto32",
.description = "Anti-aliased tiled texture rotation (32-bit)",
@@ -296,7 +296,7 @@ rototiller_renderer_t roto32_renderer = {
};
-rototiller_renderer_t roto64_renderer = {
+rototiller_module_t roto64_module = {
.render = roto64,
.name = "roto64",
.description = "Anti-aliased tiled texture rotation (64-bit)",
diff --git a/src/modules/sparkler/sparkler.c b/src/modules/sparkler/sparkler.c
index e2ff76e..36aabff 100644
--- a/src/modules/sparkler/sparkler.c
+++ b/src/modules/sparkler/sparkler.c
@@ -44,7 +44,7 @@ static void sparkler(fb_fragment_t *fragment)
}
-rototiller_renderer_t sparkler_renderer = {
+rototiller_module_t sparkler_module = {
.render = sparkler,
.name = "sparkler",
.description = "Particle system with spatial interactions",
diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c
index 2ff9b99..61f652e 100644
--- a/src/modules/stars/stars.c
+++ b/src/modules/stars/stars.c
@@ -54,7 +54,7 @@ static void stars(fb_fragment_t *fragment)
}
}
-rototiller_renderer_t stars_renderer = {
+rototiller_module_t stars_module = {
.render = stars,
.name = "stars",
.description = "basic starfield",
diff --git a/src/rototiller.c b/src/rototiller.c
index 22d13e2..372ab7d 100644
--- a/src/rototiller.c
+++ b/src/rototiller.c
@@ -24,35 +24,35 @@
* just two pages we end up twiddling thumbs until the vsync arrives.
*/
-extern rototiller_renderer_t julia_renderer;
-extern rototiller_renderer_t plasma_renderer;
-extern rototiller_renderer_t roto32_renderer;
-extern rototiller_renderer_t roto64_renderer;
-extern rototiller_renderer_t ray_renderer;
-extern rototiller_renderer_t sparkler_renderer;
-extern rototiller_renderer_t stars_renderer;
-
-static rototiller_renderer_t *renderers[] = {
- &roto32_renderer,
- &roto64_renderer,
- &ray_renderer,
- &sparkler_renderer,
- &stars_renderer,
- &plasma_renderer,
- &julia_renderer,
+extern rototiller_module_t julia_module;
+extern rototiller_module_t plasma_module;
+extern rototiller_module_t roto32_module;
+extern rototiller_module_t roto64_module;
+extern rototiller_module_t ray_module;
+extern rototiller_module_t sparkler_module;
+extern rototiller_module_t stars_module;
+
+static rototiller_module_t *modules[] = {
+ &roto32_module,
+ &roto64_module,
+ &ray_module,
+ &sparkler_module,
+ &stars_module,
+ &plasma_module,
+ &julia_module,
};
-static void renderer_select(int *renderer)
+static void module_select(int *module)
{
int i;
- printf("\nRenderers\n");
- for (i = 0; i < nelems(renderers); i++) {
- printf(" %i: %s - %s\n", i, renderers[i]->name, renderers[i]->description);
+ printf("\nModules\n");
+ for (i = 0; i < nelems(modules); i++) {
+ printf(" %i: %s - %s\n", i, modules[i]->name, modules[i]->description);
}
- ask_num(renderer, nelems(renderers) - 1, "Select renderer", 0);
+ ask_num(module, nelems(modules) - 1, "Select module", 0);
}
@@ -63,10 +63,10 @@ int main(int argc, const char *argv[])
uint32_t drm_crtc_id;
uint32_t drm_connector_id;
fb_t *fb;
- int renderer;
+ int module;
drm_setup(&drm_fd, &drm_crtc_id, &drm_connector_id, &drm_mode);
- renderer_select(&renderer);
+ module_select(&module);
pexit_if(!(fb = fb_new(drm_fd, drm_crtc_id, &drm_connector_id, 1, drm_mode, NUM_FB_PAGES)),
"unable to create fb");
@@ -80,7 +80,7 @@ int main(int argc, const char *argv[])
fps_print(fb);
page = fb_page_get(fb);
- renderers[renderer]->render(&page->fragment);
+ modules[module]->render(&page->fragment);
fb_page_put(fb, page);
}
diff --git a/src/rototiller.h b/src/rototiller.h
index 0ff2c3f..f75ca11 100644
--- a/src/rototiller.h
+++ b/src/rototiller.h
@@ -1,12 +1,12 @@
#ifndef _ROTOTILLER_H
#define _ROTOTILLER_H
-typedef struct rototiller_renderer_t {
+typedef struct rototiller_module_t {
void (*render)(fb_fragment_t *);
char *name;
char *description;
char *author;
char *license;
-} rototiller_renderer_t;
+} rototiller_module_t;
#endif
© All Rights Reserved