Trees | Indices | Help |
---|
|
1 """Descriptors for per-context state with complicated setters. 2 3 @author: Stephan Wenger 4 @date: 2012-02-29 5 """ 6 7 import glitter.raw as _gl 8 from glitter.utils import blend_functions, blend_equations 9133015 _value = _gl.GLint() 16 with obj: 17 _gl.glGetIntegerv(self._arg, _gl.pointer(_value)) 18 return blend_functions[_value.value]1921 src_rgb = blend_functions(value) if self._arg == _gl.GL_BLEND_SRC_RGB else obj.blend_src_rgb 22 dst_rgb = blend_functions(value) if self._arg == _gl.GL_BLEND_DST_RGB else obj.blend_dst_rgb 23 src_alpha = blend_functions(value) if self._arg == _gl.GL_BLEND_SRC_ALPHA else obj.blend_src_alpha 24 dst_alpha = blend_functions(value) if self._arg == _gl.GL_BLEND_DST_ALPHA else obj.blend_dst_alpha 25 with obj: 26 _gl.glBlendFuncSeparate(src_rgb._value, dst_rgb._value, src_alpha._value, dst_alpha._value)27344936 _value = _gl.GLint() 37 with obj: 38 _gl.glGetIntegerv(self._arg, _gl.pointer(_value)) 39 return blend_equations[_value.value]4042 mode_rgb = blend_equations(value) if self._arg == _gl.GL_BLEND_EQUATION_RGB else obj.blend_equation_rgb 43 mode_alpha = blend_equations(value) if self._arg == _gl.GL_BLEND_EQUATION_ALPHA else obj.blend_equation_alpha 44 with obj: 45 _gl.glBlendEquationSeparate(mode_rgb._value, mode_alpha._value)46536855 _value = _gl.GLfloat() 56 with obj: 57 _gl.glGetFloatv(self._arg, _gl.pointer(_value)) 58 return _value.value5961 factor = value if self._arg == _gl.GL_POLYGON_OFFSET_FACTOR else obj.polygon_offset_factor 62 units = value if self._arg == _gl.GL_POLYGON_OFFSET_UNITS else obj.polygon_offset_units 63 with obj: 64 _gl.glPolygonOffset(factor, units)65
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Mar 16 17:56:05 2012 | http://epydoc.sourceforge.net |