Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fb5056

Browse files
committed
Make ParseTextureNameAndOption function public.
1 parent 9347887 commit 7fb5056

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tiny_obj_loader.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ THE SOFTWARE.
2323
*/
2424

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

390+
///
391+
/// Parse texture name and texture option for custom texture parameter through material::unknown_parameter
392+
///
393+
/// @param[out] texname Parsed texture name
394+
/// @param[out] texopt Parsed texopt
395+
/// @param[in] linebuf Input string
396+
/// @param[in] is_bump Is this texture bump/normal?
397+
///
398+
bool ParseTextureNameAndOption(std::string *texname,
399+
texture_option_t *texopt,
400+
const char *linebuf,
401+
const bool is_bump);
389402
} // namespace tinyobj
390403

391404
#endif // TINY_OBJ_LOADER_H_
@@ -891,7 +904,7 @@ static vertex_index_t parseRawTriple(const char **token) {
891904
return vi;
892905
}
893906

894-
static bool ParseTextureNameAndOption(std::string *texname,
907+
bool ParseTextureNameAndOption(std::string *texname,
895908
texture_option_t *texopt,
896909
const char *linebuf, const bool is_bump) {
897910
// @todo { write more robust lexer and parser. }

0 commit comments

Comments
 (0)