opengl.textures: borrow get-texture-float and get-texture-int helper words from gpu.textures

db4
Joe Groff 2010-05-15 12:09:50 -07:00
parent 22e853ecb0
commit 010b5069bd
2 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ 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 ;
FROM: alien.c-types => float <float> <int> *float *int ;
SPECIALIZED-ARRAY: float
IN: opengl.textures
@ -404,3 +404,9 @@ PRIVATE>
over dim>> max-texture-size [ <= ] 2all?
[ <single-texture> ]
[ [ 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

View File

@ -176,11 +176,6 @@ M: cube-map-face texture-data-gl-target
texture [ texture-gl-target ] [ handle>> ] bi glBindTexture
texture ; inline
: 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
: ?product ( x -- y )
dup number? [ product ] unless ; inline