Update comment in api-tutorial example.

Fix sdlviewer build.
This commit is contained in:
Syoyo Fujita
2022-10-31 17:58:18 +09:00
parent 79f800b00c
commit a8f1768527
2 changed files with 10 additions and 6 deletions

View File

@@ -14,9 +14,12 @@
// create a Scene
//
void CreateScene(tinyusdz::Stage *stage) {
// TinyUSDZ does not use mutex, smart pointers(e.g. shared_ptr) and C++
// exception. API is not multi-thread safe, thus if you need to manipulate a
// scene in multi-threaded context, The app must take care of resource locks
// TinyUSDZ API does not use mutex, smart pointers(e.g. shared_ptr) and C++
// exception. Also threading is opional in TinyUSDZ and currently multi-threading is not used.
// (`value::token` does not use mutex by default, see comments in token-types.hh for details)
//
// API is not multi-thread safe, thus if you want to manipulate a
// scene(Stage) in multi-threaded context, The app must take care of resource locks
// in the app layer.
//
@@ -192,10 +195,10 @@ void CreateScene(tinyusdz::Stage *stage) {
xformPrim.children().emplace_back(std::move(meshPrim));
// Use GetRootPrims() to retrieve Stage's root Prim array.
// Use Stage::root_prims() to retrieve Stage's root Prim array.
stage->root_prims().emplace_back(std::move(xformPrim));
// You can add Stage metadatum through metas()
// You can add Stage metadatum through Stage::metas()
tinyusdz::StringData sdata;
sdata.value = "Generated by TinyUSDZ api_tutorial.";
stage->metas().comment = sdata;
@@ -203,7 +206,7 @@ void CreateScene(tinyusdz::Stage *stage) {
{
// CustomDataType is similar to VtDictionary.
// it is a map<string, MetaVariable>
// MetaVariable is similar to Value, but accepts limited variation of types(double, token, string, ...)
// MetaVariable is similar to Value, but accepts limited variation of types(double, token, string, float3[], ...)
tinyusdz::CustomDataType customData;
tinyusdz::MetaVariable metavar;
double mycustom = 1.3;

View File

@@ -305,6 +305,7 @@ list(
../../src/usdShade.cc
../../src/xform.cc
../../src/stage.cc
../../src/linear-algebra.cc
../../src/tydra/render-data.cc
../../src/tydra/scene-access.cc
)