Permalink
Browse files

GLTools v1.6

0 parents commit 3f980e5fc6861fc8a6b4e4a4e9f2b4fff29d8fad @jlstrecker jlstrecker committed May 21, 2012
Showing with 12,746 additions and 0 deletions.
  1. +901 −0 GLTools.xcodeproj/project.pbxproj
  2. +3 −0 GLToolsPrincipal.h
  3. +108 −0 GLToolsPrincipal.m
  4. +4 −0 GLTools_Prefix.pch
  5. +26 −0 Info.plist
  6. +21 −0 KinemeGLBlendEquationPatch.h
  7. +95 −0 KinemeGLBlendEquationPatch.m
  8. +61 −0 KinemeGLBlendEquationPatch.xml
  9. +13 −0 KinemeGLCameraPatch.h
  10. +32 −0 KinemeGLCameraPatch.m
  11. +68 −0 KinemeGLCameraPatch.xml
  12. +18 −0 KinemeGLClearDepthPatch.h
  13. +56 −0 KinemeGLClearDepthPatch.m
  14. +36 −0 KinemeGLClearDepthPatch.xml
  15. +23 −0 KinemeGLColorMaskPatch.h
  16. +61 −0 KinemeGLColorMaskPatch.m
  17. +57 −0 KinemeGLColorMaskPatch.xml
  18. +26 −0 KinemeGLContextInfoPatch.h
  19. +129 −0 KinemeGLContextInfoPatch.m
  20. +115 −0 KinemeGLContextInfoPatch.xml
  21. +24 −0 KinemeGLCubeStructurePatch.h
  22. +247 −0 KinemeGLCubeStructurePatch.m
  23. +61 −0 KinemeGLCubeStructurePatch.xml
  24. +11 −0 KinemeGLDepthBufferAlphaThresholdPatch.h
  25. +60 −0 KinemeGLDepthBufferAlphaThresholdPatch.m
  26. +37 −0 KinemeGLDepthBufferAlphaThresholdPatch.xml
  27. +18 −0 KinemeGLDepthSortEnvironmentPatch.h
  28. +91 −0 KinemeGLDepthSortEnvironmentPatch.m
  29. +111 −0 KinemeGLDepthSortEnvironmentPatch.xml
  30. +75 −0 KinemeGLDepthSortSpritePatch.h
  31. +279 −0 KinemeGLDepthSortSpritePatch.m
  32. +99 −0 KinemeGLDepthSortSpritePatch.xml
  33. +11 −0 KinemeGLFieldOfViewPatch.h
  34. +83 −0 KinemeGLFieldOfViewPatch.m
  35. +38 −0 KinemeGLFieldOfViewPatch.xml
  36. +21 −0 KinemeGLFrustumPatch.h
  37. +69 −0 KinemeGLFrustumPatch.m
  38. +79 −0 KinemeGLFrustumPatch.xml
  39. +21 −0 KinemeGLGenerateMipMapPatch.h
  40. +80 −0 KinemeGLGenerateMipMapPatch.m
  41. +50 −0 KinemeGLGenerateMipMapPatch.xml
  42. +33 −0 KinemeGLGridEditorPatch.h
  43. +216 −0 KinemeGLGridEditorPatch.m
  44. +132 −0 KinemeGLGridEditorPatch.xml
  45. +15 −0 KinemeGLGridGeneratorPatch.h
  46. +109 −0 KinemeGLGridGeneratorPatch.m
  47. +54 −0 KinemeGLGridGeneratorPatch.xml
  48. +39 −0 KinemeGLGridPatch.h
  49. +222 −0 KinemeGLGridPatch.m
  50. +139 −0 KinemeGLGridPatch.xml
  51. +39 −0 KinemeGLGridRendererPatch.h
  52. +442 −0 KinemeGLGridRendererPatch.m
  53. +83 −0 KinemeGLGridRendererPatch.xml
  54. +13 −0 KinemeGLInverseRotation.h
  55. +62 −0 KinemeGLInverseRotation.m
  56. +47 −0 KinemeGLInverseRotation.xml
  57. +9 −0 KinemeGLLightingBypassPatch.h
  58. +54 −0 KinemeGLLightingBypassPatch.m
  59. +33 −0 KinemeGLLightingBypassPatch.xml
  60. +55 −0 KinemeGLLineExpressionPatch.h
  61. +355 −0 KinemeGLLineExpressionPatch.m
  62. +159 −0 KinemeGLLineExpressionPatch.xml
  63. +34 −0 KinemeGLLinePatch.h
  64. +112 −0 KinemeGLLinePatch.m
  65. +142 −0 KinemeGLLinePatch.xml
  66. +36 −0 KinemeGLLineStructurePatch.h
  67. +189 −0 KinemeGLLineStructurePatch.m
  68. +88 −0 KinemeGLLineStructurePatch.xml
  69. +29 −0 KinemeGLLoadMatrixPatch.h
  70. +102 −0 KinemeGLLoadMatrixPatch.m
  71. +165 −0 KinemeGLLoadMatrixPatch.xml
  72. +11 −0 KinemeGLLogicOpPatch.h
  73. +78 −0 KinemeGLLogicOpPatch.m
  74. +52 −0 KinemeGLLogicOpPatch.xml
  75. +21 −0 KinemeGLLookAtPatch.h
  76. +108 −0 KinemeGLLookAtPatch.m
  77. +93 −0 KinemeGLLookAtPatch.xml
  78. +27 −0 KinemeGLMultMatrixPatch.h
  79. +78 −0 KinemeGLMultMatrixPatch.m
  80. +153 −0 KinemeGLMultMatrixPatch.xml
  81. +17 −0 KinemeGLOrthoPatch.h
  82. +86 −0 KinemeGLOrthoPatch.m
  83. +79 −0 KinemeGLOrthoPatch.xml
  84. +23 −0 KinemeGLPointPatch.h
  85. +125 −0 KinemeGLPointPatch.m
  86. +79 −0 KinemeGLPointPatch.xml
  87. +23 −0 KinemeGLPointStructurePatch.h
  88. +217 −0 KinemeGLPointStructurePatch.m
  89. +76 −0 KinemeGLPointStructurePatch.xml
  90. +19 −0 KinemeGLPolygonModePatch.h
  91. +119 −0 KinemeGLPolygonModePatch.m
  92. +111 −0 KinemeGLPolygonModePatch.xml
  93. +21 −0 KinemeGLPolygonOffsetPatch.h
  94. +53 −0 KinemeGLPolygonOffsetPatch.m
  95. +40 −0 KinemeGLPolygonOffsetPatch.xml
  96. +44 −0 KinemeGLQuadPatch.h
  97. +111 −0 KinemeGLQuadPatch.m
  98. +209 −0 KinemeGLQuadPatch.xml
  99. +28 −0 KinemeGLQuadStructurePatch.h
  100. +179 −0 KinemeGLQuadStructurePatch.m
  101. +117 −0 KinemeGLQuadStructurePatch.xml
  102. +30 −0 KinemeGLReadPixelsPatch.h
  103. +114 −0 KinemeGLReadPixelsPatch.m
  104. +63 −0 KinemeGLReadPixelsPatch.xml
  105. +18 −0 KinemeGLRenderInImageWithDepthPatch.h
  106. +167 −0 KinemeGLRenderInImageWithDepthPatch.m
  107. +57 −0 KinemeGLRenderInImageWithDepthPatch.xml
  108. +4 −0 KinemeGLRenderer.h
  109. +23 −0 KinemeGLScalePatch.h
  110. +58 −0 KinemeGLScalePatch.m
  111. +57 −0 KinemeGLScalePatch.xml
  112. +21 −0 KinemeGLScissorPatch.h
  113. +68 −0 KinemeGLScissorPatch.m
  114. +55 −0 KinemeGLScissorPatch.xml
  115. +20 −0 KinemeGLShadeModelPatch.h
  116. +66 −0 KinemeGLShadeModelPatch.m
  117. +41 −0 KinemeGLShadeModelPatch.xml
  118. +36 −0 KinemeGLSplinePatch.h
  119. +461 −0 KinemeGLSplinePatch.m
  120. +101 −0 KinemeGLSplinePatch.xml
  121. +5 −0 KinemeGLSplinePatchUI.h
  122. +26 −0 KinemeGLSplinePatchUI.m
  123. +45 −0 KinemeGLSplinePatchUI.nib/classes.nib
  124. +20 −0 KinemeGLSplinePatchUI.nib/info.nib
  125. BIN KinemeGLSplinePatchUI.nib/keyedobjects.nib
  126. +25 −0 KinemeGLStereoEnvironmentPatch.h
  127. +243 −0 KinemeGLStereoEnvironmentPatch.m
  128. +118 −0 KinemeGLStereoEnvironmentPatch.xml
  129. +16 −0 KinemeGLStructureRendererPatch.h
  130. +135 −0 KinemeGLStructureRendererPatch.m
  131. +41 −0 KinemeGLStructureRendererPatch.xml
  132. +38 −0 KinemeGLTorusPatch.h
  133. +132 −0 KinemeGLTorusPatch.m
  134. +117 −0 KinemeGLTorusPatch.xml
  135. +36 −0 KinemeGLTrianglePatch.h
  136. +97 −0 KinemeGLTrianglePatch.m
  137. +163 −0 KinemeGLTrianglePatch.xml
  138. +28 −0 KinemeGLTriangleStructurePatch.h
  139. +154 −0 KinemeGLTriangleStructurePatch.m
  140. +110 −0 KinemeGLTriangleStructurePatch.xml
  141. +21 −0 KinemeGLViewportPatch.h
  142. +60 −0 KinemeGLViewportPatch.m
  143. +57 −0 KinemeGLViewportPatch.xml
  144. +36 −0 KinemeSuperGLSLGridPatch.h
  145. +333 −0 KinemeSuperGLSLGridPatch.m
  146. +104 −0 KinemeSuperGLSLGridPatch.xml
  147. +7 −0 LICENSE.txt
  148. +24 −0 README.markdown
  149. +22 −0 UnitTests-Info.plist
  150. +7 −0 UnitTests.h
  151. +44 −0 UnitTests.m
  152. BIN compositions/GLTools-blend-equation.qtz
  153. BIN compositions/GLTools-clear-depth.qtz
  154. BIN compositions/GLTools-cube-structure.qtz
  155. BIN compositions/GLTools-depthbufferalphathreshold.qtz
  156. BIN compositions/GLTools-depthsort.qtz
  157. BIN compositions/GLTools-inverse-tracking.qtz
  158. BIN compositions/GLTools-line-expression.qtz
  159. BIN compositions/GLTools-opencl-circle.qtz
  160. BIN compositions/GLTools-polygon-offset.qtz
  161. BIN compositions/GLTools-scale.qtz
  162. BIN compositions/GLTools-scissor.qtz
  163. BIN compositions/GLTools-shade-polygon-mode.qtz
  164. BIN compositions/GLTools-spline-feedback.qtz
  165. BIN compositions/GLTools-stereo-spheres.qtz
  166. BIN compositions/GLTools-structure-circle-point-index.qtz
  167. BIN compositions/GLTools-structure-circle.qtz
  168. BIN compositions/GLTools-structure-noise.qtz
  169. BIN compositions/GLTools-structure-quad-alpha.qtz
  170. BIN compositions/GLTools-structure-quads.qtz
  171. BIN compositions/GLTools-structure-renderer.qtz
  172. BIN compositions/GLTools-structure-syncom-sphere.qtz
  173. BIN compositions/GLTools-structure-trianglesubtract.qtz
  174. BIN compositions/GLTools-superglsl.qtz
  175. BIN compositions/GLTools-viewport-4pane.qtz
  176. BIN compositions/GLTools-wavestructure.qtz
  177. BIN tests/GLStereo2pix.qtz
  178. BIN tests/GLTools-stereo-optimizedExecution.qtz

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,3 @@
+@interface KinemeGLToolsPlugin : NSObject <GFPlugInRegistration>
++ (void)registerNodesWithManager:(QCNodeManager*)manager;
+@end
@@ -0,0 +1,108 @@
+#import "GLToolsPrincipal.h"
+
+#import "KinemeGLContextInfoPatch.h"
+
+#import "KinemeGLPointPatch.h"
+#import "KinemeGLPointStructurePatch.h"
+#import "KinemeGLLinePatch.h"
+#import "KinemeGLLineStructurePatch.h"
+#import "KinemeGLTrianglePatch.h"
+#import "KinemeGLTriangleStructurePatch.h"
+#import "KinemeGLQuadPatch.h"
+#import "KinemeGLQuadStructurePatch.h"
+#import "KinemeGLSplinePatch.h"
+#import "KinemeGLClearDepthPatch.h"
+#import "KinemeGLGenerateMipMapPatch.h"
+#import "KinemeGLCubeStructurePatch.h"
+
+#import "KinemeGLStructureRendererPatch.h"
+
+#import "KinemeGLPolygonModePatch.h"
+#import "KinemeGLMultMatrixPatch.h"
+#import "KinemeGLLoadMatrixPatch.h"
+#import "KinemeGLScalePatch.h"
+#import "KinemeGLBlendEquationPatch.h"
+#import "KinemeGLShadeModelPatch.h"
+#import "KinemeGLLightingBypassPatch.h"
+#import "KinemeGLViewportPatch.h"
+#import "KinemeGLFieldOfViewPatch.h"
+#import "KinemeGLPolygonOffsetPatch.h"
+
+#import "KinemeGLDepthBufferAlphaThresholdPatch.h"
+#import "KinemeGLLogicOpPatch.h"
+#import "KinemeGLOrthoPatch.h"
+#import "KinemeGLFrustumPatch.h"
+#import "KinemeGLStereoEnvironmentPatch.h"
+#import "KinemeGLColorMaskPatch.h"
+#import "KinemeGLScissorPatch.h"
+
+#import "KinemeGLRenderInImageWithDepthPatch.h"
+
+#import "KinemeGLLookAtPatch.h"
+#import "KinemeGLReadPixelsPatch.h"
+#import "KinemeGLGridPatch.h"
+#import "KinemeGLGridRendererPatch.h"
+#import "KinemeGLGridGeneratorPatch.h"
+#import "KinemeGLGridEditorPatch.h"
+#import "KinemeGLCameraPatch.h"
+#import "KinemeGLInverseRotation.h"
+
+#import "KinemeSuperGLSLGridPatch.h"
+#import "KinemeGLTorusPatch.h"
+#import "KinemeGLLineExpressionPatch.h"
+
+#import "KinemeGLDepthSortEnvironmentPatch.h"
+#import "KinemeGLDepthSortSpritePatch.h"
+
+#import <objc/runtime.h>
+
+@implementation KinemeGLToolsPlugin
++ (void)registerNodesWithManager:(QCNodeManager*)manager
+{
+ KIRegisterPatch(KinemeGLBlendEquationPatch);
+ KIRegisterPatch(KinemeGLCameraPatch);
+ KIRegisterPatch(KinemeGLClearDepthPatch);
+ KIRegisterPatch(KinemeGLColorMaskPatch);
+ KIRegisterPatch(KinemeGLContextInfoPatch);
+ KIRegisterPatch(KinemeGLCubeStructurePatch);
+ KIRegisterPatch(KinemeGLDepthBufferAlphaThresholdPatch);
+ KIRegisterPatch(KinemeGLDepthSortEnvironmentPatch);
+ KIRegisterPatch(KinemeGLDepthSortSpritePatch);
+ KIRegisterPatch(KinemeGLFieldOfViewPatch);
+ KIRegisterPatch(KinemeGLFrustumPatch);
+ KIRegisterPatch(KinemeGLGenerateMipMapPatch);
+ KIRegisterPatch(KinemeGLGridEditorPatch);
+ KIRegisterPatch(KinemeGLGridGeneratorPatch);
+ KIRegisterPatch(KinemeGLGridPatch);
+ KIRegisterPatch(KinemeGLGridRendererPatch);
+ KIRegisterPatch(KinemeGLInverseRotation);
+ KIRegisterPatch(KinemeGLLightingBypassPatch);
+ KIRegisterPatch(KinemeGLLineExpressionPatch);
+ KIRegisterPatch(KinemeGLLinePatch);
+ KIRegisterPatch(KinemeGLLineStructurePatch);
+ KIRegisterPatch(KinemeGLLoadMatrixPatch);
+ KIRegisterPatch(KinemeGLLogicOpPatch);
+ KIRegisterPatch(KinemeGLLookAtPatch);
+ KIRegisterPatch(KinemeGLMultMatrixPatch);
+ KIRegisterPatch(KinemeGLOrthoPatch);
+ KIRegisterPatch(KinemeGLPointPatch);
+ KIRegisterPatch(KinemeGLPointStructurePatch);
+ KIRegisterPatch(KinemeGLPolygonModePatch);
+ KIRegisterPatch(KinemeGLPolygonOffsetPatch);
+ KIRegisterPatch(KinemeGLQuadPatch);
+ KIRegisterPatch(KinemeGLQuadStructurePatch);
+ KIRegisterPatch(KinemeGLReadPixelsPatch);
+ KIRegisterPatch(KinemeGLRenderInImageWithDepthPatch);
+ KIRegisterPatch(KinemeGLScalePatch);
+ KIRegisterPatch(KinemeGLScissorPatch);
+ KIRegisterPatch(KinemeGLShadeModelPatch);
+ KIRegisterPatch(KinemeGLSplinePatch);
+ KIRegisterPatch(KinemeGLStereoEnvironmentPatch);
+ KIRegisterPatch(KinemeGLStructureRendererPatch);
+ KIRegisterPatch(KinemeGLTorusPatch);
+ KIRegisterPatch(KinemeGLTrianglePatch);
+ KIRegisterPatch(KinemeGLTriangleStructurePatch);
+ KIRegisterPatch(KinemeGLViewportPatch);
+ KIRegisterPatch(KinemeSuperGLSLGridPatch);
+}
+@end
@@ -0,0 +1,4 @@
+#ifdef __OBJC__
+ #import <SkankySDK/SkankySDK.h>
+ #import <Cocoa/Cocoa.h>
+#endif
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>net.kineme.GLTools</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.7</string>
+ <key>CFBundleDisplayName</key>
+ <string></string>
+ <key>GFPlugIn</key>
+ <true/>
+ <key>NSPrincipalClass</key>
+ <string>KinemeGLToolsPlugin</string>
+</dict>
+</plist>
@@ -0,0 +1,21 @@
+/*
+ * GLBlendEquation.h
+ * GLTools
+ *
+ * Created by Christopher Wright on 9/17/08.
+ * Copyright (c) 2008 Kosada Incorporated. All rights reserved.
+ *
+ */
+
+
+
+@interface KinemeGLBlendEquationPatch : QCPatch
+{
+ QCIndexPort *inputRGBEquation;
+ QCIndexPort *inputAlphaEquation;
+}
+
+- (id)initWithIdentifier:(id)fp8;
+
+- (BOOL)execute:(QCOpenGLContext *)context time:(double)time arguments:(NSDictionary *)arguments;
+@end
@@ -0,0 +1,95 @@
+/*
+ * GLBlendEquation.m
+ * GLTools
+ *
+ * Created by Christopher Wright on 9/17/08.
+ * Copyright (c) 2008 Kosada Incorporated. All rights reserved.
+ *
+ */
+
+#import <OpenGL/CGLMacro.h>
+#import "KinemeGLBlendEquationPatch.h"
+
+@implementation KinemeGLBlendEquationPatch : QCPatch
+
++ (QCPatchExecutionMode)executionModeWithIdentifier:(id)fp8
+{
+ return 1;
+}
+
++ (BOOL)allowsSubpatchesWithIdentifier:(id)fp8
+{
+ return YES;
+}
+
++ (BOOL)isSafe
+{
+ return YES;
+}
+
+- (id)initWithIdentifier:(id)fp8
+{
+ if(self=[super initWithIdentifier:fp8])
+ {
+ [inputRGBEquation setMaxIndexValue: 4];
+ [inputAlphaEquation setMaxIndexValue: 4];
+ [[self userInfo] setObject:@"Kineme GL Blend Equation" forKey:@"name"];
+ }
+
+ return self;
+}
+
+- (BOOL)execute:(QCOpenGLContext *)context time:(double)time arguments:(NSDictionary *)arguments
+{
+ GLint rgbEqu, alphaEqu, oldRGBEqu, oldAlphaEqu;
+
+ CGLContextObj cgl_ctx = [context CGLContextObj];
+
+ glGetIntegerv(GL_BLEND_EQUATION_RGB, &oldRGBEqu);
+ glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &oldAlphaEqu);
+
+ switch([inputRGBEquation indexValue])
+ {
+ case 0:
+ rgbEqu = GL_FUNC_ADD;
+ break;
+ case 1:
+ rgbEqu = GL_FUNC_SUBTRACT;
+ break;
+ case 2:
+ rgbEqu = GL_FUNC_REVERSE_SUBTRACT;
+ break;
+ case 3:
+ rgbEqu = GL_MIN;
+ break;
+ case 4:
+ rgbEqu = GL_MAX;
+ }
+ switch([inputAlphaEquation indexValue])
+ {
+ case 0:
+ alphaEqu = GL_FUNC_ADD;
+ break;
+ case 1:
+ alphaEqu = GL_FUNC_SUBTRACT;
+ break;
+ case 2:
+ alphaEqu = GL_FUNC_REVERSE_SUBTRACT;
+ break;
+ case 3:
+ alphaEqu = GL_MIN;
+ break;
+ case 4:
+ alphaEqu = GL_MAX;
+ }
+
+ glBlendEquationSeparate(rgbEqu, alphaEqu);
+
+ [self executeSubpatches:time arguments:arguments];
+
+ glBlendEquationSeparate(oldRGBEqu, oldAlphaEqu);
+
+ return YES;
+}
+
+@end
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>nodeAttributes</key>
+ <dict>
+ <key>category</key>
+ <string>Kineme GL</string>
+ <key>categories</key>
+ <array>
+ <string>Kineme GL</string>
+ </array>
+ <key>copyright</key>
+ <string>Copyright 2008 Kosada Incorporated. All rights reserved.</string>
+ <key>description</key>
+ <string>This patch modifies the GL Blend Equation. Add is the default mode.
+
+Your subpatch objects' blend mode must be set to Over or Add for this patch to have any effect.
+
+http://kineme.net/</string>
+ <key>name</key>
+ <string>GL Blend Equation</string>
+ </dict>
+ <key>inputAttributes</key>
+ <dict>
+ <key>inputRGBEquation</key>
+ <dict>
+ <key>description</key>
+ <string>RGB Blend Equation</string>
+ <key>name</key>
+ <string>RGB Equation</string>
+ <key>menu</key>
+ <array>
+ <string>Add</string>
+ <string>Subtract</string>
+ <string>Reverse Subtract</string>
+ <string>Min</string>
+ <string>Max</string>
+ </array>
+ </dict>
+ <key>inputAlphaEquation</key>
+ <dict>
+ <key>description</key>
+ <string>Alpha Blend Equation</string>
+ <key>name</key>
+ <string>Alpha Equation</string>
+ <key>menu</key>
+ <array>
+ <string>Add</string>
+ <string>Subtract</string>
+ <string>Reverse Subtract</string>
+ <string>Min</string>
+ <string>Max</string>
+ </array>
+ </dict>
+ </dict>
+ <key>outputAttributes</key>
+ <dict>
+ </dict>
+</dict>
+</plist>
@@ -0,0 +1,13 @@
+@interface KinemeGLCameraPatch : QCPatch
+{
+ QCNumberPort *inputXPosition;
+ QCNumberPort *inputYPosition;
+ QCNumberPort *inputZPosition;
+
+ QCNumberPort *inputYaw;
+ QCNumberPort *inputPitch;
+ QCNumberPort *inputRoll;
+}
+
+- (BOOL)execute:(QCOpenGLContext *)context time:(double)time arguments:(NSDictionary *)arguments;
+@end
@@ -0,0 +1,32 @@
+#import "KinemeGLCameraPatch.h"
+#import <OpenGL/CGLMacro.h>
+
+@implementation KinemeGLCameraPatch : QCPatch
+
++ (QCPatchExecutionMode)executionModeWithIdentifier:(id)fp8
+{
+ return kQCPatchExecutionModeConsumer;
+}
+
+- (BOOL)execute:(QCOpenGLContext *)context time:(double)time arguments:(NSDictionary *)arguments
+{
+ CGLContextObj cgl_ctx = [context CGLContextObj];
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glTranslated(0,0,1.5); // rotate about camera center
+ glRotated([inputRoll doubleValue] ,0,0,1);
+ glRotated([inputPitch doubleValue],1,0,0);
+ glRotated([inputYaw doubleValue] ,0,1,0);
+ glTranslated(-[inputXPosition doubleValue], -[inputYPosition doubleValue], -[inputZPosition doubleValue]);
+
+ [self executeSubpatches:time arguments:arguments];
+
+ glPopMatrix();
+
+ return YES;
+}
+
+@end
Oops, something went wrong.

0 comments on commit 3f980e5

Please sign in to comment.