2011-12-06 11 views
1

GPUではなく、CPUでCoreImageフィルタを実行したいと思います。 CIのドキュメントでは、私はあなたがこのような文脈何か(see here)作成することにより、CPU上で実行されるフィルタお好み表現できることを発見しました:フィルタを適用するにはCoreImage - CPUでフィルタを実行

NSDictionary * cpuonlycontextOptions = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool: YES],kCIContextUseSoftwareRenderer,nil]; 
CGContextRef cgcontext = [[NSGraphicsContext graphicsContextWithBitmapImageRep:rep] graphicsPort]; 
CIContext * cpu_context = [CIContext contextWithCGContext:cgcontext options: cpuonlycontextOptions]; 

を、私は現在やっていますこれは:

問題は、私はどこでどのようにCPUのCIコンテキストを設定するのか分かりません。これはどのように正しく行われますか?

答えて

0

これは、CPUレンダリングを強制的に:

NSDictionary *theCIContextOptions = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], kCIContextUseSoftwareRenderer, NULL]; 

CIContext *theCIContext = [CIContext contextWithOptions:theCIContextOptions ]; 
関連する問題