OpenSourceのpasGltfライブラリの使い方の解説です
かなり大きく難解なライブラリなのでページを作りました
ほぼ自分用です
PasGltfViewer.dpr
のmainloop関数内
1300行から
ロードのやり方を解説
かなり大きく難解なライブラリなのでページを作りました
ほぼ自分用です
PasGltfViewer.dpr
のmainloop関数内
1300行から
ロードのやり方を解説
FreeAndNil(GLTFInstance); if assigned(GLTFOpenGL) then begin GLTFOpenGL.Unload; FreeAndNil(GLTFOpenGL); end; //ファイル名 FileName:=ExpandFileName(InputFileName); //クラス作成 GLTFOpenGL:=TGLTFOpenGL.Create; GLTFOpenGL.ShadowMapSize:=2048; //ルートパス名 GLTFOpenGL.RootPath:=IncludeTrailingPathDelimiter(ExtractFilePath(FileName)); //ロード GLTFOpenGL.LoadFromFile(FileName); //ライトの方向設定 GLTFOpenGL.AddDefaultDirectionalLight(LightDirection[0],LightDirection[1],LightDirection[2],1.70,1.15,0.70); //アップロード 更新 GLTFOpenGL.Upload; //インスタンス GLTFInstance:=GLTFOpenGL.AcquireInstance; CurrentFileName:=FileName;
コメントをかく