]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/opengl/textures/textures.factor
Updating code to use with-out-parameters
[factor.git] / basis / opengl / textures / textures.factor
index 2341706f4c21bafbc552b0cc349cf0f5e9bcd323..dacea0888a277fb484d352632e9a85fe1670b8e4 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2009, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs cache colors.constants destructors
-kernel opengl opengl.gl opengl.capabilities combinators images
-images.tesselation grouping sequences math math.vectors
-generalizations fry arrays namespaces system
-locals literals specialized-arrays ;
-FROM: alien.c-types => float <float> <int> *float *int ;
+USING: accessors alien.data assocs cache colors.constants
+destructors kernel opengl opengl.gl opengl.capabilities
+combinators images images.tesselation grouping sequences math
+math.vectors generalizations fry arrays namespaces system locals
+literals specialized-arrays ;
+FROM: alien.c-types => int float ;
 SPECIALIZED-ARRAY: float
 IN: opengl.textures
 
@@ -406,7 +406,7 @@ PRIVATE>
     [ [ max-texture-size tesselate ] dip <multi-texture> ] if ;
 
 : get-texture-float ( target level enum -- value )
-    0 <float> [ glGetTexLevelParameterfv ] keep *float ; inline
-: get-texture-int ( target level enum -- value )
-    0 <int> [ glGetTexLevelParameteriv ] keep *int ; inline
+    { float } [ glGetTexLevelParameterfv ] [ ] with-out-parameters ; inline
 
+: get-texture-int ( target level enum -- value )
+    { int } [ glGetTexLevelParameteriv ] [ ] with-out-parameters ; inline