[Renderer] Define a FrameRenderer
This protocol is a delegate of the view/window/whatever that is running the animation timer. When its renderAtTime() method is called, the rendering surface should be fully prepared for drawing commands.
This commit is contained in:
parent
7e55045d10
commit
bca8180f52
2 changed files with 21 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
C0B61B9E1BF70FD200B91C36 /* Renderer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0B61B931BF70FD200B91C36 /* Renderer.framework */; };
|
||||
C0B61BA31BF70FD200B91C36 /* RendererTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B61BA21BF70FD200B91C36 /* RendererTests.swift */; };
|
||||
C0B61BAF1BF70FE800B91C36 /* OpenGLView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B61BAE1BF70FE800B91C36 /* OpenGLView.swift */; };
|
||||
C0B61BB11BF8085B00B91C36 /* Renderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B61BB01BF8085B00B91C36 /* Renderer.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -31,6 +32,7 @@
|
|||
C0B61BA21BF70FD200B91C36 /* RendererTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RendererTests.swift; sourceTree = "<group>"; };
|
||||
C0B61BA41BF70FD200B91C36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
C0B61BAE1BF70FE800B91C36 /* OpenGLView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenGLView.swift; sourceTree = "<group>"; };
|
||||
C0B61BB01BF8085B00B91C36 /* Renderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Renderer.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -76,6 +78,7 @@
|
|||
children = (
|
||||
C0B61B961BF70FD200B91C36 /* Renderer.h */,
|
||||
C0B61B981BF70FD200B91C36 /* Info.plist */,
|
||||
C0B61BB01BF8085B00B91C36 /* Renderer.swift */,
|
||||
);
|
||||
path = Renderer;
|
||||
sourceTree = "<group>";
|
||||
|
@ -205,6 +208,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C0B61BB11BF8085B00B91C36 /* Renderer.swift in Sources */,
|
||||
C0B61BAF1BF70FE800B91C36 /* OpenGLView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -394,6 +398,7 @@
|
|||
C0B61BA91BF70FD200B91C36 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C0B61BAA1BF70FD200B91C36 /* Build configuration list for PBXNativeTarget "RendererTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
@ -402,6 +407,7 @@
|
|||
C0B61BAC1BF70FD200B91C36 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
|
|
15
Renderer/Renderer/Renderer.swift
Normal file
15
Renderer/Renderer/Renderer.swift
Normal file
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// Renderer.swift
|
||||
// Renderer
|
||||
//
|
||||
// Created by Eryn Wells on 11/14/15.
|
||||
// Copyright © 2015 Eryn Wells. All rights reserved.
|
||||
//
|
||||
|
||||
import CoreVideo
|
||||
|
||||
public typealias FrameTimeStamp = CVTimeStamp
|
||||
|
||||
public protocol FrameRenderer {
|
||||
func renderAtTime(time: FrameTimeStamp)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue