From 5f909cf443d567e17b2a6b0e9fcd9f9cfb153922 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sat, 15 May 2010 16:25:27 -0700 Subject: [PATCH] cuda.gl: enum>number the flags argument to gl-buffer>resource so that single CUDA flag symbols can be used as arguments --- extra/cuda/gl/gl.factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extra/cuda/gl/gl.factor b/extra/cuda/gl/gl.factor index ae4cefb11f..925c7d137f 100644 --- a/extra/cuda/gl/gl.factor +++ b/extra/cuda/gl/gl.factor @@ -1,7 +1,7 @@ ! (c)2010 Joe Groff bsd license USING: accessors alien.c-types alien.data alien.destructors -continuations cuda cuda.ffi cuda.gl.ffi cuda.utils destructors -fry gpu.buffers kernel ; +alien.enums continuations cuda cuda.ffi cuda.gl.ffi cuda.utils +destructors fry gpu.buffers kernel ; IN: cuda.gl : create-gl-cuda-context ( device flags -- context ) @@ -13,6 +13,7 @@ IN: cuda.gl [ [ create-gl-cuda-context ] (set-up-cuda-context) ] dip (with-cuda-context) ; inline : gl-buffer>resource ( gl-buffer flags -- resource ) + enum>number [ CUgraphicsResource ] 2dip [ cuGraphicsGLRegisterBuffer cuda-error ] 3keep 2drop *void* ; inline