Skip to content

Commit

Permalink
Make ParseTextureNameAndOption function public.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Oct 19, 2018
1 parent 9347887 commit 7fb5056
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tiny_obj_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ THE SOFTWARE.
*/

//
// version 1.3.1 : Make ParseTextureNameAndOption API public
// version 1.3.0 : Separate warning and error message(breaking API of LoadObj)
// version 1.2.3 : Added color space extension('-colorspace') to tex opts.
// version 1.2.2 : Parse multiple group names.
Expand Down Expand Up @@ -386,6 +387,18 @@ void LoadMtl(std::map<std::string, int> *material_map,
std::vector<material_t> *materials, std::istream *inStream,
std::string *warning, std::string *err);

///
/// Parse texture name and texture option for custom texture parameter through material::unknown_parameter
///
/// @param[out] texname Parsed texture name
/// @param[out] texopt Parsed texopt
/// @param[in] linebuf Input string
/// @param[in] is_bump Is this texture bump/normal?
///
bool ParseTextureNameAndOption(std::string *texname,
texture_option_t *texopt,
const char *linebuf,
const bool is_bump);
} // namespace tinyobj

#endif // TINY_OBJ_LOADER_H_
Expand Down Expand Up @@ -891,7 +904,7 @@ static vertex_index_t parseRawTriple(const char **token) {
return vi;
}

static bool ParseTextureNameAndOption(std::string *texname,
bool ParseTextureNameAndOption(std::string *texname,
texture_option_t *texopt,
const char *linebuf, const bool is_bump) {
// @todo { write more robust lexer and parser. }
Expand Down

0 comments on commit 7fb5056

Please sign in to comment.