NAME

SDL::Tutorial::3DWorld::Asset::MTL - Support for loading material libraries from MTL files

SYNOPSIS

# Create the object but don't load anything
my $mtl = SDL::Tutorial::3DWorld::Asset::MTL->new(
    file => 'mymaterials.mtl',
);

# Locate a material in the library
$mtl->material('glass');

DESCRIPTION

SDL::Tutorial::3DWorld::Asset::MTL provides a basic implementation of an MTL file parser. MTL files are libraries of material (surface) definitions to be consumed (by name) by OBJ models.

Given a file name, it will load the file and parse the contents into an abstract set of material objects. However, no dependency files or textures of the materials are loaded. Any materials that you use on real models will need to be initialised before the objects they are applied to are displayed.

The current implementation is extremely preliminary and functionality will be gradually fleshed out over time.

SUPPORT

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=OpenGL-RWX

AUTHOR

Adam Kennedy <adamk@cpan.org>

SEE ALSO

OpenGL

COPYRIGHT

Copyright 2010 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.