def border_color(self): if self.dtype.is_float(): _border_color = (_gl.GLfloat * 4)() with self: _gl.glGetTexParameterfv(self._target, _gl.GL_TEXTURE_BORDER_COLOR, _border_color) elif self.dtype.is_signed(): _border_color = (_gl.GLint * 4)() with self: _gl.glGetTexParameterIiv(self._target, _gl.GL_TEXTURE_BORDER_COLOR, _border_color) else: _border_color = (_gl.GLuint * 4)() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_BORDER_COLOR, _border_color) return [_border_color[i] for i in range(4)]
def wrap_r(self): _wrap_r = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_WRAP_R, _gl.pointer(_wrap_r)) return self.wrapmodes[_wrap_r.value]
def swizzle_rgba(self): _swizzle_rgba = (_gl.GLenum * 4)() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_SWIZZLE_RGBA, _swizzle_rgba) return [self.swizzles[_swizzle_rgba[i]] for i in range(4)]
def swizzle_a(self): _swizzle_a = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_SWIZZLE_A, _gl.pointer(_swizzle_a)) return self.swizzles[_swizzle_a.value]
def mag_filter(self): _mag_filter = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_MAG_FILTER, _gl.pointer(_mag_filter)) return self.mag_filters[_mag_filter.value]
def immutable_format(self): # Textures become immutable if their storage is specified with glTexStorage1D, glTexStorage2D or glTexStorage3D _immutable_format = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_COMPARE_MODE, _gl.pointer(_immutable_format)) return bool(_immutable_format.value)
def compare_mode(self): _compare_mode = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_COMPARE_MODE, _gl.pointer(_compare_mode)) return self.compare_modes[_compare_mode.value]
def compare_func(self): _compare_func = _gl.GLenum() with self: _gl.glGetTexParameterIuiv(self._target, _gl.GL_TEXTURE_COMPARE_FUNC, _gl.pointer(_compare_func)) return self.compare_funcs[_compare_func.value]