diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-10-19 13:59:24 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-10-30 18:11:22 -0400 |
commit | 8e3a7158ecae541692826e7b5998c8ffc810173a (patch) | |
tree | beda4f9f8604f77d0513d5fb02b7ddf53d203d09 /libdimension/gl.c | |
parent | e9810a7b1aae15320e58371b657a2f963562834d (diff) | |
download | dimension-8e3a7158ecae541692826e7b5998c8ffc810173a.tar.xz |
Make API more consistent.
Object methods should be dmnsn_<object>_<fn>().
Diffstat (limited to 'libdimension/gl.c')
-rw-r--r-- | libdimension/gl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libdimension/gl.c b/libdimension/gl.c index a2825f9..ff7906c 100644 --- a/libdimension/gl.c +++ b/libdimension/gl.c @@ -34,7 +34,7 @@ dmnsn_gl_optimizer_fn(const dmnsn_canvas *canvas, dmnsn_canvas_optimizer optimizer, size_t x, size_t y) { GLushort *pixel = (GLushort *)optimizer.ptr + 4*(y*canvas->width + x); - dmnsn_color color = dmnsn_get_pixel(canvas, x, y); + dmnsn_color color = dmnsn_canvas_get_pixel(canvas, x, y); color = dmnsn_remove_filter(color); color = dmnsn_color_to_sRGB(color); color = dmnsn_color_saturate(color); @@ -64,7 +64,7 @@ dmnsn_gl_optimize_canvas(dmnsn_canvas *canvas) optimizer.ptr = dmnsn_malloc(4*canvas->width*canvas->height*sizeof(GLushort)); /* Set a new optimizer */ - dmnsn_optimize_canvas(canvas, optimizer); + dmnsn_canvas_optimize(canvas, optimizer); return 0; } @@ -94,7 +94,7 @@ dmnsn_gl_write_canvas(const dmnsn_canvas *canvas) for (size_t x = 0; x < width; ++x) { pixel = pixels + 4*(y*width + x); - color = dmnsn_get_pixel(canvas, x, y); + color = dmnsn_canvas_get_pixel(canvas, x, y); color = dmnsn_remove_filter(color); color = dmnsn_color_to_sRGB(color); color = dmnsn_color_saturate(color); @@ -140,7 +140,7 @@ dmnsn_gl_read_canvas(size_t x0, size_t y0, (double)pixel[3]/UINT16_MAX, 0.0); color = dmnsn_color_from_sRGB(color); - dmnsn_set_pixel(canvas, x, y, color); + dmnsn_canvas_set_pixel(canvas, x, y, color); } } |