def _get_texture_level_dims(target,level): """Retrieve texture dims for given level and target""" dims = [] dim = _types.GLuint() GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_WIDTH, dim ) dims = [dim.value] if target != GL_1_1.GL_TEXTURE_1D: GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_HEIGHT, dim ) dims.append( dim.value ) if target != GL_1_1.GL_TEXTURE_2D: GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_DEPTH, dim ) dims.append( dim.value ) return dims
def _get_texture_level_dims(target,level): """Retrieve texture dims for given level and target""" dims = [] dim = _types.GLuint() GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_WIDTH, dim ) dims = [dim.value] if target != GL_1_1.GL_TEXTURE_1D: GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_HEIGHT, dim ) dims.append( dim.value ) if target != GL_1_1.GL_TEXTURE_2D: GL_1_1.glGetTexLevelParameteriv( target, level, GL_1_1.GL_TEXTURE_DEPTH, dim ) dims.append( dim.value ) return dims
def _get_texture_level_dims(target, level): dim = _types.GLuint() GL_1_1.glGetTexLevelParameteriv(target, level, GL_1_1.GL_TEXTURE_WIDTH, dim) dims = [dim.value] if target != GL_1_1.GL_TEXTURE_1D: GL_1_1.glGetTexLevelParameteriv(target, level, GL_1_1.GL_TEXTURE_HEIGHT, dim) dims.append(dim.value) if target != GL_1_1.GL_TEXTURE_2D: # bug fixed : GL_1_1.GL_TEXTURE_DEPTH -> GL_1_2.GL_TEXTURE_DEPTH GL_1_1.glGetTexLevelParameteriv(target, level, GL_1_2.GL_TEXTURE_DEPTH, dim) dims.append(dim.value) return dims