当前位置: 首页>>代码示例>>Python>>正文


Python GL.GL_TEXTURE_WRAP_S属性代码示例

本文整理汇总了Python中OpenGL.GL.GL_TEXTURE_WRAP_S属性的典型用法代码示例。如果您正苦于以下问题:Python GL.GL_TEXTURE_WRAP_S属性的具体用法?Python GL.GL_TEXTURE_WRAP_S怎么用?Python GL.GL_TEXTURE_WRAP_S使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在OpenGL.GL的用法示例。


在下文中一共展示了GL.GL_TEXTURE_WRAP_S属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_font_array

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def create_font_array(self):
        # Load the first image to get font size
        img          = QImage(os.path.join(settings.gfx_path, 'font/32.png'))
        imgsize      = (img.width(), img.height())
        self.char_ar = float(imgsize[1]) / imgsize[0]

        # Set-up the texture array
        self.tex_id = gl.glGenTextures(1)
        gl.glBindTexture(gl.GL_TEXTURE_2D_ARRAY, self.tex_id)
        gl.glTexImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, gl.GL_RGBA8, imgsize[0], imgsize[1], 127 - 30, 0, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, None)
        gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
        gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
        gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_BORDER)
        gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_BORDER)
        # We're using the ASCII range 32-126; space, uppercase, lower case, numbers, brackets, punctuation marks
        for i in range(30, 127):
            img = QImage(os.path.join(settings.gfx_path, 'font/%d.png' % i)).convertToFormat(QImage.Format_ARGB32)
            ptr = c_void_p(int(img.constBits()))
            gl.glTexSubImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, 0, 0, i - 30, imgsize[0], imgsize[1], 1, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, ptr) 
开发者ID:TUDelft-CNS-ATM,项目名称:bluesky,代码行数:21,代码来源:glhelpers.py

示例2: create_font_array

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def create_font_array(self, path):
        # Load the first image to get font size
        img          = QImage(path + '32.png')
        imgsize      = (img.width(), img.height())
        self.char_ar = float(imgsize[1]) / imgsize[0]

        # Set-up the texture array
        self.tex_id = gl.glGenTextures(1)
        gl.glBindTexture(gl.GL_TEXTURE_2D_ARRAY, self.tex_id)
        gl.glTexImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, gl.GL_RGBA8, imgsize[0], imgsize[1], 127 - 32, 0, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, None)
        gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
        gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
        gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_BORDER)
        gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_BORDER)
        # We're using the ASCII range 32-126; space, uppercase, lower case, numbers, brackets, punctuation marks
        for i in range(32, 127):
            img = QImage(path + '%d.png' % i).convertToFormat(QImage.Format_ARGB32)
            ptr = c_void_p(int(img.constBits()))
            gl.glTexSubImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, 0, 0, i - 32, imgsize[0], imgsize[1], 1, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, ptr) 
开发者ID:TUDelft-CNS-ATM,项目名称:bluesky,代码行数:21,代码来源:glhelpers.py

示例3: load_lcd_font

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def load_lcd_font():
    files = sorted(glob('mcp_font/*.png'))
    img          = QImage(files[0])
    imgsize      = (img.width(), img.height())
    # Set-up the texture array
    tex_id = gl.glGenTextures(1)
    gl.glBindTexture(gl.GL_TEXTURE_2D_ARRAY, tex_id)
    gl.glTexImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, gl.GL_RGBA8, imgsize[0], imgsize[1], len(files), 0, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, None)
    gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
    gl.glTexParameteri(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
    gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_BORDER)
    gl.glTexParameterf(gl.GL_TEXTURE_2D_ARRAY, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_BORDER)

    for i, fname in enumerate(files):
        img = QImage(fname).convertToFormat(QImage.Format_ARGB32)
        ptr = c_void_p(int(img.constBits()))
        gl.glTexSubImage3D(gl.GL_TEXTURE_2D_ARRAY, 0, 0, 0, i, imgsize[0], imgsize[1], 1, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, ptr)

    return tex_id 
开发者ID:TUDelft-CNS-ATM,项目名称:bluesky,代码行数:21,代码来源:blipdriver.py

示例4: _try_load_texture

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def _try_load_texture(self):
        # Surface texture
        try:
            texture_map = openvr.VRRenderModels().loadTexture_Async(self.model.diffuseTextureId)
        except openvr.error_code.RenderModelError_Loading:
            return
        self.texture_map = texture_map
        self.diffuse_texture = GL.glGenTextures(1)
        GL.glBindTexture(GL.GL_TEXTURE_2D, self.diffuse_texture)
        GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, self.texture_map.unWidth, self.texture_map.unHeight,
                        0, GL.GL_RGBA,
                        GL.GL_UNSIGNED_BYTE, self.texture_map.rubTextureMapData)
        GL.glGenerateMipmap(GL.GL_TEXTURE_2D)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR)
        fLargest = GL.glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
        GL.glTexParameterf(GL.GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, fLargest)
        GL.glBindTexture(GL.GL_TEXTURE_2D, 0)
        self.texture_is_loaded = True 
