gpu.state: use qualified for all c-types.
parent
c01a301f7e
commit
fe31c534ea
|
@ -4,7 +4,7 @@ combinators gpu kernel literals math math.rectangles opengl
|
||||||
opengl.gl sequences typed variants specialized-arrays ;
|
opengl.gl sequences typed variants specialized-arrays ;
|
||||||
QUALIFIED-WITH: alien.c-types c
|
QUALIFIED-WITH: alien.c-types c
|
||||||
FROM: math => float ;
|
FROM: math => float ;
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: c:int
|
||||||
SPECIALIZED-ARRAY: c:float
|
SPECIALIZED-ARRAY: c:float
|
||||||
IN: gpu.state
|
IN: gpu.state
|
||||||
|
|
||||||
|
@ -416,16 +416,16 @@ M: mask-state set-gpu-state*
|
||||||
[ set-gpu-state* ] if ; inline
|
[ set-gpu-state* ] if ; inline
|
||||||
|
|
||||||
: get-gl-bool ( enum -- value )
|
: get-gl-bool ( enum -- value )
|
||||||
0 uchar <ref> [ glGetBooleanv ] keep uchar deref c-bool> ;
|
0 c:uchar <ref> [ glGetBooleanv ] keep c:uchar deref c-bool> ;
|
||||||
: get-gl-int ( enum -- value )
|
: get-gl-int ( enum -- value )
|
||||||
0 int <ref> [ glGetIntegerv ] keep int deref ;
|
0 c:int <ref> [ glGetIntegerv ] keep c:int deref ;
|
||||||
: get-gl-float ( enum -- value )
|
: get-gl-float ( enum -- value )
|
||||||
0 c:float <ref> [ glGetFloatv ] keep c:float deref ;
|
0 c:float <ref> [ glGetFloatv ] keep c:float deref ;
|
||||||
|
|
||||||
: get-gl-bools ( enum count -- value )
|
: get-gl-bools ( enum count -- value )
|
||||||
<byte-array> [ glGetBooleanv ] keep [ c-bool> ] { } map-as ;
|
<byte-array> [ glGetBooleanv ] keep [ c-bool> ] { } map-as ;
|
||||||
: get-gl-ints ( enum count -- value )
|
: get-gl-ints ( enum count -- value )
|
||||||
int <c-array> [ glGetIntegerv ] keep ;
|
c:int <c-array> [ glGetIntegerv ] keep ;
|
||||||
: get-gl-floats ( enum count -- value )
|
: get-gl-floats ( enum count -- value )
|
||||||
c:float <c-array> [ glGetFloatv ] keep ;
|
c:float <c-array> [ glGetFloatv ] keep ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue