Skip to content

Commit b840fc0

Browse files
committed
Code generation changes to support the Cesium gltf extensions
1 parent 82d5762 commit b840fc0

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

build/SharpGLTF.CodeGen/Constants.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ namespace SharpGLTF
77
static class Constants
88
{
99
#region root paths
10+
11+
//public static string RemoteSchemaRepo = "https://github.com/KhronosGroup/glTF.git";
12+
public static string RemoteSchemaRepo = "https://github.com/CesiumGS/glTF.git";
1013

11-
public static string RemoteSchemaRepo = "https://github.com/KhronosGroup/glTF.git";
14+
public static string RemoteSchemaBranch = "3d-tiles-next";
1215

1316
/// <summary>
1417
/// Program directory

build/SharpGLTF.CodeGen/Program.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ partial class Program
1515

1616
static void Main(string[] args)
1717
{
18-
SchemaDownload.Syncronize(Constants.RemoteSchemaRepo, Constants.LocalRepoDirectory);
18+
SchemaDownload.Syncronize(Constants.RemoteSchemaRepo, Constants.RemoteSchemaBranch, Constants.LocalRepoDirectory);
1919

2020
var processors = new List<SchemaProcessor>();
2121

@@ -46,6 +46,11 @@ static void Main(string[] args)
4646
// gpu mesh instancing
4747
processors.Add(new MeshGpuInstancingExtension());
4848

49+
// Instance & mesh features & structural metadata
50+
processors.Add(new InstanceFeaturesExtension());
51+
processors.Add(new MeshFeaturesExtension());
52+
processors.Add(new StructuralMetadataExtension());
53+
4954
// textures
5055
processors.Add(new TextureTransformExtension());
5156
processors.Add(new TextureDDSExtension());

build/SharpGLTF.CodeGen/SchemaDownload.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ namespace SharpGLTF
99
/// </summary>
1010
static class SchemaDownload
1111
{
12-
public static void Syncronize(string remoteUrl, string localDirectory)
12+
public static void Syncronize(string remoteUrl, string remoteBranch, string localDirectory)
1313
{
1414
if (LibGit2Sharp.Repository.Discover(localDirectory) == null)
1515
{
1616
Console.WriteLine($"Cloning {remoteUrl} can take several minutes; Please wait...");
1717

18-
LibGit2Sharp.Repository.Clone(remoteUrl, localDirectory);
18+
LibGit2Sharp.Repository.Clone(remoteUrl, localDirectory, new CloneOptions() { BranchName = remoteBranch });
1919

2020
Console.WriteLine($"... Clone Completed");
2121

0 commit comments

Comments
 (0)