-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: furby™ <[email protected]>
- Loading branch information
Showing
20 changed files
with
574 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
.swiftpm | ||
generated | ||
target | ||
.index-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Sources/PixarUSD/UsdImaging/UsdImagingGL/RenderParams.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* ---------------------------------------------------------------- | ||
* :: : M E T A V E R S E : :: | ||
* ---------------------------------------------------------------- | ||
* Licensed under the terms set forth in the LICENSE.txt file, this | ||
* file is available at https://openusd.org/license. | ||
* | ||
* Copyright (C) 2016 Pixar. | ||
* Copyright (C) 2024 Wabi Foundation. All Rights Reserved. | ||
* ---------------------------------------------------------------- | ||
* . x x x . o o o . x x x . : : : . o x o . : : : . | ||
* ---------------------------------------------------------------- */ | ||
|
||
#if canImport(UsdImagingGL) | ||
import UsdImagingGL | ||
|
||
public typealias UsdImagingGLRenderParams = Pixar.UsdImagingGLRenderParams | ||
|
||
public extension UsdImagingGL | ||
{ | ||
typealias RenderParams = UsdImagingGLRenderParams | ||
} | ||
#endif // canImport(UsdImagingGL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* ---------------------------------------------------------------- | ||
* :: : M E T A V E R S E : :: | ||
* ---------------------------------------------------------------- | ||
* Licensed under the terms set forth in the LICENSE.txt file, this | ||
* file is available at https://openusd.org/license. | ||
* | ||
* Copyright (C) 2016 Pixar. | ||
* Copyright (C) 2024 Wabi Foundation. All Rights Reserved. | ||
* ---------------------------------------------------------------- | ||
* . x x x . o o o . x x x . : : : . o x o . : : : . | ||
* ---------------------------------------------------------------- */ | ||
|
||
import Foundation | ||
import PixarUSD | ||
|
||
#if canImport(Metal) && !os(visionOS) | ||
import Metal | ||
import MetalKit | ||
#endif // canImport(Metal) && !os(visionOS) | ||
|
||
public extension Hydra | ||
{ | ||
#if canImport(Metal) && !os(visionOS) | ||
typealias Viewport = Hydra.MTLView | ||
#elseif os(macOS) | ||
typealias Viewport = NSViewRepresentable | ||
#elseif os(visionOS) || os(tvOS) || os(watchOS) | ||
typealias Viewport = UIViewRepresentable | ||
#else | ||
struct Viewport {} | ||
#endif // canImport(Metal) && !os(visionOS) | ||
} | ||
|
||
public extension Hydra.Viewport | ||
{ | ||
init(engine: Hydra.RenderEngine) | ||
{ | ||
#if canImport(Metal) && !os(visionOS) | ||
let device = MTLCreateSystemDefaultDevice()! | ||
let renderer = Hydra.MTLRenderer(device: device)! | ||
self.init(hydra: engine, device: device, renderer: renderer) | ||
#endif // canImport(Metal) && !os(visionOS) | ||
} | ||
} |
Oops, something went wrong.