Skip to content

Implement texture loading and sampling #5

@mvandorp

Description

@mvandorp

Texture.h

    /**
     * Loads the texture with the given filename.
     */
    Texture(std::string textureName);

    /**
     * Samples the texture at the given texture coordinates.
     * @param uv The uv-coordinates.
     * @return The color at the given texture coordinates.
     */
    Vec3Df sample(const Vec2Df &uv) const;

Texture.cpp

// TODO: Implement loading and sampling a texture.

Texture::Texture(std::string textureName) {

}

Vec3Df Texture::sample(const Vec2Df &uv) const {
    // dummy value
    return Vec3Df(0, 0, 0);
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions