-
Notifications
You must be signed in to change notification settings - Fork 2
/
v002MasterPluginInterface.h
57 lines (40 loc) · 1.95 KB
/
v002MasterPluginInterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// v002MasterPluginInterface.h
// v002Blurs
//
// Created by vade on 4/7/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
#import "v002Shader.h"
#import "v002FBO.h"
#define kv002DescriptionAddOnText @"\n\rv002 Plugins : http://v002.info\n\nCopyright:\nvade - Anton Marini.\nbangnoise - Tom Butterworth\n\n2008-2099 - Creative Commons Non Commercial Share Alike Attribution 3.0"
// we pass in an instance so we dont have to strongly reference self in our block via weak/strong dance:
// __unsafe_unretained typeof(v002_PLUGIN_CLASS_NAME_REPLACE_ME)
typedef void(^ShaderUniformBlock)(CGLContextObj cgl_ctx, __unsafe_unretained id instance, __unsafe_unretained id<QCPlugInInputImageSource> image);
@interface v002_PLUGIN_CLASS_NAME_REPLACE_ME : QCPlugIn
{
v002Shader* pluginShader;
NSString* pluginShaderName;
v002FBO* pluginFBO;
ShaderUniformBlock shaderUniformBlock;
}
@property (nonatomic, copy) ShaderUniformBlock shaderUniformBlock;
@property (readwrite, retain) NSString* pluginShaderName;
//- (v002FBO*) pluginFBO;
//- (v002Shader*) pluginShader;
@end
@interface v002_PLUGIN_CLASS_NAME_REPLACE_ME (Execution)
- (BOOL) startExecution:(id<QCPlugInContext>)context NS_REQUIRES_SUPER;
- (void) stopExecution:(id<QCPlugInContext>)context NS_REQUIRES_SUPER;
#pragma mark - Helper Methods
// Is a Input Image that is currently, locked, bound, and active Floating Point?
- (BOOL) boundImageIsFloatingPoint:(id<QCPlugInInputImageSource>)image inContext:(CGLContextObj)cgl_ctx;
// Machine Endian Correct pixel format
- (NSString*) pixelFormatIfUsingFloat:(BOOL)useFloat;
// Helper method that renders a quad to the standard FBO.
// Requires our shaderUniformBlock to be set
- (GLuint) singleImageRenderWithContext:(CGLContextObj)cgl_ctx image:(id<QCPlugInInputImageSource>)image useFloat:(BOOL)useFloat;
@end
@compatibility_alias v002MasterPluginInterface v002_PLUGIN_CLASS_NAME_REPLACE_ME;