summaryrefslogtreecommitdiffstats
path: root/libdimension/gl.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-04-03 21:30:15 -0400
committerTavian Barnes <tavianator@gmail.com>2011-04-03 21:30:15 -0400
commit5a535f9fac3f4b82f0b154b4c81fd1e2a8d62802 (patch)
tree2b642b87d97ab13b050e1ef9323725c0bbd5b5c6 /libdimension/gl.c
parent7bc2770af08e317b2076540050c68d2de55a11db (diff)
downloaddimension-5a535f9fac3f4b82f0b154b4c81fd1e2a8d62802.tar.xz
Don't use awkward (*fptr)() syntax.
Diffstat (limited to 'libdimension/gl.c')
-rw-r--r--libdimension/gl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdimension/gl.c b/libdimension/gl.c
index de408a3..77eefcd 100644
--- a/libdimension/gl.c
+++ b/libdimension/gl.c
@@ -39,14 +39,14 @@ dmnsn_gl_optimize_canvas(dmnsn_canvas *canvas)
{
/* Check if we've already optimized this canvas */
DMNSN_ARRAY_FOREACH (dmnsn_canvas_optimizer *, i, canvas->optimizers) {
- if (i->optimizer_fn == &dmnsn_gl_optimizer_fn) {
+ if (i->optimizer_fn == dmnsn_gl_optimizer_fn) {
return 0;
}
}
dmnsn_canvas_optimizer optimizer;
- optimizer.optimizer_fn = &dmnsn_gl_optimizer_fn;
- optimizer.free_fn = &dmnsn_free;
+ optimizer.optimizer_fn = dmnsn_gl_optimizer_fn;
+ optimizer.free_fn = dmnsn_free;
/* Allocate a buffer to hold RGB values */
optimizer.ptr = dmnsn_malloc(4*canvas->width*canvas->height*sizeof(GLushort));
@@ -70,7 +70,7 @@ dmnsn_gl_write_canvas(const dmnsn_canvas *canvas)
/* Check if we can optimize this */
DMNSN_ARRAY_FOREACH (dmnsn_canvas_optimizer *, i, canvas->optimizers) {
- if (i->optimizer_fn == &dmnsn_gl_optimizer_fn) {
+ if (i->optimizer_fn == dmnsn_gl_optimizer_fn) {
glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_SHORT, i->ptr);
return glGetError() == GL_NO_ERROR ? 0 : 1;
}