Skip to content

Problem with displaying textures #107

@servusdei2018

Description

@servusdei2018

Until I commented out line 139 in visualizer.py, textures wouldn't show and instead, models were covered in stripe-like patterns, whose colors were somewhat like the texture they were supposed to have.

System Details:
ARMv7 Quad Core CPU @ 1.4GHz
Broadcom Videocore-IV GPU
1GB RAM

OS Details:
Debian 9 (Stretch)

Here's the code in visualizer.py that causes the problem. I found that by commenting-out the last line (glTexParameterf(texture.image.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)), pywavefront rendered textures properly:

def bind_texture(texture):
    """Draw a single texture"""
    if not getattr(texture, 'image', None):
        texture.image = load_image(texture.find())

    glEnable(texture.image.target)
    glBindTexture(texture.image.target, texture.image.id)
    glTexParameterf(texture.image.target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)
    #glTexParameterf(texture.image.target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions