]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/opengl/opengl.factor
continuations[-docs]: add the finally word
[factor.git] / basis / opengl / opengl.factor
index 53887994d4735b8c2ff6d49fe1318e239b5a0649..b261d59c5884116bd591cc266ac9d4c1ee849598 100644 (file)
@@ -174,7 +174,7 @@ MACRO: all-enabled-client-state ( seq quot -- quot )
 
 :: with-gl-buffer ( binding id quot -- )
     binding id glBindBuffer
-    quot [ binding 0 glBindBuffer ] [ ] cleanup ; inline
+    quot [ binding 0 glBindBuffer ] finally ; inline
 
 : with-array-element-buffers ( array-buffer element-buffer quot -- )
     [ GL_ELEMENT_ARRAY_BUFFER ] 2dip '[
@@ -189,7 +189,7 @@ MACRO: all-enabled-client-state ( seq quot -- quot )
 
 :: with-vertex-array ( id quot -- )
     id glBindVertexArray
-    quot [ 0 glBindVertexArray ] [ ] cleanup ; inline
+    quot [ 0 glBindVertexArray ] finally ; inline
 
 : <gl-buffer> ( target data hint -- id )
     pick gen-gl-buffer [