-
Notifications
You must be signed in to change notification settings - Fork 4
/
v002RuttEtraPlugIn.h
95 lines (81 loc) · 3.1 KB
/
v002RuttEtraPlugIn.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// v002_Rutt_Etra_2_0PlugIn.h
// v002 Rutt Etra 2.0
//
// Created by vade on 2/15/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Quartz/Quartz.h>
#import <OpenGL/OpenGL.h>
#import "v002Shader.h"
@interface v002RuttEtraPlugIn : QCPlugIn
{
// GL resources
v002Shader* ruttEtraMRTshader;
v002Shader* ruttEtraMRTshaderNormals;
v002Shader* ruttEtraMRTshaderNormalsHQ;
GLuint vaoID; // the combined state vector for all buffers for drawing
// FBO and texture objects
GLuint fboID; // for drawing our MRT targets
GLuint texureAttachmentVertices; // vertices
GLuint texureAttachmentNormals; // normals
GLuint texureAttachmentTextureCoords; // texture coords
// Buffer Objects
GLuint vertexBufferID;
GLuint textureBufferID;
GLuint normalBufferID;
GLuint indexBufferID;
// state saving
// GL State
GLint previousFBO;
GLint previousReadFBO;
GLint previousDrawFBO;
GLint previousReadBuffer;
GLint previousPixelPackBuffer;
GLint previousShader;
double* eq1;
double* eq2;
}
@property (assign) id<QCPlugInInputImageSource> inputImage;
@property (assign) id<QCPlugInInputImageSource> inputImageLuma;
@property (assign) id<QCPlugInInputImageSource> inputPointSpriteImage;
@property (assign) CGColorRef inputColor;
@property (assign) NSUInteger inputLumaOrRaw;
@property (assign) BOOL inputColorCorrect;
@property (assign) NSUInteger inputResolutionX;
@property (assign) NSUInteger inputResolutionY;
@property (assign) NSUInteger inputDrawType;
@property (assign) double inputDepthScale;
@property (assign) double inputWireFrameWidth;
@property (assign) BOOL inputAntialias;
@property (assign) BOOL inputCalculateNormals;
@property (assign) double inputNormalCoeff;
@property (assign) BOOL inputHQNormals;
@property (assign) BOOL inputAttenuatePoints;
@property (assign) double inputConstantAttenuation;
@property (assign) double inputLinearAttenuation;
@property (assign) double inputQuadraticAttenuation;
@property (assign) NSUInteger inputUVGenMode;
@property (assign) double inputTranslationX;
@property (assign) double inputTranslationY;
@property (assign) double inputTranslationZ;
@property (assign) double inputRotationX;
@property (assign) double inputRotationY;
@property (assign) double inputRotationZ;
@property (assign) double inputScaleX;
@property (assign) double inputScaleY;
@property (assign) double inputScaleZ;
@property (assign) NSUInteger inputBlendMode;
@property (assign) NSUInteger inputDepthMode;
@property (assign) BOOL inputEnableClipping;
@property (assign) double inputMinClip;
@property (assign) double inputMaxClip;
@end
@interface v002RuttEtraPlugIn (Execution)
- (void) createPersistantGLResourcesInContext:(CGLContextObj)cgl_ctx;
- (void) destroyPersistantGLResources;
- (void) createGLResourcesInContext:(CGLContextObj)cgl_ctx width:(NSUInteger)w height:(NSUInteger)h drawType:(NSUInteger)drawType normals:(BOOL)normals;
- (void) destroyGLResourcesInContext:(CGLContextObj)cgl_ctx;
- (void) pushGLState:(CGLContextObj)cgl_ctx;
- (void) popGLState:(CGLContextObj)cgl_ctx;
@end