开发者ID:cmbruns,项目名称:pyopenvr,代码行数:23,代码来源:tracked_devices_actor.py

示例5: render_companion_window

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def render_companion_window(self):
        GL.glDisable(GL.GL_DEPTH_TEST)
        GL.glViewport(0, 0, self.companion_width, self.companion_height)
        GL.glBindVertexArray(self.companion_window_vao)
        GL.glUseProgram(self.companion_window_program)
        # render left eye (first half of index array)
        i_size = sizeof(c_uint16)
        count = int(self.companion_window_index_size / 2)
        GL.glBindTexture(GL.GL_TEXTURE_2D, self.left_eye_desc.resolve_texture_id)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR)
        GL.glDrawElements(GL.GL_TRIANGLES, count, GL.GL_UNSIGNED_SHORT, cast(0 * i_size, c_void_p))
        # render right eye (second half of index array)
        GL.glBindTexture(GL.GL_TEXTURE_2D, self.right_eye_desc.resolve_texture_id)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR)
        GL.glDrawElements(GL.GL_TRIANGLES, count, GL.GL_UNSIGNED_SHORT, cast(count * i_size, c_void_p))
        GL.glBindVertexArray(0)
        GL.glUseProgram(0) 
开发者ID:cmbruns,项目名称:pyopenvr,代码行数:25,代码来源:hellovr_glfw.py

示例6: set_up_texture_maps

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def set_up_texture_maps(self):
        ts = pkg_resources.resource_stream('samples', 'cube_texture.png')
        image = Image.open(ts).convert('RGBA')
        width, height = image.size
        image_data = numpy.array(list(image.getdata()), numpy.uint8)
        self.i_texture = GL.glGenTextures(1)
        GL.glBindTexture(GL.GL_TEXTURE_2D, self.i_texture)
        GL.glTexImage2D(
            GL.GL_TEXTURE_2D,
            0,
            GL.GL_RGBA,
            width, height,
            0,
            GL.GL_RGBA,
            GL.GL_UNSIGNED_BYTE,
            image_data,
        )
        GL.glGenerateMipmap(GL.GL_TEXTURE_2D)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR)
        f_largest = GL.glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
        GL.glTexParameterf(GL.GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, f_largest)
        GL.glBindTexture(GL.GL_TEXTURE_2D, 0) 
开发者ID:cmbruns,项目名称:pyopenvr,代码行数:27,代码来源:hellovr_glfw.py

示例7: _load

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def _load(self, surface):
        self.free()

        self.width = surface.get_width()
        self.height = surface.get_height()
        self.textureId = 0

        textureId = (gl.GLuint * 1)()

        surface.lock()

        BYTEP = ctypes.POINTER(ctypes.c_ubyte)
        ptr = ctypes.cast(surface._pixels_address, BYTEP)

        gl.glGenTextures(1, textureId)
        gl.glEnable(gl.GL_TEXTURE_2D)
        gl.glActiveTexture(gl.GL_TEXTURE0)

        gl.glPixelStorei(gl.GL_UNPACK_ROW_LENGTH, surface.get_pitch() // surface.get_bytesize())
        gl.glBindTexture(gl.GL_TEXTURE_2D, textureId[0])
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
        gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA, self.width, self.height, 0, gl.GL_RGBA, gl.GL_UNSIGNED_BYTE, ptr)
        gl.glBindTexture(gl.GL_TEXTURE_2D, 0);
        gl.glPixelStorei(gl.GL_UNPACK_ROW_LENGTH, 0)

        surface.unlock()

        self.textureId = textureId[0] 
开发者ID:bitsawer,项目名称:renpy-shader,代码行数:33,代码来源:texture.py

示例8: createEmptyTexture

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def createEmptyTexture(self, width, height):
        textureId = (gl.GLuint * 1)()
        gl.glGenTextures(1, textureId)
        gl.glBindTexture(gl.GL_TEXTURE_2D, textureId[0])
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)
        gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)
        #None means reserve texture memory, but texels are undefined
        gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA8, width, height, 0, gl.GL_BGRA, gl.GL_UNSIGNED_BYTE, None)
        gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
        return textureId[0] 
开发者ID:bitsawer,项目名称:renpy-shader,代码行数:14,代码来源:framebuffer.py

示例9: __init__

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def __init__(self, width, height, internalFormat=gl.GL_RGBA, format=gl.GL_RGBA):
    self.id_ = gl.glGenTextures(1)
    self.internalFormat_ = internalFormat  # gl.GL_RGB_FLOAT, gl.GL_RGB_UNSIGNED, ...
    self.format = format  # GL_RG. GL_RG_INTEGER, ...

    self.width_ = width
    self.height_ = height

    gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, self.id_)
    gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)
    gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)
    gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_BORDER)
    gl.glTexParameteri(gl.GL_TEXTURE_RECTANGLE, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_BORDER)
    gl.glBindTexture(gl.GL_TEXTURE_RECTANGLE, 0) 
