@@ -97,35 +97,17 @@ class BaseGlooFunctions(object):
97
97
98
98
# glBlendFunc(Separate), glBlendColor, glBlendEquation(Separate)
99
99
100
- def set_blend_func (
101
- self ,
102
- srgb : str = "one" ,
103
- drgb : str = "zero" ,
104
- salpha : str | None = None ,
105
- dalpha : str | None = None ,
106
- ): ...
100
+ def set_blend_func (self , srgb : str = "one" , drgb : str = "zero" , salpha : str | None = None , dalpha : str | None = None ): ...
107
101
def set_blend_color (self , color ): ...
108
102
def set_blend_equation (self , mode_rgb : str , mode_alpha : str | None = None ): ...
109
103
110
104
# glScissor, glStencilFunc(Separate), glStencilMask(Separate),
111
105
# glStencilOp(Separate),
112
106
113
107
def set_scissor (self , x : int , y : int , w : int , h : int ): ...
114
- def set_stencil_func (
115
- self ,
116
- func : str = "always" ,
117
- ref : int = 0 ,
118
- mask : int = 8 ,
119
- face : str = "front_and_back" ,
120
- ): ...
108
+ def set_stencil_func (self , func : str = "always" , ref : int = 0 , mask : int = 8 , face : str = "front_and_back" ): ...
121
109
def set_stencil_mask (self , mask : int = 8 , face : str = "front_and_back" ): ...
122
- def set_stencil_op (
123
- self ,
124
- sfail : str = "keep" ,
125
- dpfail : str = "keep" ,
126
- dppass : str = "keep" ,
127
- face : str = "front_and_back" ,
128
- ): ...
110
+ def set_stencil_op (self , sfail : str = "keep" , dpfail : str = "keep" , dppass : str = "keep" , face : str = "front_and_back" ): ...
129
111
130
112
# glDepthFunc, glDepthMask, glColorMask, glSampleCoverage
131
113
@@ -161,6 +143,36 @@ class GlooFunctions(BaseGlooFunctions):
161
143
# GlooFunctions without queue: use queue of canvas that is current at call-time
162
144
global_gloo_functions = ...
163
145
146
+ # Create global functions object and inject names here
147
+
148
+ # GlooFunctions without queue: use queue of canvas that is current at call-time
149
+ def set_viewport (* args ): ...
150
+ def set_depth_range (near : float = 0.0 , far : float = 1.0 ): ...
151
+ def set_front_face (mode : str = "ccw" ): ...
152
+ def set_cull_face (mode : str = "back" ): ...
153
+ def set_line_width (width : float = 1.0 ): ...
154
+ def set_polygon_offset (factor : float = 0.0 , units : float = 0.0 ): ...
155
+ def clear (color = True , depth : bool | float = True , stencil : bool | int = True ): ...
156
+ def set_clear_color (color = "black" , alpha : None | float = None ): ...
157
+ def set_clear_depth (depth : float = 1.0 ): ...
158
+ def set_clear_stencil (index : int = 0 ): ...
159
+ def set_blend_func (srgb : str = "one" , drgb : str = "zero" , salpha : str | None = None , dalpha : str | None = None ): ...
160
+ def set_blend_color (color ): ...
161
+ def set_blend_equation (mode_rgb : str , mode_alpha : str | None = None ): ...
162
+ def set_scissor (x : int , y : int , w : int , h : int ): ...
163
+ def set_stencil_func (func : str = "always" , ref : int = 0 , mask : int = 8 , face : str = "front_and_back" ): ...
164
+ def set_stencil_mask (mask : int = 8 , face : str = "front_and_back" ): ...
165
+ def set_stencil_op (sfail : str = "keep" , dpfail : str = "keep" , dppass : str = "keep" , face : str = "front_and_back" ): ...
166
+ def set_depth_func (func : str = "less" ): ...
167
+ def set_depth_mask (flag : bool ): ...
168
+ def set_color_mask (red : bool , green : bool , blue : bool , alpha : bool ): ...
169
+ def set_sample_coverage (value : float = 1.0 , invert : bool = False ): ...
170
+ def get_state_presets () -> Mapping : ...
171
+ def set_state (preset : Literal ["opaque" , "translucent" , "additive" ] | None = None , ** kwargs ): ...
172
+ def finish (): ...
173
+ def flush (): ...
174
+ def set_hint (target : str , mode : str ): ...
175
+
164
176
# Functions that do not use the glir queue
165
177
166
178
def read_pixels (
0 commit comments