summaryrefslogtreecommitdiff
path: root/modules/opengl
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
commitd2609092150272f3e3a6a4d9859d3c851e1fa270 (patch)
treeda65ce08d7997e9e67b78d96cb5ceccf8b839b44 /modules/opengl
parentf369fc474a4f629fb08ad8ae4c188e43f68806fc (diff)
vidisp: use const pointer to base-class
Diffstat (limited to 'modules/opengl')
-rw-r--r--modules/opengl/opengl.m8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/opengl/opengl.m b/modules/opengl/opengl.m
index d3ca972..2ffa925 100644
--- a/modules/opengl/opengl.m
+++ b/modules/opengl/opengl.m
@@ -12,7 +12,7 @@
struct vidisp_st {
- struct vidisp *vd; /**< Inheritance (1st) */
+ const struct vidisp *vd; /**< Inheritance (1st) */
struct vidsz size; /**< Current size */
NSOpenGLContext *ctx;
NSWindow *win;
@@ -68,8 +68,6 @@ static void destructor(void *arg)
mem_deref(st->prog);
[pool release];
-
- mem_deref(st->vd);
}
@@ -170,7 +168,7 @@ static int setup_shader(struct vidisp_st *st, int width, int height)
}
-static int alloc(struct vidisp_st **stp, struct vidisp *vd,
+static int alloc(struct vidisp_st **stp, const struct vidisp *vd,
struct vidisp_prm *prm, const char *dev,
vidisp_resize_h *resizeh, void *arg)
{
@@ -198,7 +196,7 @@ static int alloc(struct vidisp_st **stp, struct vidisp *vd,
if (!st)
return ENOMEM;
- st->vd = mem_ref(vd);
+ st->vd = vd;
fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];
if (!fmt) {