开发者ID:PRBonn,项目名称:semantic-kitti-api,代码行数:16,代码来源:glow.py

示例10: fillTexture2d

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def fillTexture2d(data,tex = None, interp=True):
    """ data.shape == (Ny,Nx)
          file texture with GL_RED
        data.shape == (Ny,Nx,3)
          file texture with GL_RGB

        if tex == None, returns a new created texture
    """

    if tex is None:
        tex = GL.glGenTextures(1)

    GL.glBindTexture(GL.GL_TEXTURE_2D, tex)
    GL.glPixelStorei(GL.GL_UNPACK_ALIGNMENT,1)
    GL.glTexParameterf (GL.GL_TEXTURE_2D,
                     GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR)
    GL.glTexParameterf (GL.GL_TEXTURE_2D,
                     GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR if interp else GL.GL_NEAREST)

    GL.glTexParameterf (GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
    GL.glTexParameterf (GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
    # GL.glTexParameterf (GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP)
    # GL.glTexParameterf (GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP)

    if data.ndim == 2:
        Ny,Nx = data.shape
        GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGB, Nx, Ny,
                     0, GL.GL_RED, GL.GL_FLOAT, data.astype(np.float32))

    elif data.ndim == 3 and data.shape[2]==3:
        Ny,Nx = data.shape[:2]
        GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGB, Nx, Ny,
                         0, GL.GL_RGB, GL.GL_FLOAT, data.astype(np.float32))

    elif data.ndim == 3 and data.shape[2]==4:
        Ny,Nx = data.shape[:2]
        GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, Nx, Ny,
                         0, GL.GL_RGBA, GL.GL_FLOAT, data.astype(np.float32))

    else:
        raise Exception("data format not supported! \ndata.shape should be either (Ny,Nx) or (Ny,Nx,3)")
    return tex 
开发者ID:maweigert,项目名称:spimagine,代码行数:44,代码来源:gui_utils.py

示例11: __init__

# 需要导入模块: from OpenGL import GL [as 别名]
# 或者: from OpenGL.GL import GL_TEXTURE_WRAP_S [as 别名]
def __init__(self, name, vr_model, vr_diffuse_texture):
        self.name = name
        # create and bind a VAO to hold state for this model
        self.vertex_array = GL.glGenVertexArrays(1)
        GL.glBindVertexArray(self.vertex_array)
        # Populate a vertex buffer
        self.vertex_buffer = GL.glGenBuffers(1)
        GL.glBindBuffer(GL.GL_ARRAY_BUFFER, self.vertex_buffer)
        GL.glBufferData(GL.GL_ARRAY_BUFFER,
                        sizeof(openvr.RenderModel_Vertex_t) * vr_model.unVertexCount,
                        vr_model.rVertexData, GL.GL_STATIC_DRAW)
        # Identify the components in the vertex buffer
        GL.glEnableVertexAttribArray(0)
        hv3sz = sizeof(openvr.HmdVector3_t)
        GL.glVertexAttribPointer(0, 3, GL.GL_FLOAT, False, sizeof(openvr.RenderModel_Vertex_t),
                                 cast(0 * hv3sz, c_void_p))
        GL.glEnableVertexAttribArray(1)
        GL.glVertexAttribPointer(1, 3, GL.GL_FLOAT, False, sizeof(openvr.RenderModel_Vertex_t),
                                 cast(1 * hv3sz, c_void_p))
        GL.glEnableVertexAttribArray(2)
        GL.glVertexAttribPointer(2, 2, GL.GL_FLOAT, False, sizeof(openvr.RenderModel_Vertex_t),
                                 cast(2 * hv3sz, c_void_p))
        # Create and populate the index buffer
        self.index_buffer = GL.glGenBuffers(1)
        GL.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, self.index_buffer)
        GL.glBufferData(GL.GL_ELEMENT_ARRAY_BUFFER,
                        sizeof(c_uint16) * vr_model.unTriangleCount * 3,
                        vr_model.rIndexData, GL.GL_STATIC_DRAW)
        GL.glBindVertexArray(0)
        # create and populate the texture
        self.texture = GL.glGenTextures(1)
        GL.glBindTexture(GL.GL_TEXTURE_2D, self.texture)
        GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, vr_diffuse_texture.unWidth, vr_diffuse_texture.unHeight,
                        0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, vr_diffuse_texture.rubTextureMapData)
        # If this renders black ask McJohn what's wrong.
        GL.glGenerateMipmap(GL.GL_TEXTURE_2D)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
        GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR)
        f_largest = GL.glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
        GL.glTexParameterf(GL.GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, f_largest)
        GL.glBindTexture(GL.GL_TEXTURE_2D, 0)
        self.vertex_count = vr_model.unTriangleCount * 3 
开发者ID:cmbruns,项目名称:pyopenvr,代码行数:46,代码来源:hellovr_glfw.py


注:本文中的OpenGL.GL.GL_TEXTURE_WRAP_S属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。