gpu.state: use qualified for all c-types.

db4
John Benediktsson 2011-09-26 20:12:10 -07:00
parent c01a301f7e
commit fe31c534ea
1 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ combinators gpu kernel literals math math.rectangles opengl
opengl.gl sequences typed variants specialized-arrays ;
QUALIFIED-WITH: alien.c-types c
FROM: math => float ;
SPECIALIZED-ARRAY: int
SPECIALIZED-ARRAY: c:int
SPECIALIZED-ARRAY: c:float
IN: gpu.state
@ -416,16 +416,16 @@ M: mask-state set-gpu-state*
[ set-gpu-state* ] if ; inline
: 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 )
0 int <ref> [ glGetIntegerv ] keep int deref ;
0 c:int <ref> [ glGetIntegerv ] keep c:int deref ;
: get-gl-float ( enum -- value )
0 c:float <ref> [ glGetFloatv ] keep c:float deref ;
: get-gl-bools ( enum count -- value )
<byte-array> [ glGetBooleanv ] keep [ c-bool> ] { } map-as ;
: get-gl-ints ( enum count -- value )
int <c-array> [ glGetIntegerv ] keep ;
c:int <c-array> [ glGetIntegerv ] keep ;
: get-gl-floats ( enum count -- value )
c:float <c-array> [ glGetFloatv ] keep ;