     }
     
     public func transitionRenderEncoderTo(renderer: Renderer?) -> RenderEncoderTransition? {
-        if let rendererTypeId = renderer?.rendererType {
-            return transitionMap[rendererTypeId]
+        if let rendererType = renderer?.name {
+            return transitionMap[rendererType]
         } else {
             //TODO: more 'eloquent' way to return here? or to structure this functions?
             return nil


//typealias ComputeEncoderTransition = ((MTLCommandBuffer, MTLComputeCommandEncoder) -> MTLComputeCommandEncoder)

public class RendererBase: Renderer {
    public var name: String?
    public var rendererType: Int = 0 // use enum for renderer types
    public var transitionMap: [Int:RenderEncoderTransition] = [:]
    public var createRenderEncoderBlock: RenderEncoderCreateMonad? = RendererBase.createRenderEncoderDefault()
    public var configureRenderEncoderBlock: RenderEncoderConfigureBlock?
    
    public var cullMode: MTLCullMode = .Front

public typealias RendererEncodeBlock = ((MTLRenderCommandEncoder) -> Void)
public typealias RenderEncoderConfigureBlock = ((MTLRenderCommandEncoder) -> Void)
public typealias RenderEncoderTransition = ((MTLRenderCommandEncoder) -> MTLRenderCommandEncoder)
public typealias RenderEncoderTransitionMap = [String:RenderEncoderTransition]
public typealias RenderEncoderCreateMonad = ((MTLCommandBuffer, MTLRenderPassDescriptor) -> MTLRenderCommandEncoder)

public protocol Renderer {
    var name: String? { get set }
    var transitionMap: RenderEncoderTransitionMap { get set }
    var createRenderEncoderBlock: RenderEncoderCreateMonad? { get set }
    
    // should these kinds of properties only be set from inside blocks?
