opengl.textures: borrow get-texture-float and get-texture-int helper words from gpu.textures
parent
22e853ecb0
commit
010b5069bd
|
@ -5,7 +5,7 @@ kernel opengl opengl.gl opengl.capabilities combinators images
|
||||||
images.tesselation grouping sequences math math.vectors
|
images.tesselation grouping sequences math math.vectors
|
||||||
generalizations fry arrays namespaces system
|
generalizations fry arrays namespaces system
|
||||||
locals literals specialized-arrays ;
|
locals literals specialized-arrays ;
|
||||||
FROM: alien.c-types => float ;
|
FROM: alien.c-types => float <float> <int> *float *int ;
|
||||||
SPECIALIZED-ARRAY: float
|
SPECIALIZED-ARRAY: float
|
||||||
IN: opengl.textures
|
IN: opengl.textures
|
||||||
|
|
||||||
|
@ -404,3 +404,9 @@ PRIVATE>
|
||||||
over dim>> max-texture-size [ <= ] 2all?
|
over dim>> max-texture-size [ <= ] 2all?
|
||||||
[ <single-texture> ]
|
[ <single-texture> ]
|
||||||
[ [ max-texture-size tesselate ] dip <multi-texture> ] if ;
|
[ [ 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
|
||||||
|
|
||||||
|
|
|
@ -176,11 +176,6 @@ M: cube-map-face texture-data-gl-target
|
||||||
texture [ texture-gl-target ] [ handle>> ] bi glBindTexture
|
texture [ texture-gl-target ] [ handle>> ] bi glBindTexture
|
||||||
texture ; inline
|
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 )
|
: ?product ( x -- y )
|
||||||
dup number? [ product ] unless ; inline
|
dup number? [ product ] unless ; inline
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue