├── README.md ├── data ├── .gitkeep └── shaders │ ├── bilateral │ ├── bilateral.frag │ └── bilateral.vert │ ├── binarization │ ├── binarization.frag │ └── binarization.vert │ ├── blend │ ├── division.frag │ ├── division.vert │ ├── luminosity.frag │ └── luminosity.vert │ ├── gaussianblur │ ├── gaussianBlurH.frag │ ├── gaussianBlurH.vert │ ├── gaussianBlurV.frag │ └── gaussianBlurV.vert │ └── grayscale │ ├── grayscale.frag │ └── grayscale.vert ├── example-ofxSketchFilter ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ ├── data │ │ ├── .gitkeep │ │ └── shaders │ │ │ ├── bilateral │ │ │ ├── bilateral.frag │ │ │ └── bilateral.vert │ │ │ ├── binarization │ │ │ ├── binarization.frag │ │ │ └── binarization.vert │ │ │ ├── blend │ │ │ ├── division.frag │ │ │ ├── division.vert │ │ │ ├── luminosity.frag │ │ │ └── luminosity.vert │ │ │ ├── gaussianblur │ │ │ ├── gaussianBlurH.frag │ │ │ ├── gaussianBlurH.vert │ │ │ ├── gaussianBlurV.frag │ │ │ └── gaussianBlurV.vert │ │ │ └── grayscale │ │ │ ├── grayscale.frag │ │ │ └── grayscale.vert │ └── ofApp.app │ │ └── Contents │ │ ├── Frameworks │ │ └── GLUT.framework │ │ │ ├── GLUT │ │ │ ├── Headers │ │ │ ├── copy.h │ │ │ ├── extrude.h │ │ │ ├── glsmap.h │ │ │ ├── glsmapint.h │ │ │ ├── glut.h │ │ │ ├── glutbitmap.h │ │ │ ├── glutf90.h │ │ │ ├── glutstroke.h │ │ │ ├── gutil.h │ │ │ ├── intersect.h │ │ │ ├── port.h │ │ │ ├── rot.h │ │ │ ├── segment.h │ │ │ ├── tube.h │ │ │ ├── tube_gc.h │ │ │ └── vvector.h │ │ │ ├── Resources │ │ │ ├── Caution.tiff │ │ │ ├── English.lproj │ │ │ │ ├── GLUT.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTClipboard.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTPreferences.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTUI.strings │ │ │ │ └── InfoPlist.strings │ │ │ ├── Info.plist │ │ │ ├── blankCursor.tiff │ │ │ ├── bottomCursor.tiff │ │ │ ├── bottomleftCursor.tiff │ │ │ ├── bottomrightCursor.tiff │ │ │ ├── crossCursor.tiff │ │ │ ├── cycleCursor.tiff │ │ │ ├── destroyCursor.tiff │ │ │ ├── fingerCursor.tiff │ │ │ ├── helpCursor.tiff │ │ │ ├── leftCursor.tiff │ │ │ ├── leftRightCursor.tiff │ │ │ ├── rightArrowCursor.tiff │ │ │ ├── rightCursor.tiff │ │ │ ├── sprayCursor.tiff │ │ │ ├── topCursor.tiff │ │ │ ├── topleftCursor.tiff │ │ │ ├── toprightCursor.tiff │ │ │ ├── upDownCursor.tiff │ │ │ └── waitCursor.tiff │ │ │ └── Versions │ │ │ ├── A │ │ │ ├── GLUT │ │ │ ├── Headers │ │ │ │ ├── copy.h │ │ │ │ ├── extrude.h │ │ │ │ ├── glsmap.h │ │ │ │ ├── glsmapint.h │ │ │ │ ├── glut.h │ │ │ │ ├── glutbitmap.h │ │ │ │ ├── glutf90.h │ │ │ │ ├── glutstroke.h │ │ │ │ ├── gutil.h │ │ │ │ ├── intersect.h │ │ │ │ ├── port.h │ │ │ │ ├── rot.h │ │ │ │ ├── segment.h │ │ │ │ ├── tube.h │ │ │ │ ├── tube_gc.h │ │ │ │ └── vvector.h │ │ │ └── Resources │ │ │ │ ├── Caution.tiff │ │ │ │ ├── English.lproj │ │ │ │ ├── GLUT.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTClipboard.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTPreferences.nib │ │ │ │ │ ├── classes.nib │ │ │ │ │ ├── info.nib │ │ │ │ │ └── objects.nib │ │ │ │ ├── GLUTUI.strings │ │ │ │ └── InfoPlist.strings │ │ │ │ ├── Info.plist │ │ │ │ ├── blankCursor.tiff │ │ │ │ ├── bottomCursor.tiff │ │ │ │ ├── bottomleftCursor.tiff │ │ │ │ ├── bottomrightCursor.tiff │ │ │ │ ├── crossCursor.tiff │ │ │ │ ├── cycleCursor.tiff │ │ │ │ ├── destroyCursor.tiff │ │ │ │ ├── fingerCursor.tiff │ │ │ │ ├── helpCursor.tiff │ │ │ │ ├── leftCursor.tiff │ │ │ │ ├── leftRightCursor.tiff │ │ │ │ ├── rightArrowCursor.tiff │ │ │ │ ├── rightCursor.tiff │ │ │ │ ├── sprayCursor.tiff │ │ │ │ ├── topCursor.tiff │ │ │ │ ├── topleftCursor.tiff │ │ │ │ ├── toprightCursor.tiff │ │ │ │ ├── upDownCursor.tiff │ │ │ │ └── waitCursor.tiff │ │ │ └── Current │ │ │ ├── GLUT │ │ │ ├── Headers │ │ │ ├── copy.h │ │ │ ├── extrude.h │ │ │ ├── glsmap.h │ │ │ ├── glsmapint.h │ │ │ ├── glut.h │ │ │ ├── glutbitmap.h │ │ │ ├── glutf90.h │ │ │ ├── glutstroke.h │ │ │ ├── gutil.h │ │ │ ├── intersect.h │ │ │ ├── port.h │ │ │ ├── rot.h │ │ │ ├── segment.h │ │ │ ├── tube.h │ │ │ ├── tube_gc.h │ │ │ └── vvector.h │ │ │ └── Resources │ │ │ ├── Caution.tiff │ │ │ ├── English.lproj │ │ │ ├── GLUT.nib │ │ │ │ ├── classes.nib │ │ │ │ ├── info.nib │ │ │ │ └── objects.nib │ │ │ ├── GLUTClipboard.nib │ │ │ │ ├── classes.nib │ │ │ │ ├── info.nib │ │ │ │ └── objects.nib │ │ │ ├── GLUTPreferences.nib │ │ │ │ ├── classes.nib │ │ │ │ ├── info.nib │ │ │ │ └── objects.nib │ │ │ ├── GLUTUI.strings │ │ │ └── InfoPlist.strings │ │ │ ├── Info.plist │ │ │ ├── blankCursor.tiff │ │ │ ├── bottomCursor.tiff │ │ │ ├── bottomleftCursor.tiff │ │ │ ├── bottomrightCursor.tiff │ │ │ ├── crossCursor.tiff │ │ │ ├── cycleCursor.tiff │ │ │ ├── destroyCursor.tiff │ │ │ ├── fingerCursor.tiff │ │ │ ├── helpCursor.tiff │ │ │ ├── leftCursor.tiff │ │ │ ├── leftRightCursor.tiff │ │ │ ├── rightArrowCursor.tiff │ │ │ ├── rightCursor.tiff │ │ │ ├── sprayCursor.tiff │ │ │ ├── topCursor.tiff │ │ │ ├── topleftCursor.tiff │ │ │ ├── toprightCursor.tiff │ │ │ ├── upDownCursor.tiff │ │ │ └── waitCursor.tiff │ │ ├── Info.plist │ │ ├── MacOS │ │ ├── libfmodex.dylib │ │ └── ofApp │ │ ├── PkgInfo │ │ └── Resources │ │ └── icon.icns ├── config.make ├── ofApp.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── tatsuya_yokoda.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── ofApp Debug.xcscheme │ │ │ └── ofApp Release.xcscheme │ └── xcuserdata │ │ └── tatsuya_yokoda.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── img1.png ├── img2.png ├── img3.png ├── img4.png ├── img5.png ├── ofxaddons_thumbnail.png ├── src ├── filters │ ├── BilateralFilter.cpp │ ├── BilateralFilter.h │ ├── BinarizationFilter.cpp │ ├── BinarizationFilter.h │ ├── GaussianBlurFilter.cpp │ ├── GaussianBlurFilter.h │ ├── GlayScaleFilter.cpp │ └── GlayScaleFilter.h ├── ofxSketchFilter.cpp └── ofxSketchFilter.h └── thumbnail.gif /README.md: -------------------------------------------------------------------------------- 1 | # ofxSketchFilter 2 | 3 | ![thumbnail.gif](thumbnail.gif) 4 | 5 | [Vimeo] 6 | https://vimeo.com/118887790 7 | 8 | [Blog] 9 | http://labs.1-10.com/blog/ofxSketchFilter.html (Coming soon) 10 | 11 | Description: 12 | -------- 13 | 14 | This is an addon that can apply like a sketch effect. 15 | When you use the addon, copy `data/shaders` folder to your `openFrameworks/bin/data` folder. 16 | 17 | Requirements 18 | -------- 19 | 20 | Features: 21 | -------- 22 | 23 | Updates: 24 | -------- 25 | 26 | 27 | ![img1.png](img1.png) 28 | ![img2.png](img2.png) 29 | ![img3.png](img3.png) 30 | ![img4.png](img4.png) 31 | ![img5.png](img5.png) 32 | -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/data/.gitkeep -------------------------------------------------------------------------------- /data/shaders/bilateral/bilateral.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D inputImageTexture; 5 | 6 | const int GAUSSIAN_SAMPLES = 9; 7 | 8 | varying vec2 textureCoordinate; 9 | varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; 10 | 11 | uniform float distanceNormalizationFactor; 12 | 13 | void main() { 14 | vec4 centralColor; 15 | float gaussianWeightTotal; 16 | vec4 sum; 17 | vec4 sampleColor; 18 | float distanceFromCentralColor; 19 | float gaussianWeight; 20 | 21 | centralColor = texture2D(inputImageTexture, blurCoordinates[4]); 22 | gaussianWeightTotal = 0.18; 23 | sum = centralColor * 0.18; 24 | 25 | sampleColor = texture2D(inputImageTexture, blurCoordinates[0]); 26 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 27 | gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); 28 | gaussianWeightTotal += gaussianWeight; 29 | sum += sampleColor * gaussianWeight; 30 | 31 | sampleColor = texture2D(inputImageTexture, blurCoordinates[1]); 32 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 33 | gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); 34 | gaussianWeightTotal += gaussianWeight; 35 | sum += sampleColor * gaussianWeight; 36 | 37 | sampleColor = texture2D(inputImageTexture, blurCoordinates[2]); 38 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 39 | gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); 40 | gaussianWeightTotal += gaussianWeight; 41 | sum += sampleColor * gaussianWeight; 42 | 43 | sampleColor = texture2D(inputImageTexture, blurCoordinates[3]); 44 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 45 | gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); 46 | gaussianWeightTotal += gaussianWeight; 47 | sum += sampleColor * gaussianWeight; 48 | 49 | sampleColor = texture2D(inputImageTexture, blurCoordinates[5]); 50 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 51 | gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); 52 | gaussianWeightTotal += gaussianWeight; 53 | sum += sampleColor * gaussianWeight; 54 | 55 | sampleColor = texture2D(inputImageTexture, blurCoordinates[6]); 56 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 57 | gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); 58 | gaussianWeightTotal += gaussianWeight; 59 | sum += sampleColor * gaussianWeight; 60 | 61 | sampleColor = texture2D(inputImageTexture, blurCoordinates[7]); 62 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 63 | gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); 64 | gaussianWeightTotal += gaussianWeight; 65 | sum += sampleColor * gaussianWeight; 66 | 67 | sampleColor = texture2D(inputImageTexture, blurCoordinates[8]); 68 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 69 | gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); 70 | gaussianWeightTotal += gaussianWeight; 71 | sum += sampleColor * gaussianWeight; 72 | 73 | gl_FragColor = sum / gaussianWeightTotal; 74 | } -------------------------------------------------------------------------------- /data/shaders/bilateral/bilateral.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | const int GAUSSIAN_SAMPLES = 9; 5 | 6 | uniform float texelWidthOffset; 7 | uniform float texelHeightOffset; 8 | 9 | varying vec2 textureCoordinate; 10 | varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; 11 | 12 | void main() { 13 | textureCoordinate = vec2(gl_MultiTexCoord0); 14 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 15 | 16 | // Calculate the positions for the blur 17 | int multiplier = 0; 18 | vec2 blurStep; 19 | vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset); 20 | 21 | for (int i = 0; i < GAUSSIAN_SAMPLES; i++) { 22 | multiplier = (i - ((GAUSSIAN_SAMPLES - 1) / 2)); 23 | blurStep = float(multiplier) * singleStepOffset; 24 | blurCoordinates[i] = textureCoordinate + blurStep; 25 | } 26 | } -------------------------------------------------------------------------------- /data/shaders/binarization/binarization.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_source; 5 | uniform float u_threshold = 0.5; 6 | 7 | //UV値 8 | varying vec2 v_texCoord; 9 | 10 | //-------------------------------------------------------------- 11 | // 12 | void main(void) { 13 | vec4 source = texture2D(u_source, v_texCoord); 14 | float a = source.a; 15 | 16 | vec3 grayscale = vec3(source.r * 0.299 + source.g * 0.587 + source.b * 0.114); 17 | 18 | vec3 binarization = vec3(step(u_threshold, grayscale)); 19 | vec4 finalColor = vec4(binarization, a); 20 | gl_FragColor = finalColor; 21 | } -------------------------------------------------------------------------------- /data/shaders/binarization/binarization.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /data/shaders/blend/division.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_base; 5 | uniform sampler2D u_blend; 6 | 7 | //UV値 8 | varying vec2 v_texCoord; 9 | 10 | //-------------------------------------------------------------- 11 | // 12 | void main(void) { 13 | vec4 base = texture2D(u_base, v_texCoord); 14 | float a = base.a; 15 | 16 | vec4 blend = texture2D(u_blend, v_texCoord); 17 | 18 | vec3 compose = base.rgb / blend.rgb; 19 | //Comment out if you need 20 | compose = compose * compose * compose * compose * compose; 21 | vec4 finalColor = vec4(compose, a); 22 | gl_FragColor = finalColor; 23 | } -------------------------------------------------------------------------------- /data/shaders/blend/division.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /data/shaders/blend/luminosity.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | 5 | 6 | 7 | /* 8 | ** Copyright (c) 2012, Romain Dura romain@shazbits.com 9 | ** 10 | ** Permission to use, copy, modify, and/or distribute this software for any 11 | ** purpose with or without fee is hereby granted, provided that the above 12 | ** copyright notice and this permission notice appear in all copies. 13 | ** 14 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 15 | ** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 16 | ** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 17 | ** SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 | ** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 19 | ** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 20 | ** IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 | */ 22 | 23 | /* 24 | ** Photoshop & misc math 25 | ** Blending modes, RGB/HSL/Contrast/Desaturate, levels control 26 | ** 27 | ** Romain Dura | Romz 28 | ** Blog: http://mouaif.wordpress.com 29 | ** Post: http://mouaif.wordpress.com/?p=94 30 | */ 31 | 32 | //-------------------------------------------------------------- 33 | // 34 | vec3 RGBToHSL(vec3 color) { 35 | // init to 0 to avoid warnings ? (and reverse if + remove first part) 36 | vec3 hsl; 37 | 38 | //Min. value of RGB 39 | float fmin = min(min(color.r, color.g), color.b); 40 | //Max. value of RGB 41 | float fmax = max(max(color.r, color.g), color.b); 42 | //Delta RGB value 43 | float delta = fmax - fmin; 44 | 45 | // Luminance 46 | hsl.z = (fmax + fmin) / 2.0; 47 | 48 | //This is a gray, no chroma... 49 | if (delta == 0.0) { 50 | // Hue 51 | hsl.x = 0.0; 52 | // Saturation 53 | hsl.y = 0.0; 54 | 55 | //Chromatic data... 56 | } else { 57 | if (hsl.z < 0.5) { 58 | // Saturation 59 | hsl.y = delta / (fmax + fmin); 60 | } else { 61 | // Saturation 62 | hsl.y = delta / (2.0 - fmax - fmin); 63 | } 64 | 65 | float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta; 66 | float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta; 67 | float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta; 68 | 69 | if (color.r == fmax ) { 70 | // Hue 71 | hsl.x = deltaB - deltaG; 72 | } else if (color.g == fmax) { 73 | // Hue 74 | hsl.x = (1.0 / 3.0) + deltaR - deltaB; 75 | } else if (color.b == fmax) { 76 | // Hue 77 | hsl.x = (2.0 / 3.0) + deltaG - deltaR; 78 | } 79 | 80 | if (hsl.x < 0.0) { 81 | // Hue 82 | hsl.x += 1.0; 83 | } else if (hsl.x > 1.0) { 84 | // Hue 85 | hsl.x -= 1.0; 86 | } 87 | } 88 | 89 | return hsl; 90 | } 91 | 92 | //-------------------------------------------------------------- 93 | // 94 | float HueToRGB(float f1, float f2, float hue) { 95 | if (hue < 0.0) { 96 | hue += 1.0; 97 | } else if (hue > 1.0) { 98 | hue -= 1.0; 99 | } 100 | 101 | float res; 102 | if ((6.0 * hue) < 1.0) { 103 | res = f1 + (f2 - f1) * 6.0 * hue; 104 | } else if ((2.0 * hue) < 1.0) { 105 | res = f2; 106 | } else if ((3.0 * hue) < 2.0) { 107 | res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0; 108 | } else { 109 | res = f1; 110 | } 111 | 112 | return res; 113 | } 114 | 115 | //-------------------------------------------------------------- 116 | // 117 | vec3 HSLToRGB(vec3 hsl) { 118 | vec3 rgb; 119 | 120 | if (hsl.y == 0.0) { 121 | // Luminance 122 | rgb = vec3(hsl.z); 123 | } else { 124 | float f2; 125 | 126 | if (hsl.z < 0.5) { 127 | f2 = hsl.z * (1.0 + hsl.y); 128 | } else { 129 | f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z); 130 | } 131 | 132 | float f1 = 2.0 * hsl.z - f2; 133 | 134 | rgb.r = HueToRGB(f1, f2, hsl.x + (1.0 / 3.0)); 135 | rgb.g = HueToRGB(f1, f2, hsl.x); 136 | rgb.b = HueToRGB(f1, f2, hsl.x - (1.0 / 3.0)); 137 | } 138 | 139 | return rgb; 140 | } 141 | 142 | //-------------------------------------------------------------- 143 | // Luminosity Blend mode creates the result color by combining the hue and saturation of the base color with the luminance of the blend color. 144 | vec3 BlendLuminosity(vec3 base, vec3 blend) { 145 | vec3 baseHSL = RGBToHSL(base); 146 | return HSLToRGB(vec3(baseHSL.r, baseHSL.g, RGBToHSL(blend).b)); 147 | } 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | uniform sampler2D u_base; 166 | uniform sampler2D u_blend; 167 | 168 | //UV値 169 | varying vec2 v_texCoord; 170 | 171 | //-------------------------------------------------------------- 172 | // 173 | void main(void) { 174 | vec4 base = texture2D(u_base, v_texCoord); 175 | float a = base.a; 176 | 177 | vec4 blend = texture2D(u_blend, v_texCoord); 178 | 179 | vec3 compose = BlendLuminosity(base.rgb, blend.rgb); 180 | vec4 finalColor = vec4(compose, a); 181 | gl_FragColor = finalColor; 182 | } -------------------------------------------------------------------------------- /data/shaders/blend/luminosity.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /data/shaders/gaussianblur/gaussianBlurH.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | #define HORIZONTAL_BLUR_5 4 | 5 | uniform sampler2D u_blurSampler; 6 | uniform float u_sigma = 1.0; 7 | uniform float u_blurSize = 8.0; 8 | 9 | const float PI = 3.14159265; 10 | 11 | #if defined(VERTICAL_BLUR_9) 12 | const float numBlurPixelsPerSide = 4.0; 13 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 14 | #elif defined(HORIZONTAL_BLUR_9) 15 | const float numBlurPixelsPerSide = 4.0; 16 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 17 | #elif defined(VERTICAL_BLUR_7) 18 | const float numBlurPixelsPerSide = 3.0; 19 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 20 | #elif defined(HORIZONTAL_BLUR_7) 21 | const float numBlurPixelsPerSide = 3.0; 22 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 23 | #elif defined(VERTICAL_BLUR_5) 24 | const float numBlurPixelsPerSide = 2.0; 25 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 26 | #elif defined(HORIZONTAL_BLUR_5) 27 | const float numBlurPixelsPerSide = 2.0; 28 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 29 | #else 30 | const float numBlurPixelsPerSide = 0.0; 31 | const vec2 blurMultiplyVec = vec2(0.0, 0.0); 32 | #endif 33 | 34 | varying vec2 v_texCoord; 35 | 36 | //-------------------------------------------------------------- 37 | // 38 | void main(void) { 39 | vec3 incrementalGaussian; 40 | incrementalGaussian.x = 1.0 / (sqrt(2.0 * PI) * u_sigma); 41 | incrementalGaussian.y = exp(-0.5 / (u_sigma * u_sigma)); 42 | incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y; 43 | 44 | vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0); 45 | float coefficientSum = 0.0; 46 | 47 | avgValue += texture2D(u_blurSampler, v_texCoord.xy) * incrementalGaussian.x; 48 | coefficientSum += incrementalGaussian.x; 49 | incrementalGaussian.xy *= incrementalGaussian.yz; 50 | 51 | for (float i = 1.0; i <= numBlurPixelsPerSide; i++) { 52 | avgValue += texture2D(u_blurSampler, v_texCoord.xy - i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 53 | avgValue += texture2D(u_blurSampler, v_texCoord.xy + i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 54 | coefficientSum += 2.0 * incrementalGaussian.x; 55 | incrementalGaussian.xy *= incrementalGaussian.yz; 56 | } 57 | 58 | gl_FragColor = avgValue / coefficientSum; 59 | } 60 | -------------------------------------------------------------------------------- /data/shaders/gaussianblur/gaussianBlurH.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | varying vec2 v_texCoord; 4 | 5 | //-------------------------------------------------------------- 6 | // 7 | void main(void) { 8 | v_texCoord = gl_MultiTexCoord0.st; 9 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/gaussianblur/gaussianBlurV.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | #define HORIZONTAL_BLUR_5 5 | 6 | uniform sampler2D u_blurSampler; 7 | uniform float u_sigma = 1.0; 8 | uniform float u_blurSize = 8.0; 9 | 10 | const float PI = 3.14159265; 11 | 12 | #if defined(VERTICAL_BLUR_9) 13 | const float numBlurPixelsPerSide = 4.0; 14 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 15 | #elif defined(HORIZONTAL_BLUR_9) 16 | const float numBlurPixelsPerSide = 4.0; 17 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 18 | #elif defined(VERTICAL_BLUR_7) 19 | const float numBlurPixelsPerSide = 3.0; 20 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 21 | #elif defined(HORIZONTAL_BLUR_7) 22 | const float numBlurPixelsPerSide = 3.0; 23 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 24 | #elif defined(VERTICAL_BLUR_5) 25 | const float numBlurPixelsPerSide = 2.0; 26 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 27 | #elif defined(HORIZONTAL_BLUR_5) 28 | const float numBlurPixelsPerSide = 2.0; 29 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 30 | #else 31 | const float numBlurPixelsPerSide = 0.0; 32 | const vec2 blurMultiplyVec = vec2(0.0, 0.0); 33 | #endif 34 | 35 | varying vec2 v_texCoord; 36 | 37 | //-------------------------------------------------------------- 38 | // 39 | void main(void) { 40 | vec3 incrementalGaussian; 41 | incrementalGaussian.x = 1.0 / (sqrt(2.0 * PI) * u_sigma); 42 | incrementalGaussian.y = exp(-0.5 / (u_sigma * u_sigma)); 43 | incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y; 44 | 45 | vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0); 46 | float coefficientSum = 0.0; 47 | 48 | avgValue += texture2D(u_blurSampler, v_texCoord.xy) * incrementalGaussian.x; 49 | coefficientSum += incrementalGaussian.x; 50 | incrementalGaussian.xy *= incrementalGaussian.yz; 51 | 52 | for (float i = 1.0; i <= numBlurPixelsPerSide; i++) { 53 | avgValue += texture2D(u_blurSampler, v_texCoord.xy - i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 54 | avgValue += texture2D(u_blurSampler, v_texCoord.xy + i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 55 | coefficientSum += 2.0 * incrementalGaussian.x; 56 | incrementalGaussian.xy *= incrementalGaussian.yz; 57 | } 58 | 59 | gl_FragColor = avgValue / coefficientSum; 60 | } 61 | -------------------------------------------------------------------------------- /data/shaders/gaussianblur/gaussianBlurV.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | varying vec2 v_texCoord; 4 | 5 | //-------------------------------------------------------------- 6 | // 7 | void main(void) { 8 | v_texCoord = gl_MultiTexCoord0.st; 9 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 10 | } 11 | -------------------------------------------------------------------------------- /data/shaders/grayscale/grayscale.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_source; 5 | 6 | uniform float u_intensity = 1.0; 7 | uniform float u_redCoefficient = 1.0; 8 | uniform float u_greenCoefficient = 1.0; 9 | uniform float u_blurCoefficient = 1.0; 10 | 11 | //UV値 12 | varying vec2 v_texCoord; 13 | 14 | //-------------------------------------------------------------- 15 | // 16 | void main(void) { 17 | vec4 source = texture2D(u_source, v_texCoord); 18 | float a = source.a; 19 | 20 | vec3 grayscale = vec3(source.r * 0.299 + source.g * 0.587 + source.b * 0.114); 21 | grayscale.r *= u_redCoefficient; 22 | grayscale.g *= u_greenCoefficient; 23 | grayscale.b *= u_blurCoefficient; 24 | 25 | vec3 compose = (grayscale * u_intensity) + (source.rgb * (1.0 - u_intensity)); 26 | 27 | vec4 finalColor = vec4(compose, a); 28 | gl_FragColor = finalColor; 29 | } -------------------------------------------------------------------------------- /data/shaders/grayscale/grayscale.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=../../.. 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/addons.make: -------------------------------------------------------------------------------- 1 | ofxSketchFilter 2 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/data/.gitkeep -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/bilateral/bilateral.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D inputImageTexture; 5 | 6 | const int GAUSSIAN_SAMPLES = 9; 7 | 8 | varying vec2 textureCoordinate; 9 | varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; 10 | 11 | uniform float distanceNormalizationFactor; 12 | 13 | void main() { 14 | vec4 centralColor; 15 | float gaussianWeightTotal; 16 | vec4 sum; 17 | vec4 sampleColor; 18 | float distanceFromCentralColor; 19 | float gaussianWeight; 20 | 21 | centralColor = texture2D(inputImageTexture, blurCoordinates[4]); 22 | gaussianWeightTotal = 0.18; 23 | sum = centralColor * 0.18; 24 | 25 | sampleColor = texture2D(inputImageTexture, blurCoordinates[0]); 26 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 27 | gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); 28 | gaussianWeightTotal += gaussianWeight; 29 | sum += sampleColor * gaussianWeight; 30 | 31 | sampleColor = texture2D(inputImageTexture, blurCoordinates[1]); 32 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 33 | gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); 34 | gaussianWeightTotal += gaussianWeight; 35 | sum += sampleColor * gaussianWeight; 36 | 37 | sampleColor = texture2D(inputImageTexture, blurCoordinates[2]); 38 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 39 | gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); 40 | gaussianWeightTotal += gaussianWeight; 41 | sum += sampleColor * gaussianWeight; 42 | 43 | sampleColor = texture2D(inputImageTexture, blurCoordinates[3]); 44 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 45 | gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); 46 | gaussianWeightTotal += gaussianWeight; 47 | sum += sampleColor * gaussianWeight; 48 | 49 | sampleColor = texture2D(inputImageTexture, blurCoordinates[5]); 50 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 51 | gaussianWeight = 0.15 * (1.0 - distanceFromCentralColor); 52 | gaussianWeightTotal += gaussianWeight; 53 | sum += sampleColor * gaussianWeight; 54 | 55 | sampleColor = texture2D(inputImageTexture, blurCoordinates[6]); 56 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 57 | gaussianWeight = 0.12 * (1.0 - distanceFromCentralColor); 58 | gaussianWeightTotal += gaussianWeight; 59 | sum += sampleColor * gaussianWeight; 60 | 61 | sampleColor = texture2D(inputImageTexture, blurCoordinates[7]); 62 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 63 | gaussianWeight = 0.09 * (1.0 - distanceFromCentralColor); 64 | gaussianWeightTotal += gaussianWeight; 65 | sum += sampleColor * gaussianWeight; 66 | 67 | sampleColor = texture2D(inputImageTexture, blurCoordinates[8]); 68 | distanceFromCentralColor = min(distance(centralColor, sampleColor) * distanceNormalizationFactor, centralColor.a); 69 | gaussianWeight = 0.05 * (1.0 - distanceFromCentralColor); 70 | gaussianWeightTotal += gaussianWeight; 71 | sum += sampleColor * gaussianWeight; 72 | 73 | gl_FragColor = sum / gaussianWeightTotal; 74 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/bilateral/bilateral.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | const int GAUSSIAN_SAMPLES = 9; 5 | 6 | uniform float texelWidthOffset; 7 | uniform float texelHeightOffset; 8 | 9 | varying vec2 textureCoordinate; 10 | varying vec2 blurCoordinates[GAUSSIAN_SAMPLES]; 11 | 12 | void main() { 13 | textureCoordinate = vec2(gl_MultiTexCoord0); 14 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 15 | 16 | // Calculate the positions for the blur 17 | int multiplier = 0; 18 | vec2 blurStep; 19 | vec2 singleStepOffset = vec2(texelWidthOffset, texelHeightOffset); 20 | 21 | for (int i = 0; i < GAUSSIAN_SAMPLES; i++) { 22 | multiplier = (i - ((GAUSSIAN_SAMPLES - 1) / 2)); 23 | blurStep = float(multiplier) * singleStepOffset; 24 | blurCoordinates[i] = textureCoordinate + blurStep; 25 | } 26 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/binarization/binarization.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_source; 5 | uniform float u_threshold = 0.5; 6 | 7 | //UV値 8 | varying vec2 v_texCoord; 9 | 10 | //-------------------------------------------------------------- 11 | // 12 | void main(void) { 13 | vec4 source = texture2D(u_source, v_texCoord); 14 | float a = source.a; 15 | 16 | vec3 grayscale = vec3(source.r * 0.299 + source.g * 0.587 + source.b * 0.114); 17 | 18 | vec3 binarization = vec3(step(u_threshold, grayscale)); 19 | vec4 finalColor = vec4(binarization, a); 20 | gl_FragColor = finalColor; 21 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/binarization/binarization.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/blend/division.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_base; 5 | uniform sampler2D u_blend; 6 | 7 | //UV値 8 | varying vec2 v_texCoord; 9 | 10 | //-------------------------------------------------------------- 11 | // 12 | void main(void) { 13 | vec4 base = texture2D(u_base, v_texCoord); 14 | float a = base.a; 15 | 16 | vec4 blend = texture2D(u_blend, v_texCoord); 17 | 18 | vec3 compose = base.rgb / blend.rgb; 19 | //Comment out if you need 20 | compose = compose * compose * compose * compose * compose; 21 | vec4 finalColor = vec4(compose, a); 22 | gl_FragColor = finalColor; 23 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/blend/division.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/blend/luminosity.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | 5 | 6 | 7 | /* 8 | ** Copyright (c) 2012, Romain Dura romain@shazbits.com 9 | ** 10 | ** Permission to use, copy, modify, and/or distribute this software for any 11 | ** purpose with or without fee is hereby granted, provided that the above 12 | ** copyright notice and this permission notice appear in all copies. 13 | ** 14 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 15 | ** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 16 | ** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 17 | ** SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 18 | ** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 19 | ** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 20 | ** IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21 | */ 22 | 23 | /* 24 | ** Photoshop & misc math 25 | ** Blending modes, RGB/HSL/Contrast/Desaturate, levels control 26 | ** 27 | ** Romain Dura | Romz 28 | ** Blog: http://mouaif.wordpress.com 29 | ** Post: http://mouaif.wordpress.com/?p=94 30 | */ 31 | 32 | //-------------------------------------------------------------- 33 | // 34 | vec3 RGBToHSL(vec3 color) { 35 | // init to 0 to avoid warnings ? (and reverse if + remove first part) 36 | vec3 hsl; 37 | 38 | //Min. value of RGB 39 | float fmin = min(min(color.r, color.g), color.b); 40 | //Max. value of RGB 41 | float fmax = max(max(color.r, color.g), color.b); 42 | //Delta RGB value 43 | float delta = fmax - fmin; 44 | 45 | // Luminance 46 | hsl.z = (fmax + fmin) / 2.0; 47 | 48 | //This is a gray, no chroma... 49 | if (delta == 0.0) { 50 | // Hue 51 | hsl.x = 0.0; 52 | // Saturation 53 | hsl.y = 0.0; 54 | 55 | //Chromatic data... 56 | } else { 57 | if (hsl.z < 0.5) { 58 | // Saturation 59 | hsl.y = delta / (fmax + fmin); 60 | } else { 61 | // Saturation 62 | hsl.y = delta / (2.0 - fmax - fmin); 63 | } 64 | 65 | float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta; 66 | float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta; 67 | float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta; 68 | 69 | if (color.r == fmax ) { 70 | // Hue 71 | hsl.x = deltaB - deltaG; 72 | } else if (color.g == fmax) { 73 | // Hue 74 | hsl.x = (1.0 / 3.0) + deltaR - deltaB; 75 | } else if (color.b == fmax) { 76 | // Hue 77 | hsl.x = (2.0 / 3.0) + deltaG - deltaR; 78 | } 79 | 80 | if (hsl.x < 0.0) { 81 | // Hue 82 | hsl.x += 1.0; 83 | } else if (hsl.x > 1.0) { 84 | // Hue 85 | hsl.x -= 1.0; 86 | } 87 | } 88 | 89 | return hsl; 90 | } 91 | 92 | //-------------------------------------------------------------- 93 | // 94 | float HueToRGB(float f1, float f2, float hue) { 95 | if (hue < 0.0) { 96 | hue += 1.0; 97 | } else if (hue > 1.0) { 98 | hue -= 1.0; 99 | } 100 | 101 | float res; 102 | if ((6.0 * hue) < 1.0) { 103 | res = f1 + (f2 - f1) * 6.0 * hue; 104 | } else if ((2.0 * hue) < 1.0) { 105 | res = f2; 106 | } else if ((3.0 * hue) < 2.0) { 107 | res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0; 108 | } else { 109 | res = f1; 110 | } 111 | 112 | return res; 113 | } 114 | 115 | //-------------------------------------------------------------- 116 | // 117 | vec3 HSLToRGB(vec3 hsl) { 118 | vec3 rgb; 119 | 120 | if (hsl.y == 0.0) { 121 | // Luminance 122 | rgb = vec3(hsl.z); 123 | } else { 124 | float f2; 125 | 126 | if (hsl.z < 0.5) { 127 | f2 = hsl.z * (1.0 + hsl.y); 128 | } else { 129 | f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z); 130 | } 131 | 132 | float f1 = 2.0 * hsl.z - f2; 133 | 134 | rgb.r = HueToRGB(f1, f2, hsl.x + (1.0 / 3.0)); 135 | rgb.g = HueToRGB(f1, f2, hsl.x); 136 | rgb.b = HueToRGB(f1, f2, hsl.x - (1.0 / 3.0)); 137 | } 138 | 139 | return rgb; 140 | } 141 | 142 | //-------------------------------------------------------------- 143 | // Luminosity Blend mode creates the result color by combining the hue and saturation of the base color with the luminance of the blend color. 144 | vec3 BlendLuminosity(vec3 base, vec3 blend) { 145 | vec3 baseHSL = RGBToHSL(base); 146 | return HSLToRGB(vec3(baseHSL.r, baseHSL.g, RGBToHSL(blend).b)); 147 | } 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | uniform sampler2D u_base; 166 | uniform sampler2D u_blend; 167 | 168 | //UV値 169 | varying vec2 v_texCoord; 170 | 171 | //-------------------------------------------------------------- 172 | // 173 | void main(void) { 174 | vec4 base = texture2D(u_base, v_texCoord); 175 | float a = base.a; 176 | 177 | vec4 blend = texture2D(u_blend, v_texCoord); 178 | 179 | vec3 compose = BlendLuminosity(base.rgb, blend.rgb); 180 | vec4 finalColor = vec4(compose, a); 181 | gl_FragColor = finalColor; 182 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/blend/luminosity.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/gaussianblur/gaussianBlurH.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | #define HORIZONTAL_BLUR_5 4 | 5 | uniform sampler2D u_blurSampler; 6 | uniform float u_sigma = 1.0; 7 | uniform float u_blurSize = 8.0; 8 | 9 | const float PI = 3.14159265; 10 | 11 | #if defined(VERTICAL_BLUR_9) 12 | const float numBlurPixelsPerSide = 4.0; 13 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 14 | #elif defined(HORIZONTAL_BLUR_9) 15 | const float numBlurPixelsPerSide = 4.0; 16 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 17 | #elif defined(VERTICAL_BLUR_7) 18 | const float numBlurPixelsPerSide = 3.0; 19 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 20 | #elif defined(HORIZONTAL_BLUR_7) 21 | const float numBlurPixelsPerSide = 3.0; 22 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 23 | #elif defined(VERTICAL_BLUR_5) 24 | const float numBlurPixelsPerSide = 2.0; 25 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 26 | #elif defined(HORIZONTAL_BLUR_5) 27 | const float numBlurPixelsPerSide = 2.0; 28 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 29 | #else 30 | const float numBlurPixelsPerSide = 0.0; 31 | const vec2 blurMultiplyVec = vec2(0.0, 0.0); 32 | #endif 33 | 34 | varying vec2 v_texCoord; 35 | 36 | //-------------------------------------------------------------- 37 | // 38 | void main(void) { 39 | vec3 incrementalGaussian; 40 | incrementalGaussian.x = 1.0 / (sqrt(2.0 * PI) * u_sigma); 41 | incrementalGaussian.y = exp(-0.5 / (u_sigma * u_sigma)); 42 | incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y; 43 | 44 | vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0); 45 | float coefficientSum = 0.0; 46 | 47 | avgValue += texture2D(u_blurSampler, v_texCoord.xy) * incrementalGaussian.x; 48 | coefficientSum += incrementalGaussian.x; 49 | incrementalGaussian.xy *= incrementalGaussian.yz; 50 | 51 | for (float i = 1.0; i <= numBlurPixelsPerSide; i++) { 52 | avgValue += texture2D(u_blurSampler, v_texCoord.xy - i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 53 | avgValue += texture2D(u_blurSampler, v_texCoord.xy + i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 54 | coefficientSum += 2.0 * incrementalGaussian.x; 55 | incrementalGaussian.xy *= incrementalGaussian.yz; 56 | } 57 | 58 | gl_FragColor = avgValue / coefficientSum; 59 | } 60 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/gaussianblur/gaussianBlurH.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | varying vec2 v_texCoord; 4 | 5 | //-------------------------------------------------------------- 6 | // 7 | void main(void) { 8 | v_texCoord = gl_MultiTexCoord0.st; 9 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 10 | } 11 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/gaussianblur/gaussianBlurV.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | #define HORIZONTAL_BLUR_5 5 | 6 | uniform sampler2D u_blurSampler; 7 | uniform float u_sigma = 1.0; 8 | uniform float u_blurSize = 8.0; 9 | 10 | const float PI = 3.14159265; 11 | 12 | #if defined(VERTICAL_BLUR_9) 13 | const float numBlurPixelsPerSide = 4.0; 14 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 15 | #elif defined(HORIZONTAL_BLUR_9) 16 | const float numBlurPixelsPerSide = 4.0; 17 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 18 | #elif defined(VERTICAL_BLUR_7) 19 | const float numBlurPixelsPerSide = 3.0; 20 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 21 | #elif defined(HORIZONTAL_BLUR_7) 22 | const float numBlurPixelsPerSide = 3.0; 23 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 24 | #elif defined(VERTICAL_BLUR_5) 25 | const float numBlurPixelsPerSide = 2.0; 26 | const vec2 blurMultiplyVec = vec2(0.0, 1.0); 27 | #elif defined(HORIZONTAL_BLUR_5) 28 | const float numBlurPixelsPerSide = 2.0; 29 | const vec2 blurMultiplyVec = vec2(1.0, 0.0); 30 | #else 31 | const float numBlurPixelsPerSide = 0.0; 32 | const vec2 blurMultiplyVec = vec2(0.0, 0.0); 33 | #endif 34 | 35 | varying vec2 v_texCoord; 36 | 37 | //-------------------------------------------------------------- 38 | // 39 | void main(void) { 40 | vec3 incrementalGaussian; 41 | incrementalGaussian.x = 1.0 / (sqrt(2.0 * PI) * u_sigma); 42 | incrementalGaussian.y = exp(-0.5 / (u_sigma * u_sigma)); 43 | incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y; 44 | 45 | vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0); 46 | float coefficientSum = 0.0; 47 | 48 | avgValue += texture2D(u_blurSampler, v_texCoord.xy) * incrementalGaussian.x; 49 | coefficientSum += incrementalGaussian.x; 50 | incrementalGaussian.xy *= incrementalGaussian.yz; 51 | 52 | for (float i = 1.0; i <= numBlurPixelsPerSide; i++) { 53 | avgValue += texture2D(u_blurSampler, v_texCoord.xy - i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 54 | avgValue += texture2D(u_blurSampler, v_texCoord.xy + i * u_blurSize * blurMultiplyVec) * incrementalGaussian.x; 55 | coefficientSum += 2.0 * incrementalGaussian.x; 56 | incrementalGaussian.xy *= incrementalGaussian.yz; 57 | } 58 | 59 | gl_FragColor = avgValue / coefficientSum; 60 | } 61 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/gaussianblur/gaussianBlurV.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | varying vec2 v_texCoord; 4 | 5 | //-------------------------------------------------------------- 6 | // 7 | void main(void) { 8 | v_texCoord = gl_MultiTexCoord0.st; 9 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 10 | } 11 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/grayscale/grayscale.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2D u_source; 5 | 6 | uniform float u_intensity = 1.0; 7 | uniform float u_redCoefficient = 1.0; 8 | uniform float u_greenCoefficient = 1.0; 9 | uniform float u_blurCoefficient = 1.0; 10 | 11 | //UV値 12 | varying vec2 v_texCoord; 13 | 14 | //-------------------------------------------------------------- 15 | // 16 | void main(void) { 17 | vec4 source = texture2D(u_source, v_texCoord); 18 | float a = source.a; 19 | 20 | vec3 grayscale = vec3(source.r * 0.299 + source.g * 0.587 + source.b * 0.114); 21 | grayscale.r *= u_redCoefficient; 22 | grayscale.g *= u_greenCoefficient; 23 | grayscale.b *= u_blurCoefficient; 24 | 25 | vec3 compose = (grayscale * u_intensity) + (source.rgb * (1.0 - u_intensity)); 26 | 27 | vec4 finalColor = vec4(compose, a); 28 | gl_FragColor = finalColor; 29 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/data/shaders/grayscale/grayscale.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | //#extension GL_ARB_texture_rectangle : enable 3 | 4 | //UV値 5 | varying vec2 v_texCoord; 6 | 7 | //-------------------------------------------------------------- 8 | // 9 | void main(void) { 10 | //UV値 11 | v_texCoord = gl_MultiTexCoord0.st; 12 | //固定機能の変換結果をそのまま使う 13 | gl_Position = ftransform(); 14 | } 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/GLUT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/GLUT -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/copy.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Written By Linas Vepstas November 1991 5 | */ 6 | 7 | 8 | #define COPY_THREE_WORDS(A,B) { \ 9 | struct three_words { int a, b, c, }; \ 10 | *(struct three_words *) (A) = *(struct three_words *) (B); \ 11 | } 12 | 13 | #define COPY_FOUR_WORDS(A,B) { \ 14 | struct four_words { int a, b, c, d, }; \ 15 | *(struct four_words *) (A) = *(struct four_words *) (B); \ 16 | } 17 | 18 | /* ============================================================= */ 19 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/extrude.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * extrude.h 4 | * 5 | * FUNCTION: 6 | * prototypes for privately used subroutines for the tubing library 7 | * 8 | * HISTORY: 9 | * Linas Vepstas 1991 10 | */ 11 | 12 | #include "port.h" /* for gleDouble */ 13 | 14 | #ifndef M_PI 15 | #define M_PI 3.14159265358979323846 16 | #endif 17 | 18 | /* ============================================================ */ 19 | /* 20 | * Provides choice of calling subroutine, vs. invoking macro. 21 | * Basically, inlines the source, or not. 22 | * Trades performance for executable size. 23 | */ 24 | 25 | #define INLINE_INTERSECT 26 | #ifdef INLINE_INTERSECT 27 | #define INNERSECT(sect,p,n,v1,v2) { INTERSECT(sect,p,n,v1,v2); } 28 | #else 29 | #define INNERSECT(sect,p,n,v1,v2) intersect(sect,p,n,v1,v2) 30 | #endif /* INLINE_INTERSECT */ 31 | 32 | /* ============================================================ */ 33 | /* The folowing defines give a kludgy way of accessing the qmesh primitive */ 34 | 35 | /* 36 | #define bgntmesh _emu_qmesh_bgnqmesh 37 | #define endtmesh _emu_qmesh_endqmesh 38 | #define c3f _emu_qmesh_c3f 39 | #define n3f _emu_qmesh_n3f 40 | #define v3f _emu_qmesh_v3f 41 | */ 42 | 43 | /* ============================================================ */ 44 | 45 | extern void up_sanity_check (gleDouble up[3], /* up vector for contour */ 46 | int npoints, /* numpoints in poly-line */ 47 | gleDouble point_array[][3]); /* polyline */ 48 | 49 | 50 | extern void draw_raw_style_end_cap (int ncp, /* number of contour points */ 51 | gleDouble contour[][2], /* 2D contour */ 52 | gleDouble zval, /* where to draw cap */ 53 | int frontwards); /* front or back cap */ 54 | 55 | extern void draw_round_style_cap_callback (int iloop, 56 | double cap[][3], 57 | float face_color[3], 58 | gleDouble cut_vector[3], 59 | gleDouble bisect_vector[3], 60 | double norms[][3], 61 | int frontwards); 62 | 63 | extern void draw_angle_style_front_cap (int ncp, 64 | gleDouble bi[3], 65 | gleDouble point_array[][3]); 66 | 67 | extern void extrusion_raw_join (int ncp, /* number of contour points */ 68 | gleDouble contour[][2], /* 2D contour */ 69 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 70 | gleDouble up[3], /* up vector for contour */ 71 | int npoints, /* numpoints in poly-line */ 72 | gleDouble point_array[][3], /* polyline */ 73 | float color_array[][3], /* color of polyline */ 74 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 75 | 76 | 77 | extern void extrusion_round_or_cut_join (int ncp, /* number of contour points */ 78 | gleDouble contour[][2], /* 2D contour */ 79 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 80 | gleDouble up[3], /* up vector for contour */ 81 | int npoints, /* numpoints in poly-line */ 82 | gleDouble point_array[][3], /* polyline */ 83 | float color_array[][3], /* color of polyline */ 84 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 85 | 86 | 87 | extern void extrusion_angle_join (int ncp, /* number of contour points */ 88 | gleDouble contour[][2], /* 2D contour */ 89 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 90 | gleDouble up[3], /* up vector for contour */ 91 | int npoints, /* numpoints in poly-line */ 92 | gleDouble point_array[][3], /* polyline */ 93 | float color_array[][3], /* color of polyline */ 94 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 95 | 96 | /* -------------------------- end of file -------------------------------- */ 97 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/glsmapint.h: -------------------------------------------------------------------------------- 1 | #ifndef __glsmapint_h__ 2 | #define __glsmapint_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glsmap.h" 11 | 12 | enum { X = 0, Y = 1, Z = 2 }; 13 | 14 | #define INITFACE(mesh) \ 15 | int steps = mesh->steps; \ 16 | int sqsteps = mesh->steps * mesh->steps 17 | 18 | #define FACE(side,y,x) \ 19 | mesh->face[(side)*sqsteps + (y)*steps + (x)] 20 | 21 | #define FACExy(side,i,j) \ 22 | (&FACE(side,i,j).x) 23 | 24 | #define FACEst(side,i,j) \ 25 | (&FACE(side,i,j).s) 26 | 27 | #define INITBACK(mesh) \ 28 | int allrings = mesh->rings + mesh->edgeExtend; \ 29 | int ringedspokes = allrings * mesh->steps 30 | 31 | #define BACK(edge,ring,spoke) \ 32 | mesh->back[(edge)*ringedspokes + (ring)*mesh->steps + (spoke)] 33 | 34 | #define BACKxy(edge,ring,spoke) \ 35 | (&BACK(edge,ring,spoke).x) 36 | 37 | #define BACKst(edge,ring,spoke) \ 38 | (&BACK(edge,ring,spoke).s) 39 | 40 | typedef struct _STXY { 41 | GLfloat s, t; 42 | GLfloat x, y; 43 | } STXY; 44 | 45 | typedef struct _SphereMapMesh { 46 | 47 | int refcnt; 48 | 49 | int steps; 50 | int rings; 51 | int edgeExtend; 52 | 53 | STXY *face; 54 | STXY *back; 55 | 56 | } SphereMapMesh; 57 | 58 | struct _SphereMap { 59 | 60 | /* Shared sphere map mesh vertex data. */ 61 | SphereMapMesh *mesh; 62 | 63 | /* Texture object ids. */ 64 | GLuint smapTexObj; 65 | GLuint viewTexObjs[6]; 66 | GLuint viewTexObj; 67 | 68 | /* Flags */ 69 | SphereMapFlags flags; 70 | 71 | /* Texture dimensions must be a power of two. */ 72 | int viewTexDim; /* view texture dimension */ 73 | int smapTexDim; /* sphere map texture dimension */ 74 | 75 | /* Viewport origins for view and sphere map rendering. */ 76 | int viewOrigin[2]; 77 | int smapOrigin[2]; 78 | 79 | /* Viewing vectors. */ 80 | GLfloat eye[3]; 81 | GLfloat up[3]; 82 | GLfloat obj[3]; 83 | 84 | /* Projection parameters. */ 85 | GLfloat viewNear; 86 | GLfloat viewFar; 87 | 88 | /* Rendering callbacks. */ 89 | void (*positionLights)(int view, void *context); 90 | void (*drawView)(int view, void *context); 91 | 92 | /* Application specified callback data. */ 93 | void *context; 94 | 95 | }; 96 | 97 | /* Library internal routines. */ 98 | extern void __smapDrawSphereMapMeshSide(SphereMapMesh *mesh, int side); 99 | extern void __smapDrawSphereMapMeshBack(SphereMapMesh *mesh); 100 | extern void __smapValidateSphereMapMesh(SphereMapMesh *mesh); 101 | 102 | #endif /* __glsmapint_h__ */ 103 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/glutbitmap.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutbitmap_h__ 2 | #define __glutbitmap_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glut.h" 11 | 12 | typedef struct { 13 | const GLsizei width; 14 | const GLsizei height; 15 | const GLfloat xorig; 16 | const GLfloat yorig; 17 | const GLfloat advance; 18 | const GLubyte *bitmap; 19 | } BitmapCharRec, *BitmapCharPtr; 20 | 21 | typedef struct { 22 | const char *name; 23 | const int num_chars; 24 | const int first; 25 | const BitmapCharRec * const *ch; 26 | } BitmapFontRec, *BitmapFontPtr; 27 | 28 | typedef void *GLUTbitmapFont; 29 | 30 | #endif /* __glutbitmap_h__ */ 31 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/glutf90.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutf90_h__ 2 | #define __glutf90_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | /* This header provides the binding interface for William Mitchell's 11 | f90gl Fortran 90 GLUT binding. Other GLUT language bindings 12 | can and should use this interace. */ 13 | 14 | /* I appreciate the guidance from William Mitchell 15 | (mitchell@cam.nist.gov) in developing this friend interface 16 | for use by the f90gl package. See ../../README.fortran */ 17 | 18 | #include 19 | 20 | #ifndef GLUTCALLBACK 21 | #define GLUTCALLBACK 22 | #endif 23 | #ifndef APIENTRY 24 | #define APIENTRY 25 | #endif 26 | 27 | /* Which callback enumerants for the __glutSetFCB/__glutGetFCB routines. */ 28 | /* NOTE These values are part of a binary interface for the f90gl Fortran 29 | 90 binding and so must NOT changes (additions are allowed). */ 30 | 31 | /* GLUTwindow callbacks. */ 32 | #define GLUT_FCB_DISPLAY 0 /* GLUTdisplayFCB */ 33 | #define GLUT_FCB_RESHAPE 1 /* GLUTreshapeFCB */ 34 | #define GLUT_FCB_MOUSE 2 /* GLUTmouseFCB */ 35 | #define GLUT_FCB_MOTION 3 /* GLUTmotionFCB */ 36 | #define GLUT_FCB_PASSIVE 4 /* GLUTpassiveFCB */ 37 | #define GLUT_FCB_ENTRY 5 /* GLUTentryFCB */ 38 | #define GLUT_FCB_KEYBOARD 6 /* GLUTkeyboardFCB */ 39 | #define GLUT_FCB_KEYBOARD_UP 7 /* GLUTkeyboardFCB */ 40 | #define GLUT_FCB_WINDOW_STATUS 8 /* GLUTwindowStatusFCB */ 41 | #define GLUT_FCB_VISIBILITY 9 /* GLUTvisibilityFCB */ 42 | #define GLUT_FCB_SPECIAL 10 /* GLUTspecialFCB */ 43 | #define GLUT_FCB_SPECIAL_UP 11 /* GLUTspecialFCB */ 44 | #define GLUT_FCB_BUTTON_BOX 12 /* GLUTbuttonBoxFCB */ 45 | #define GLUT_FCB_DIALS 13 /* GLUTdialsFCB */ 46 | #define GLUT_FCB_SPACE_MOTION 14 /* GLUTspaceMotionFCB */ 47 | #define GLUT_FCB_SPACE_ROTATE 15 /* GLUTspaceRotateFCB */ 48 | #define GLUT_FCB_SPACE_BUTTON 16 /* GLUTspaceButtonFCB */ 49 | #define GLUT_FCB_TABLET_MOTION 17 /* GLUTtabletMotionFCB */ 50 | #define GLUT_FCB_TABLET_BUTTON 18 /* GLUTtabletButtonFCB */ 51 | #define GLUT_FCB_JOYSTICK 19 /* GLUTjoystickFCB */ 52 | #define GLUT_FCB_WMCLOSE 20 /* GLUTwmcloseFCB */ 53 | /* Non-GLUTwindow callbacks. */ 54 | #define GLUT_FCB_OVERLAY_DISPLAY 100 /* GLUTdisplayFCB */ 55 | #define GLUT_FCB_SELECT 101 /* GLUTselectFCB */ 56 | #define GLUT_FCB_TIMER 102 /* GLUTtimerFCB */ 57 | 58 | /* GLUT Fortran callback function types. */ 59 | typedef void (GLUTCALLBACK *GLUTdisplayFCB) (void); 60 | typedef void (GLUTCALLBACK *GLUTwmcloseFCB) (void); 61 | typedef void (GLUTCALLBACK *GLUTreshapeFCB) (int *, int *); 62 | /* NOTE the pressed key is int, not unsigned char for Fortran! */ 63 | typedef void (GLUTCALLBACK *GLUTkeyboardFCB) (int *, int *, int *); 64 | typedef void (GLUTCALLBACK *GLUTmouseFCB) (int *, int *, int *, int *); 65 | typedef void (GLUTCALLBACK *GLUTmotionFCB) (int *, int *); 66 | typedef void (GLUTCALLBACK *GLUTpassiveFCB) (int *, int *); 67 | typedef void (GLUTCALLBACK *GLUTentryFCB) (int *); 68 | typedef void (GLUTCALLBACK *GLUTwindowStatusFCB) (int *); 69 | typedef void (GLUTCALLBACK *GLUTvisibilityFCB) (int *); 70 | typedef void (GLUTCALLBACK *GLUTspecialFCB) (int *, int *, int *); 71 | typedef void (GLUTCALLBACK *GLUTbuttonBoxFCB) (int *, int *); 72 | typedef void (GLUTCALLBACK *GLUTdialsFCB) (int *, int *); 73 | typedef void (GLUTCALLBACK *GLUTspaceMotionFCB) (int *, int *, int *); 74 | typedef void (GLUTCALLBACK *GLUTspaceRotateFCB) (int *, int *, int *); 75 | typedef void (GLUTCALLBACK *GLUTspaceButtonFCB) (int *, int *); 76 | typedef void (GLUTCALLBACK *GLUTtabletMotionFCB) (int *, int *); 77 | typedef void (GLUTCALLBACK *GLUTtabletButtonFCB) (int *, int *, int *, int *); 78 | typedef void (GLUTCALLBACK *GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); 79 | 80 | typedef void (GLUTCALLBACK *GLUTselectFCB) (int *); 81 | typedef void (GLUTCALLBACK *GLUTtimerFCB) (int *); 82 | typedef void (GLUTCALLBACK *GLUTmenuStateFCB) (int *); /* DEPRICATED. */ 83 | typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *); 84 | typedef void (GLUTCALLBACK *GLUTidleFCB) (void); 85 | 86 | /* Functions that set and return Fortran callback functions. */ 87 | extern void* APIENTRY __glutGetFCB(int which); 88 | extern void APIENTRY __glutSetFCB(int which, void *func); 89 | 90 | #endif /* __glutf90_h__ */ 91 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/glutstroke.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutstroke_h__ 2 | #define __glutstroke_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #if defined(_WIN32) 11 | #pragma warning (disable:4244) /* disable bogus conversion warnings */ 12 | #pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ 13 | #endif 14 | 15 | typedef struct { 16 | float x; 17 | float y; 18 | } CoordRec, *CoordPtr; 19 | 20 | typedef struct { 21 | int num_coords; 22 | const CoordRec *coord; 23 | } StrokeRec, *StrokePtr; 24 | 25 | typedef struct { 26 | int num_strokes; 27 | const StrokeRec *stroke; 28 | float center; 29 | float right; 30 | } StrokeCharRec, *StrokeCharPtr; 31 | 32 | typedef struct { 33 | const char *name; 34 | int num_chars; 35 | const StrokeCharRec *ch; 36 | float top; 37 | float bottom; 38 | } StrokeFontRec, *StrokeFontPtr; 39 | 40 | typedef void *GLUTstrokeFont; 41 | 42 | #endif /* __glutstroke_h__ */ 43 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/gutil.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * gutil.h 4 | * 5 | * FUNCTION: 6 | * Provide utilities that allow rotation to occur 7 | * around any axis. 8 | * 9 | * HISTORY: 10 | * created by Linas Vepstas 1990 11 | * added single & double precision, June 1991, Linas Vepstas 12 | */ 13 | 14 | #ifndef __GUTIL_H__ 15 | #define __GUTIL_H__ 16 | 17 | #ifdef __GUTIL_DOUBLE 18 | #define gutDouble double 19 | #else 20 | #define gutDouble float 21 | #endif 22 | 23 | 24 | #ifdef _NO_PROTO /* NO ANSI C PROTOTYPING */ 25 | 26 | /* Rotation Utilities */ 27 | extern void rot_axis_f (); 28 | extern void rot_about_axis_f (); 29 | extern void rot_omega_f (); 30 | extern void urot_axis_f (); 31 | extern void urot_about_axis_f (); 32 | extern void urot_omega_f (); 33 | 34 | /* double-precision versions */ 35 | extern void rot_axis_d (); 36 | extern void rot_about_axis_d (); 37 | extern void rot_omega_d (); 38 | extern void urot_axis_d (); 39 | extern void urot_about_axis_d (); 40 | extern void urot_omega_d (); 41 | 42 | /* viewpoint functions */ 43 | extern void uview_direction_d (); 44 | extern void uview_direction_f (); 45 | extern void uviewpoint_d (); 46 | extern void uviewpoint_f (); 47 | 48 | #else /* _NO_PROTO */ /* ANSI C PROTOTYPING */ 49 | 50 | /* Rotation Utilities */ 51 | extern void rot_axis_f (float omega, float axis[3]); 52 | extern void rot_about_axis_f (float angle, float axis[3]); 53 | extern void rot_omega_f (float axis[3]); 54 | extern void urot_axis_f (float m[4][4], float omega, float axis[3]); 55 | extern void urot_about_axis_f (float m[4][4], float angle, float axis[3]); 56 | extern void urot_omega_f (float m[4][4], float axis[3]); 57 | 58 | /* double-precision versions */ 59 | extern void rot_axis_d (double omega, double axis[3]); 60 | extern void rot_about_axis_d (double angle, double axis[3]); 61 | extern void rot_omega_d (double axis[3]); 62 | extern void urot_axis_d (double m[4][4], double omega, double axis[3]); 63 | extern void urot_about_axis_d (double m[4][4], double angle, double axis[3]); 64 | extern void urot_omega_d (double m[4][4], double axis[3]); 65 | 66 | /* viewpoint functions */ 67 | extern void uview_direction_d (double m[4][4], /* returned */ 68 | double v21[3], /* input */ 69 | double up[3]); /* input */ 70 | 71 | extern void uview_direction_f (float m[4][4], /* returned */ 72 | float v21[3], /* input */ 73 | float up[3]); /* input */ 74 | 75 | extern void uviewpoint_d (double m[4][4], /* returned */ 76 | double v1[3], /* input */ 77 | double v2[3], /* input */ 78 | double up[3]); /* input */ 79 | 80 | extern void uviewpoint_f (float m[4][4], /* returned */ 81 | float v1[3], /* input */ 82 | float v2[3], /* input */ 83 | float up[3]); /* input */ 84 | 85 | #endif /* _NO_PROTO */ 86 | 87 | #endif /* _GUTIL_H__ */ 88 | 89 | /* ------------------- end of file ---------------------- */ 90 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/rot.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * rot.h 4 | * 5 | * FUNCTION: 6 | * rotation matrix utilities 7 | * 8 | * HISTORY: 9 | * Linas Vepstas Aug 1990 10 | */ 11 | 12 | /* ========================================================== */ 13 | /* 14 | * The MACROS below generate and return more traditional rotation 15 | * matrices -- matrices for rotations about principal axes. 16 | */ 17 | /* ========================================================== */ 18 | 19 | #define ROTX_CS(m,cosine,sine) \ 20 | { \ 21 | /* rotation about the x-axis */ \ 22 | \ 23 | m[0][0] = 1.0; \ 24 | m[0][1] = 0.0; \ 25 | m[0][2] = 0.0; \ 26 | m[0][3] = 0.0; \ 27 | \ 28 | m[1][0] = 0.0; \ 29 | m[1][1] = (cosine); \ 30 | m[1][2] = (sine); \ 31 | m[1][3] = 0.0; \ 32 | \ 33 | m[2][0] = 0.0; \ 34 | m[2][1] = -(sine); \ 35 | m[2][2] = (cosine); \ 36 | m[2][3] = 0.0; \ 37 | \ 38 | m[3][0] = 0.0; \ 39 | m[3][1] = 0.0; \ 40 | m[3][2] = 0.0; \ 41 | m[3][3] = 1.0; \ 42 | } 43 | 44 | /* ========================================================== */ 45 | 46 | #define ROTY_CS(m,cosine,sine) \ 47 | { \ 48 | /* rotation about the y-axis */ \ 49 | \ 50 | m[0][0] = (cosine); \ 51 | m[0][1] = 0.0; \ 52 | m[0][2] = -(sine); \ 53 | m[0][3] = 0.0; \ 54 | \ 55 | m[1][0] = 0.0; \ 56 | m[1][1] = 1.0; \ 57 | m[1][2] = 0.0; \ 58 | m[1][3] = 0.0; \ 59 | \ 60 | m[2][0] = (sine); \ 61 | m[2][1] = 0.0; \ 62 | m[2][2] = (cosine); \ 63 | m[2][3] = 0.0; \ 64 | \ 65 | m[3][0] = 0.0; \ 66 | m[3][1] = 0.0; \ 67 | m[3][2] = 0.0; \ 68 | m[3][3] = 1.0; \ 69 | } 70 | 71 | /* ========================================================== */ 72 | 73 | #define ROTZ_CS(m,cosine,sine) \ 74 | { \ 75 | /* rotation about the z-axis */ \ 76 | \ 77 | m[0][0] = (cosine); \ 78 | m[0][1] = (sine); \ 79 | m[0][2] = 0.0; \ 80 | m[0][3] = 0.0; \ 81 | \ 82 | m[1][0] = -(sine); \ 83 | m[1][1] = (cosine); \ 84 | m[1][2] = 0.0; \ 85 | m[1][3] = 0.0; \ 86 | \ 87 | m[2][0] = 0.0; \ 88 | m[2][1] = 0.0; \ 89 | m[2][2] = 1.0; \ 90 | m[2][3] = 0.0; \ 91 | \ 92 | m[3][0] = 0.0; \ 93 | m[3][1] = 0.0; \ 94 | m[3][2] = 0.0; \ 95 | m[3][3] = 1.0; \ 96 | } 97 | 98 | /* ========================================================== */ 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/segment.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * MODULE: segment.h 4 | * 5 | * FUNCTION: 6 | * Contains function prototypes for segment drawing subroutines. 7 | * These are used only internally, and are not to be exported to 8 | * the user. 9 | * 10 | * HISTORY: 11 | * Create by Linas Vepstas 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | /* ============================================================ */ 16 | 17 | #include "tube.h" 18 | 19 | extern void draw_segment_plain (int ncp, /* number of contour points */ 20 | gleDouble front_contour[][3], 21 | gleDouble back_contour[][3], 22 | int inext, double len); 23 | 24 | extern void draw_segment_color (int ncp, /* number of contour points */ 25 | gleDouble front_contour[][3], 26 | gleDouble back_contour[][3], 27 | float color_last[3], 28 | float color_next[3], 29 | int inext, double len); 30 | 31 | extern void draw_segment_edge_n (int ncp, /* number of contour points */ 32 | gleDouble front_contour[][3], 33 | gleDouble back_contour[][3], 34 | double norm_cont[][3], 35 | int inext, double len); 36 | 37 | extern void draw_segment_c_and_edge_n (int ncp, 38 | gleDouble front_contour[][3], 39 | gleDouble back_contour[][3], 40 | double norm_cont[][3], 41 | float color_last[3], 42 | float color_next[3], 43 | int inext, double len); 44 | 45 | extern void draw_segment_facet_n (int ncp, 46 | gleDouble front_contour[][3], 47 | gleDouble back_contour[][3], 48 | double norm_cont[][3], 49 | int inext, double len); 50 | 51 | extern void draw_segment_c_and_facet_n (int ncp, 52 | gleDouble front_contour[][3], 53 | gleDouble back_contour[][3], 54 | double norm_cont[][3], 55 | float color_last[3], 56 | float color_next[3], 57 | int inext, double len); 58 | 59 | /* ============================================================ */ 60 | 61 | extern void draw_binorm_segment_edge_n (int ncp, 62 | double front_contour[][3], 63 | double back_contour[][3], 64 | double front_norm[][3], 65 | double back_norm[][3], 66 | int inext, double len); 67 | 68 | extern void draw_binorm_segment_c_and_edge_n (int ncp, 69 | double front_contour[][3], 70 | double back_contour[][3], 71 | double front_norm[][3], 72 | double back_norm[][3], 73 | float color_last[3], 74 | float color_next[3], 75 | int inext, double len); 76 | 77 | extern void draw_binorm_segment_facet_n (int ncp, 78 | double front_contour[][3], 79 | double back_contour[][3], 80 | double front_norm[][3], 81 | double back_norm[][3], 82 | int inext, double len); 83 | 84 | extern void draw_binorm_segment_c_and_facet_n (int ncp, 85 | double front_contour[][3], 86 | double back_contour[][3], 87 | double front_norm[][3], 88 | double back_norm[][3], 89 | float color_last[3], 90 | float color_next[3], 91 | int inext, double len); 92 | 93 | extern void draw_angle_style_back_cap (int ncp, /* number of contour points */ 94 | gleDouble bi[3], /* biscetor */ 95 | gleDouble point_array[][3]); /* polyline */ 96 | 97 | /* -------------------------- end of file -------------------------------- */ 98 | 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Headers/tube_gc.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * tube_gc.h 4 | * 5 | * FUNCTION: 6 | * This file allows for easy changes to changes in the way the extrusion 7 | * library handles state info (i.e. context). 8 | * 9 | * HISTORY: 10 | * Linas Vepstas --- February 1993 11 | * Added auto texture coord generation hacks, Linas April 1994 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | #include "tube.h" 16 | #include "port.h" /* for gleVector */ 17 | 18 | typedef float gleColor[3]; 19 | typedef double gleTwoVec[2]; 20 | 21 | typedef struct { 22 | 23 | /* public methods */ 24 | void (*bgn_gen_texture) (int, double); 25 | void (*n3f_gen_texture) (float *); 26 | void (*n3d_gen_texture) (double *); 27 | void (*v3f_gen_texture) (float *, int, int); 28 | void (*v3d_gen_texture) (double *, int, int); 29 | void (*end_gen_texture) (void); 30 | 31 | /* protected members -- "general knowledge" stuff */ 32 | int join_style; 33 | 34 | /* arguments passed into extrusion code */ 35 | int ncp; /* number of contour points */ 36 | gleTwoVec *contour; /* 2D contour */ 37 | gleTwoVec *cont_normal; /* 2D contour normals */ 38 | gleDouble *up; /* up vector */ 39 | int npoints; /* number of points in polyline */ 40 | gleVector *point_array; /* path */ 41 | gleColor *color_array; /* path colors */ 42 | gleAffine *xform_array; /* contour xforms */ 43 | 44 | /* private members, used by texturing code */ 45 | int num_vert; 46 | int segment_number; 47 | double segment_length; 48 | double accum_seg_len; 49 | double prev_x; 50 | double prev_y; 51 | 52 | void (*save_bgn_gen_texture) (int, double); 53 | void (*save_n3f_gen_texture) (float *); 54 | void (*save_n3d_gen_texture) (double *); 55 | void (*save_v3f_gen_texture) (float *, int, int); 56 | void (*save_v3d_gen_texture) (double *, int, int); 57 | void (*save_end_gen_texture) (void); 58 | 59 | } gleGC; 60 | 61 | extern gleGC *_gle_gc; 62 | extern gleGC * gleCreateGC (void); 63 | 64 | #define INIT_GC() {if (!_gle_gc) _gle_gc = gleCreateGC(); } 65 | #define extrusion_join_style (_gle_gc->join_style) 66 | 67 | #define __TUBE_CLOSE_CONTOUR (extrusion_join_style & TUBE_CONTOUR_CLOSED) 68 | #define __TUBE_DRAW_CAP (extrusion_join_style & TUBE_JN_CAP) 69 | #define __TUBE_DRAW_FACET_NORMALS (extrusion_join_style & TUBE_NORM_FACET) 70 | #define __TUBE_DRAW_PATH_EDGE_NORMALS (extrusion_join_style & TUBE_NORM_PATH_EDGE) 71 | 72 | #define __TUBE_STYLE (extrusion_join_style & TUBE_JN_MASK) 73 | #define __TUBE_RAW_JOIN (extrusion_join_style & TUBE_JN_RAW) 74 | #define __TUBE_CUT_JOIN (extrusion_join_style & TUBE_JN_CUT) 75 | #define __TUBE_ANGLE_JOIN (extrusion_join_style & TUBE_JN_ANGLE) 76 | #define __TUBE_ROUND_JOIN (extrusion_join_style & TUBE_JN_ROUND) 77 | 78 | /* ======================= END OF FILE ========================== */ 79 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/Caution.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/Caution.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUT.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = {timerAction = id; }; 11 | CLASS = GLUTApplication; 12 | LANGUAGE = ObjC; 13 | OUTLETS = { 14 | "_aboutMenuItem" = NSMenuItem; 15 | "_hideMenuItem" = NSMenuItem; 16 | "_quitMenuItem" = NSMenuItem; 17 | }; 18 | SUPERCLASS = NSApplication; 19 | }, 20 | { 21 | ACTIONS = {toggleWindow = id; }; 22 | CLASS = GLUTClipboardController; 23 | LANGUAGE = ObjC; 24 | OUTLETS = {"_infoText" = id; "_scrollView" = id; }; 25 | SUPERCLASS = NSWindowController; 26 | }, 27 | { 28 | ACTIONS = { 29 | assign = id; 30 | cancel = id; 31 | inputMenu = id; 32 | invertInput = id; 33 | mouseMatrix = id; 34 | mousePreset = id; 35 | ok = id; 36 | setDefault = id; 37 | }; 38 | CLASS = GLUTPreferencesController; 39 | LANGUAGE = ObjC; 40 | OUTLETS = { 41 | assignPrompt = NSTextField; 42 | assignText = NSTextField; 43 | inputMenu = NSPopUpButton; 44 | inverted = NSButton; 45 | mbConfigMenu = NSPopUpButton; 46 | mbConfigWarningIcon = NSImageView; 47 | mbConfigWarningText = NSTextField; 48 | middleButtonMatrix = NSMatrix; 49 | rightButtonMatrix = NSMatrix; 50 | }; 51 | SUPERCLASS = NSWindowController; 52 | } 53 | ); 54 | IBVersion = 1; 55 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUT.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 4 104 410 240 0 0 1152 848 7 | IBEditorPositions 8 | 9 | 29 10 | 19 615 246 44 0 0 1152 848 11 | 12 | IBFramework Version 13 | 291.0 14 | IBGroupedObjects 15 | 16 | IBLastGroupID 17 | 1 18 | IBOpenObjects 19 | 20 | 29 21 | 22 | IBSystem Version 23 | 6I32 24 | 25 | 26 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUT.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUT.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTClipboard.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 4 | { 5 | ACTIONS = {toggleWindow = id; }; 6 | CLASS = GLUTClipboardController; 7 | LANGUAGE = ObjC; 8 | OUTLETS = {_infoText = id; _scrollView = id; }; 9 | SUPERCLASS = NSWindowController; 10 | } 11 | ); 12 | IBVersion = 1; 13 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTClipboard.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 63 221 356 240 0 0 1600 1178 7 | IBFramework Version 8 | 263.2 9 | IBSystem Version 10 | 5S41 11 | 12 | 13 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTClipboard.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTClipboard.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTPreferences.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = { 11 | cancel = id; 12 | joyAssign = id; 13 | joyDevice = id; 14 | joyElement = id; 15 | joyInvert = id; 16 | launchDebugMode = id; 17 | launchGamemodeCaptureSingle = id; 18 | launchIconic = id; 19 | launchUseCurrWD = id; 20 | launchUseExtDesktop = id; 21 | launchUseMacOSCoords = id; 22 | mouseEanbleEmulation = id; 23 | mouseMiddleMenu = id; 24 | mouseRightMenu = id; 25 | ok = id; 26 | spaceAssign = id; 27 | spaceDevice = id; 28 | spaceElement = id; 29 | spaceInvert = id; 30 | }; 31 | CLASS = GLUTPreferencesController; 32 | LANGUAGE = ObjC; 33 | OUTLETS = { 34 | joyAssign = NSButton; 35 | joyAssignNote = NSTextField; 36 | joyAssignWarningIcon = NSImageView; 37 | joyDeviceMenu = NSPopUpButton; 38 | joyElement = NSTextField; 39 | joyInputMenu = NSPopUpButton; 40 | joyInverted = NSButton; 41 | launchDebugMode = NSButton; 42 | launchFadeTime = NSTextField; 43 | launchGamemodeCaptureSingle = NSButton; 44 | launchIconic = NSButton; 45 | launchInitHeight = NSTextField; 46 | launchInitWidth = NSTextField; 47 | launchInitX = NSTextField; 48 | launchInitY = NSTextField; 49 | launchMenuIdle = NSTextField; 50 | launchSyncToVBL = NSButton; 51 | launchUseCurrWD = NSButton; 52 | launchUseExtendedDesktop = NSButton; 53 | launchUseMacOSXCoords = NSButton; 54 | mouseAssignWarningIcon = NSImageView; 55 | mouseAssignWarningText = NSTextField; 56 | mouseDetected = NSTextField; 57 | mouseEmulation = NSButton; 58 | mouseMiddleConfigMenu = NSPopUpButton; 59 | mouseRightConfigMenu = NSPopUpButton; 60 | prefsTabView = NSTabView; 61 | spaceAssign = NSButton; 62 | spaceAssignNote = NSTextField; 63 | spaceAssignWarningIcon = NSImageView; 64 | spaceDeviceMenu = NSPopUpButton; 65 | spaceElement = NSTextField; 66 | spaceInputMenu = NSPopUpButton; 67 | spaceInverted = NSButton; 68 | }; 69 | SUPERCLASS = NSWindowController; 70 | } 71 | ); 72 | IBVersion = 1; 73 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTPreferences.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 16 329 410 240 0 0 1920 1178 7 | IBFramework Version 8 | 439.0 9 | IBOpenObjects 10 | 11 | 205 12 | 13 | IBSystem Version 14 | 8G32 15 | 16 | 17 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTPreferences.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTPreferences.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTUI.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/GLUTUI.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | GLUT 9 | CFBundleGetInfoString 10 | 3.4.0, Copyright (c) 2001-2008 Apple Inc., All Rights Reserved 11 | CFBundleIdentifier 12 | com.apple.glut 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.4.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | GLUT-3.4.0 23 | 24 | 25 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/blankCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/blankCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomrightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/bottomrightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/crossCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/crossCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/cycleCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/cycleCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/destroyCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/destroyCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/fingerCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/fingerCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/helpCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/helpCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/leftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/leftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/leftRightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/leftRightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/rightArrowCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/rightArrowCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/rightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/rightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/sprayCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/sprayCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/topCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/topCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/topleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/topleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/toprightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/toprightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/upDownCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/upDownCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/waitCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Resources/waitCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/copy.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Written By Linas Vepstas November 1991 5 | */ 6 | 7 | 8 | #define COPY_THREE_WORDS(A,B) { \ 9 | struct three_words { int a, b, c, }; \ 10 | *(struct three_words *) (A) = *(struct three_words *) (B); \ 11 | } 12 | 13 | #define COPY_FOUR_WORDS(A,B) { \ 14 | struct four_words { int a, b, c, d, }; \ 15 | *(struct four_words *) (A) = *(struct four_words *) (B); \ 16 | } 17 | 18 | /* ============================================================= */ 19 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/extrude.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * extrude.h 4 | * 5 | * FUNCTION: 6 | * prototypes for privately used subroutines for the tubing library 7 | * 8 | * HISTORY: 9 | * Linas Vepstas 1991 10 | */ 11 | 12 | #include "port.h" /* for gleDouble */ 13 | 14 | #ifndef M_PI 15 | #define M_PI 3.14159265358979323846 16 | #endif 17 | 18 | /* ============================================================ */ 19 | /* 20 | * Provides choice of calling subroutine, vs. invoking macro. 21 | * Basically, inlines the source, or not. 22 | * Trades performance for executable size. 23 | */ 24 | 25 | #define INLINE_INTERSECT 26 | #ifdef INLINE_INTERSECT 27 | #define INNERSECT(sect,p,n,v1,v2) { INTERSECT(sect,p,n,v1,v2); } 28 | #else 29 | #define INNERSECT(sect,p,n,v1,v2) intersect(sect,p,n,v1,v2) 30 | #endif /* INLINE_INTERSECT */ 31 | 32 | /* ============================================================ */ 33 | /* The folowing defines give a kludgy way of accessing the qmesh primitive */ 34 | 35 | /* 36 | #define bgntmesh _emu_qmesh_bgnqmesh 37 | #define endtmesh _emu_qmesh_endqmesh 38 | #define c3f _emu_qmesh_c3f 39 | #define n3f _emu_qmesh_n3f 40 | #define v3f _emu_qmesh_v3f 41 | */ 42 | 43 | /* ============================================================ */ 44 | 45 | extern void up_sanity_check (gleDouble up[3], /* up vector for contour */ 46 | int npoints, /* numpoints in poly-line */ 47 | gleDouble point_array[][3]); /* polyline */ 48 | 49 | 50 | extern void draw_raw_style_end_cap (int ncp, /* number of contour points */ 51 | gleDouble contour[][2], /* 2D contour */ 52 | gleDouble zval, /* where to draw cap */ 53 | int frontwards); /* front or back cap */ 54 | 55 | extern void draw_round_style_cap_callback (int iloop, 56 | double cap[][3], 57 | float face_color[3], 58 | gleDouble cut_vector[3], 59 | gleDouble bisect_vector[3], 60 | double norms[][3], 61 | int frontwards); 62 | 63 | extern void draw_angle_style_front_cap (int ncp, 64 | gleDouble bi[3], 65 | gleDouble point_array[][3]); 66 | 67 | extern void extrusion_raw_join (int ncp, /* number of contour points */ 68 | gleDouble contour[][2], /* 2D contour */ 69 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 70 | gleDouble up[3], /* up vector for contour */ 71 | int npoints, /* numpoints in poly-line */ 72 | gleDouble point_array[][3], /* polyline */ 73 | float color_array[][3], /* color of polyline */ 74 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 75 | 76 | 77 | extern void extrusion_round_or_cut_join (int ncp, /* number of contour points */ 78 | gleDouble contour[][2], /* 2D contour */ 79 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 80 | gleDouble up[3], /* up vector for contour */ 81 | int npoints, /* numpoints in poly-line */ 82 | gleDouble point_array[][3], /* polyline */ 83 | float color_array[][3], /* color of polyline */ 84 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 85 | 86 | 87 | extern void extrusion_angle_join (int ncp, /* number of contour points */ 88 | gleDouble contour[][2], /* 2D contour */ 89 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 90 | gleDouble up[3], /* up vector for contour */ 91 | int npoints, /* numpoints in poly-line */ 92 | gleDouble point_array[][3], /* polyline */ 93 | float color_array[][3], /* color of polyline */ 94 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 95 | 96 | /* -------------------------- end of file -------------------------------- */ 97 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glsmapint.h: -------------------------------------------------------------------------------- 1 | #ifndef __glsmapint_h__ 2 | #define __glsmapint_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glsmap.h" 11 | 12 | enum { X = 0, Y = 1, Z = 2 }; 13 | 14 | #define INITFACE(mesh) \ 15 | int steps = mesh->steps; \ 16 | int sqsteps = mesh->steps * mesh->steps 17 | 18 | #define FACE(side,y,x) \ 19 | mesh->face[(side)*sqsteps + (y)*steps + (x)] 20 | 21 | #define FACExy(side,i,j) \ 22 | (&FACE(side,i,j).x) 23 | 24 | #define FACEst(side,i,j) \ 25 | (&FACE(side,i,j).s) 26 | 27 | #define INITBACK(mesh) \ 28 | int allrings = mesh->rings + mesh->edgeExtend; \ 29 | int ringedspokes = allrings * mesh->steps 30 | 31 | #define BACK(edge,ring,spoke) \ 32 | mesh->back[(edge)*ringedspokes + (ring)*mesh->steps + (spoke)] 33 | 34 | #define BACKxy(edge,ring,spoke) \ 35 | (&BACK(edge,ring,spoke).x) 36 | 37 | #define BACKst(edge,ring,spoke) \ 38 | (&BACK(edge,ring,spoke).s) 39 | 40 | typedef struct _STXY { 41 | GLfloat s, t; 42 | GLfloat x, y; 43 | } STXY; 44 | 45 | typedef struct _SphereMapMesh { 46 | 47 | int refcnt; 48 | 49 | int steps; 50 | int rings; 51 | int edgeExtend; 52 | 53 | STXY *face; 54 | STXY *back; 55 | 56 | } SphereMapMesh; 57 | 58 | struct _SphereMap { 59 | 60 | /* Shared sphere map mesh vertex data. */ 61 | SphereMapMesh *mesh; 62 | 63 | /* Texture object ids. */ 64 | GLuint smapTexObj; 65 | GLuint viewTexObjs[6]; 66 | GLuint viewTexObj; 67 | 68 | /* Flags */ 69 | SphereMapFlags flags; 70 | 71 | /* Texture dimensions must be a power of two. */ 72 | int viewTexDim; /* view texture dimension */ 73 | int smapTexDim; /* sphere map texture dimension */ 74 | 75 | /* Viewport origins for view and sphere map rendering. */ 76 | int viewOrigin[2]; 77 | int smapOrigin[2]; 78 | 79 | /* Viewing vectors. */ 80 | GLfloat eye[3]; 81 | GLfloat up[3]; 82 | GLfloat obj[3]; 83 | 84 | /* Projection parameters. */ 85 | GLfloat viewNear; 86 | GLfloat viewFar; 87 | 88 | /* Rendering callbacks. */ 89 | void (*positionLights)(int view, void *context); 90 | void (*drawView)(int view, void *context); 91 | 92 | /* Application specified callback data. */ 93 | void *context; 94 | 95 | }; 96 | 97 | /* Library internal routines. */ 98 | extern void __smapDrawSphereMapMeshSide(SphereMapMesh *mesh, int side); 99 | extern void __smapDrawSphereMapMeshBack(SphereMapMesh *mesh); 100 | extern void __smapValidateSphereMapMesh(SphereMapMesh *mesh); 101 | 102 | #endif /* __glsmapint_h__ */ 103 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutbitmap.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutbitmap_h__ 2 | #define __glutbitmap_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glut.h" 11 | 12 | typedef struct { 13 | const GLsizei width; 14 | const GLsizei height; 15 | const GLfloat xorig; 16 | const GLfloat yorig; 17 | const GLfloat advance; 18 | const GLubyte *bitmap; 19 | } BitmapCharRec, *BitmapCharPtr; 20 | 21 | typedef struct { 22 | const char *name; 23 | const int num_chars; 24 | const int first; 25 | const BitmapCharRec * const *ch; 26 | } BitmapFontRec, *BitmapFontPtr; 27 | 28 | typedef void *GLUTbitmapFont; 29 | 30 | #endif /* __glutbitmap_h__ */ 31 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutf90.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutf90_h__ 2 | #define __glutf90_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | /* This header provides the binding interface for William Mitchell's 11 | f90gl Fortran 90 GLUT binding. Other GLUT language bindings 12 | can and should use this interace. */ 13 | 14 | /* I appreciate the guidance from William Mitchell 15 | (mitchell@cam.nist.gov) in developing this friend interface 16 | for use by the f90gl package. See ../../README.fortran */ 17 | 18 | #include 19 | 20 | #ifndef GLUTCALLBACK 21 | #define GLUTCALLBACK 22 | #endif 23 | #ifndef APIENTRY 24 | #define APIENTRY 25 | #endif 26 | 27 | /* Which callback enumerants for the __glutSetFCB/__glutGetFCB routines. */ 28 | /* NOTE These values are part of a binary interface for the f90gl Fortran 29 | 90 binding and so must NOT changes (additions are allowed). */ 30 | 31 | /* GLUTwindow callbacks. */ 32 | #define GLUT_FCB_DISPLAY 0 /* GLUTdisplayFCB */ 33 | #define GLUT_FCB_RESHAPE 1 /* GLUTreshapeFCB */ 34 | #define GLUT_FCB_MOUSE 2 /* GLUTmouseFCB */ 35 | #define GLUT_FCB_MOTION 3 /* GLUTmotionFCB */ 36 | #define GLUT_FCB_PASSIVE 4 /* GLUTpassiveFCB */ 37 | #define GLUT_FCB_ENTRY 5 /* GLUTentryFCB */ 38 | #define GLUT_FCB_KEYBOARD 6 /* GLUTkeyboardFCB */ 39 | #define GLUT_FCB_KEYBOARD_UP 7 /* GLUTkeyboardFCB */ 40 | #define GLUT_FCB_WINDOW_STATUS 8 /* GLUTwindowStatusFCB */ 41 | #define GLUT_FCB_VISIBILITY 9 /* GLUTvisibilityFCB */ 42 | #define GLUT_FCB_SPECIAL 10 /* GLUTspecialFCB */ 43 | #define GLUT_FCB_SPECIAL_UP 11 /* GLUTspecialFCB */ 44 | #define GLUT_FCB_BUTTON_BOX 12 /* GLUTbuttonBoxFCB */ 45 | #define GLUT_FCB_DIALS 13 /* GLUTdialsFCB */ 46 | #define GLUT_FCB_SPACE_MOTION 14 /* GLUTspaceMotionFCB */ 47 | #define GLUT_FCB_SPACE_ROTATE 15 /* GLUTspaceRotateFCB */ 48 | #define GLUT_FCB_SPACE_BUTTON 16 /* GLUTspaceButtonFCB */ 49 | #define GLUT_FCB_TABLET_MOTION 17 /* GLUTtabletMotionFCB */ 50 | #define GLUT_FCB_TABLET_BUTTON 18 /* GLUTtabletButtonFCB */ 51 | #define GLUT_FCB_JOYSTICK 19 /* GLUTjoystickFCB */ 52 | #define GLUT_FCB_WMCLOSE 20 /* GLUTwmcloseFCB */ 53 | /* Non-GLUTwindow callbacks. */ 54 | #define GLUT_FCB_OVERLAY_DISPLAY 100 /* GLUTdisplayFCB */ 55 | #define GLUT_FCB_SELECT 101 /* GLUTselectFCB */ 56 | #define GLUT_FCB_TIMER 102 /* GLUTtimerFCB */ 57 | 58 | /* GLUT Fortran callback function types. */ 59 | typedef void (GLUTCALLBACK *GLUTdisplayFCB) (void); 60 | typedef void (GLUTCALLBACK *GLUTwmcloseFCB) (void); 61 | typedef void (GLUTCALLBACK *GLUTreshapeFCB) (int *, int *); 62 | /* NOTE the pressed key is int, not unsigned char for Fortran! */ 63 | typedef void (GLUTCALLBACK *GLUTkeyboardFCB) (int *, int *, int *); 64 | typedef void (GLUTCALLBACK *GLUTmouseFCB) (int *, int *, int *, int *); 65 | typedef void (GLUTCALLBACK *GLUTmotionFCB) (int *, int *); 66 | typedef void (GLUTCALLBACK *GLUTpassiveFCB) (int *, int *); 67 | typedef void (GLUTCALLBACK *GLUTentryFCB) (int *); 68 | typedef void (GLUTCALLBACK *GLUTwindowStatusFCB) (int *); 69 | typedef void (GLUTCALLBACK *GLUTvisibilityFCB) (int *); 70 | typedef void (GLUTCALLBACK *GLUTspecialFCB) (int *, int *, int *); 71 | typedef void (GLUTCALLBACK *GLUTbuttonBoxFCB) (int *, int *); 72 | typedef void (GLUTCALLBACK *GLUTdialsFCB) (int *, int *); 73 | typedef void (GLUTCALLBACK *GLUTspaceMotionFCB) (int *, int *, int *); 74 | typedef void (GLUTCALLBACK *GLUTspaceRotateFCB) (int *, int *, int *); 75 | typedef void (GLUTCALLBACK *GLUTspaceButtonFCB) (int *, int *); 76 | typedef void (GLUTCALLBACK *GLUTtabletMotionFCB) (int *, int *); 77 | typedef void (GLUTCALLBACK *GLUTtabletButtonFCB) (int *, int *, int *, int *); 78 | typedef void (GLUTCALLBACK *GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); 79 | 80 | typedef void (GLUTCALLBACK *GLUTselectFCB) (int *); 81 | typedef void (GLUTCALLBACK *GLUTtimerFCB) (int *); 82 | typedef void (GLUTCALLBACK *GLUTmenuStateFCB) (int *); /* DEPRICATED. */ 83 | typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *); 84 | typedef void (GLUTCALLBACK *GLUTidleFCB) (void); 85 | 86 | /* Functions that set and return Fortran callback functions. */ 87 | extern void* APIENTRY __glutGetFCB(int which); 88 | extern void APIENTRY __glutSetFCB(int which, void *func); 89 | 90 | #endif /* __glutf90_h__ */ 91 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutstroke.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutstroke_h__ 2 | #define __glutstroke_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #if defined(_WIN32) 11 | #pragma warning (disable:4244) /* disable bogus conversion warnings */ 12 | #pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ 13 | #endif 14 | 15 | typedef struct { 16 | float x; 17 | float y; 18 | } CoordRec, *CoordPtr; 19 | 20 | typedef struct { 21 | int num_coords; 22 | const CoordRec *coord; 23 | } StrokeRec, *StrokePtr; 24 | 25 | typedef struct { 26 | int num_strokes; 27 | const StrokeRec *stroke; 28 | float center; 29 | float right; 30 | } StrokeCharRec, *StrokeCharPtr; 31 | 32 | typedef struct { 33 | const char *name; 34 | int num_chars; 35 | const StrokeCharRec *ch; 36 | float top; 37 | float bottom; 38 | } StrokeFontRec, *StrokeFontPtr; 39 | 40 | typedef void *GLUTstrokeFont; 41 | 42 | #endif /* __glutstroke_h__ */ 43 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/gutil.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * gutil.h 4 | * 5 | * FUNCTION: 6 | * Provide utilities that allow rotation to occur 7 | * around any axis. 8 | * 9 | * HISTORY: 10 | * created by Linas Vepstas 1990 11 | * added single & double precision, June 1991, Linas Vepstas 12 | */ 13 | 14 | #ifndef __GUTIL_H__ 15 | #define __GUTIL_H__ 16 | 17 | #ifdef __GUTIL_DOUBLE 18 | #define gutDouble double 19 | #else 20 | #define gutDouble float 21 | #endif 22 | 23 | 24 | #ifdef _NO_PROTO /* NO ANSI C PROTOTYPING */ 25 | 26 | /* Rotation Utilities */ 27 | extern void rot_axis_f (); 28 | extern void rot_about_axis_f (); 29 | extern void rot_omega_f (); 30 | extern void urot_axis_f (); 31 | extern void urot_about_axis_f (); 32 | extern void urot_omega_f (); 33 | 34 | /* double-precision versions */ 35 | extern void rot_axis_d (); 36 | extern void rot_about_axis_d (); 37 | extern void rot_omega_d (); 38 | extern void urot_axis_d (); 39 | extern void urot_about_axis_d (); 40 | extern void urot_omega_d (); 41 | 42 | /* viewpoint functions */ 43 | extern void uview_direction_d (); 44 | extern void uview_direction_f (); 45 | extern void uviewpoint_d (); 46 | extern void uviewpoint_f (); 47 | 48 | #else /* _NO_PROTO */ /* ANSI C PROTOTYPING */ 49 | 50 | /* Rotation Utilities */ 51 | extern void rot_axis_f (float omega, float axis[3]); 52 | extern void rot_about_axis_f (float angle, float axis[3]); 53 | extern void rot_omega_f (float axis[3]); 54 | extern void urot_axis_f (float m[4][4], float omega, float axis[3]); 55 | extern void urot_about_axis_f (float m[4][4], float angle, float axis[3]); 56 | extern void urot_omega_f (float m[4][4], float axis[3]); 57 | 58 | /* double-precision versions */ 59 | extern void rot_axis_d (double omega, double axis[3]); 60 | extern void rot_about_axis_d (double angle, double axis[3]); 61 | extern void rot_omega_d (double axis[3]); 62 | extern void urot_axis_d (double m[4][4], double omega, double axis[3]); 63 | extern void urot_about_axis_d (double m[4][4], double angle, double axis[3]); 64 | extern void urot_omega_d (double m[4][4], double axis[3]); 65 | 66 | /* viewpoint functions */ 67 | extern void uview_direction_d (double m[4][4], /* returned */ 68 | double v21[3], /* input */ 69 | double up[3]); /* input */ 70 | 71 | extern void uview_direction_f (float m[4][4], /* returned */ 72 | float v21[3], /* input */ 73 | float up[3]); /* input */ 74 | 75 | extern void uviewpoint_d (double m[4][4], /* returned */ 76 | double v1[3], /* input */ 77 | double v2[3], /* input */ 78 | double up[3]); /* input */ 79 | 80 | extern void uviewpoint_f (float m[4][4], /* returned */ 81 | float v1[3], /* input */ 82 | float v2[3], /* input */ 83 | float up[3]); /* input */ 84 | 85 | #endif /* _NO_PROTO */ 86 | 87 | #endif /* _GUTIL_H__ */ 88 | 89 | /* ------------------- end of file ---------------------- */ 90 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/rot.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * rot.h 4 | * 5 | * FUNCTION: 6 | * rotation matrix utilities 7 | * 8 | * HISTORY: 9 | * Linas Vepstas Aug 1990 10 | */ 11 | 12 | /* ========================================================== */ 13 | /* 14 | * The MACROS below generate and return more traditional rotation 15 | * matrices -- matrices for rotations about principal axes. 16 | */ 17 | /* ========================================================== */ 18 | 19 | #define ROTX_CS(m,cosine,sine) \ 20 | { \ 21 | /* rotation about the x-axis */ \ 22 | \ 23 | m[0][0] = 1.0; \ 24 | m[0][1] = 0.0; \ 25 | m[0][2] = 0.0; \ 26 | m[0][3] = 0.0; \ 27 | \ 28 | m[1][0] = 0.0; \ 29 | m[1][1] = (cosine); \ 30 | m[1][2] = (sine); \ 31 | m[1][3] = 0.0; \ 32 | \ 33 | m[2][0] = 0.0; \ 34 | m[2][1] = -(sine); \ 35 | m[2][2] = (cosine); \ 36 | m[2][3] = 0.0; \ 37 | \ 38 | m[3][0] = 0.0; \ 39 | m[3][1] = 0.0; \ 40 | m[3][2] = 0.0; \ 41 | m[3][3] = 1.0; \ 42 | } 43 | 44 | /* ========================================================== */ 45 | 46 | #define ROTY_CS(m,cosine,sine) \ 47 | { \ 48 | /* rotation about the y-axis */ \ 49 | \ 50 | m[0][0] = (cosine); \ 51 | m[0][1] = 0.0; \ 52 | m[0][2] = -(sine); \ 53 | m[0][3] = 0.0; \ 54 | \ 55 | m[1][0] = 0.0; \ 56 | m[1][1] = 1.0; \ 57 | m[1][2] = 0.0; \ 58 | m[1][3] = 0.0; \ 59 | \ 60 | m[2][0] = (sine); \ 61 | m[2][1] = 0.0; \ 62 | m[2][2] = (cosine); \ 63 | m[2][3] = 0.0; \ 64 | \ 65 | m[3][0] = 0.0; \ 66 | m[3][1] = 0.0; \ 67 | m[3][2] = 0.0; \ 68 | m[3][3] = 1.0; \ 69 | } 70 | 71 | /* ========================================================== */ 72 | 73 | #define ROTZ_CS(m,cosine,sine) \ 74 | { \ 75 | /* rotation about the z-axis */ \ 76 | \ 77 | m[0][0] = (cosine); \ 78 | m[0][1] = (sine); \ 79 | m[0][2] = 0.0; \ 80 | m[0][3] = 0.0; \ 81 | \ 82 | m[1][0] = -(sine); \ 83 | m[1][1] = (cosine); \ 84 | m[1][2] = 0.0; \ 85 | m[1][3] = 0.0; \ 86 | \ 87 | m[2][0] = 0.0; \ 88 | m[2][1] = 0.0; \ 89 | m[2][2] = 1.0; \ 90 | m[2][3] = 0.0; \ 91 | \ 92 | m[3][0] = 0.0; \ 93 | m[3][1] = 0.0; \ 94 | m[3][2] = 0.0; \ 95 | m[3][3] = 1.0; \ 96 | } 97 | 98 | /* ========================================================== */ 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/segment.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * MODULE: segment.h 4 | * 5 | * FUNCTION: 6 | * Contains function prototypes for segment drawing subroutines. 7 | * These are used only internally, and are not to be exported to 8 | * the user. 9 | * 10 | * HISTORY: 11 | * Create by Linas Vepstas 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | /* ============================================================ */ 16 | 17 | #include "tube.h" 18 | 19 | extern void draw_segment_plain (int ncp, /* number of contour points */ 20 | gleDouble front_contour[][3], 21 | gleDouble back_contour[][3], 22 | int inext, double len); 23 | 24 | extern void draw_segment_color (int ncp, /* number of contour points */ 25 | gleDouble front_contour[][3], 26 | gleDouble back_contour[][3], 27 | float color_last[3], 28 | float color_next[3], 29 | int inext, double len); 30 | 31 | extern void draw_segment_edge_n (int ncp, /* number of contour points */ 32 | gleDouble front_contour[][3], 33 | gleDouble back_contour[][3], 34 | double norm_cont[][3], 35 | int inext, double len); 36 | 37 | extern void draw_segment_c_and_edge_n (int ncp, 38 | gleDouble front_contour[][3], 39 | gleDouble back_contour[][3], 40 | double norm_cont[][3], 41 | float color_last[3], 42 | float color_next[3], 43 | int inext, double len); 44 | 45 | extern void draw_segment_facet_n (int ncp, 46 | gleDouble front_contour[][3], 47 | gleDouble back_contour[][3], 48 | double norm_cont[][3], 49 | int inext, double len); 50 | 51 | extern void draw_segment_c_and_facet_n (int ncp, 52 | gleDouble front_contour[][3], 53 | gleDouble back_contour[][3], 54 | double norm_cont[][3], 55 | float color_last[3], 56 | float color_next[3], 57 | int inext, double len); 58 | 59 | /* ============================================================ */ 60 | 61 | extern void draw_binorm_segment_edge_n (int ncp, 62 | double front_contour[][3], 63 | double back_contour[][3], 64 | double front_norm[][3], 65 | double back_norm[][3], 66 | int inext, double len); 67 | 68 | extern void draw_binorm_segment_c_and_edge_n (int ncp, 69 | double front_contour[][3], 70 | double back_contour[][3], 71 | double front_norm[][3], 72 | double back_norm[][3], 73 | float color_last[3], 74 | float color_next[3], 75 | int inext, double len); 76 | 77 | extern void draw_binorm_segment_facet_n (int ncp, 78 | double front_contour[][3], 79 | double back_contour[][3], 80 | double front_norm[][3], 81 | double back_norm[][3], 82 | int inext, double len); 83 | 84 | extern void draw_binorm_segment_c_and_facet_n (int ncp, 85 | double front_contour[][3], 86 | double back_contour[][3], 87 | double front_norm[][3], 88 | double back_norm[][3], 89 | float color_last[3], 90 | float color_next[3], 91 | int inext, double len); 92 | 93 | extern void draw_angle_style_back_cap (int ncp, /* number of contour points */ 94 | gleDouble bi[3], /* biscetor */ 95 | gleDouble point_array[][3]); /* polyline */ 96 | 97 | /* -------------------------- end of file -------------------------------- */ 98 | 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/tube_gc.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * tube_gc.h 4 | * 5 | * FUNCTION: 6 | * This file allows for easy changes to changes in the way the extrusion 7 | * library handles state info (i.e. context). 8 | * 9 | * HISTORY: 10 | * Linas Vepstas --- February 1993 11 | * Added auto texture coord generation hacks, Linas April 1994 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | #include "tube.h" 16 | #include "port.h" /* for gleVector */ 17 | 18 | typedef float gleColor[3]; 19 | typedef double gleTwoVec[2]; 20 | 21 | typedef struct { 22 | 23 | /* public methods */ 24 | void (*bgn_gen_texture) (int, double); 25 | void (*n3f_gen_texture) (float *); 26 | void (*n3d_gen_texture) (double *); 27 | void (*v3f_gen_texture) (float *, int, int); 28 | void (*v3d_gen_texture) (double *, int, int); 29 | void (*end_gen_texture) (void); 30 | 31 | /* protected members -- "general knowledge" stuff */ 32 | int join_style; 33 | 34 | /* arguments passed into extrusion code */ 35 | int ncp; /* number of contour points */ 36 | gleTwoVec *contour; /* 2D contour */ 37 | gleTwoVec *cont_normal; /* 2D contour normals */ 38 | gleDouble *up; /* up vector */ 39 | int npoints; /* number of points in polyline */ 40 | gleVector *point_array; /* path */ 41 | gleColor *color_array; /* path colors */ 42 | gleAffine *xform_array; /* contour xforms */ 43 | 44 | /* private members, used by texturing code */ 45 | int num_vert; 46 | int segment_number; 47 | double segment_length; 48 | double accum_seg_len; 49 | double prev_x; 50 | double prev_y; 51 | 52 | void (*save_bgn_gen_texture) (int, double); 53 | void (*save_n3f_gen_texture) (float *); 54 | void (*save_n3d_gen_texture) (double *); 55 | void (*save_v3f_gen_texture) (float *, int, int); 56 | void (*save_v3d_gen_texture) (double *, int, int); 57 | void (*save_end_gen_texture) (void); 58 | 59 | } gleGC; 60 | 61 | extern gleGC *_gle_gc; 62 | extern gleGC * gleCreateGC (void); 63 | 64 | #define INIT_GC() {if (!_gle_gc) _gle_gc = gleCreateGC(); } 65 | #define extrusion_join_style (_gle_gc->join_style) 66 | 67 | #define __TUBE_CLOSE_CONTOUR (extrusion_join_style & TUBE_CONTOUR_CLOSED) 68 | #define __TUBE_DRAW_CAP (extrusion_join_style & TUBE_JN_CAP) 69 | #define __TUBE_DRAW_FACET_NORMALS (extrusion_join_style & TUBE_NORM_FACET) 70 | #define __TUBE_DRAW_PATH_EDGE_NORMALS (extrusion_join_style & TUBE_NORM_PATH_EDGE) 71 | 72 | #define __TUBE_STYLE (extrusion_join_style & TUBE_JN_MASK) 73 | #define __TUBE_RAW_JOIN (extrusion_join_style & TUBE_JN_RAW) 74 | #define __TUBE_CUT_JOIN (extrusion_join_style & TUBE_JN_CUT) 75 | #define __TUBE_ANGLE_JOIN (extrusion_join_style & TUBE_JN_ANGLE) 76 | #define __TUBE_ROUND_JOIN (extrusion_join_style & TUBE_JN_ROUND) 77 | 78 | /* ======================= END OF FILE ========================== */ 79 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/Caution.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/Caution.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = {timerAction = id; }; 11 | CLASS = GLUTApplication; 12 | LANGUAGE = ObjC; 13 | OUTLETS = { 14 | "_aboutMenuItem" = NSMenuItem; 15 | "_hideMenuItem" = NSMenuItem; 16 | "_quitMenuItem" = NSMenuItem; 17 | }; 18 | SUPERCLASS = NSApplication; 19 | }, 20 | { 21 | ACTIONS = {toggleWindow = id; }; 22 | CLASS = GLUTClipboardController; 23 | LANGUAGE = ObjC; 24 | OUTLETS = {"_infoText" = id; "_scrollView" = id; }; 25 | SUPERCLASS = NSWindowController; 26 | }, 27 | { 28 | ACTIONS = { 29 | assign = id; 30 | cancel = id; 31 | inputMenu = id; 32 | invertInput = id; 33 | mouseMatrix = id; 34 | mousePreset = id; 35 | ok = id; 36 | setDefault = id; 37 | }; 38 | CLASS = GLUTPreferencesController; 39 | LANGUAGE = ObjC; 40 | OUTLETS = { 41 | assignPrompt = NSTextField; 42 | assignText = NSTextField; 43 | inputMenu = NSPopUpButton; 44 | inverted = NSButton; 45 | mbConfigMenu = NSPopUpButton; 46 | mbConfigWarningIcon = NSImageView; 47 | mbConfigWarningText = NSTextField; 48 | middleButtonMatrix = NSMatrix; 49 | rightButtonMatrix = NSMatrix; 50 | }; 51 | SUPERCLASS = NSWindowController; 52 | } 53 | ); 54 | IBVersion = 1; 55 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 4 104 410 240 0 0 1152 848 7 | IBEditorPositions 8 | 9 | 29 10 | 19 615 246 44 0 0 1152 848 11 | 12 | IBFramework Version 13 | 291.0 14 | IBGroupedObjects 15 | 16 | IBLastGroupID 17 | 1 18 | IBOpenObjects 19 | 20 | 29 21 | 22 | IBSystem Version 23 | 6I32 24 | 25 | 26 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 4 | { 5 | ACTIONS = {toggleWindow = id; }; 6 | CLASS = GLUTClipboardController; 7 | LANGUAGE = ObjC; 8 | OUTLETS = {_infoText = id; _scrollView = id; }; 9 | SUPERCLASS = NSWindowController; 10 | } 11 | ); 12 | IBVersion = 1; 13 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 63 221 356 240 0 0 1600 1178 7 | IBFramework Version 8 | 263.2 9 | IBSystem Version 10 | 5S41 11 | 12 | 13 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = { 11 | cancel = id; 12 | joyAssign = id; 13 | joyDevice = id; 14 | joyElement = id; 15 | joyInvert = id; 16 | launchDebugMode = id; 17 | launchGamemodeCaptureSingle = id; 18 | launchIconic = id; 19 | launchUseCurrWD = id; 20 | launchUseExtDesktop = id; 21 | launchUseMacOSCoords = id; 22 | mouseEanbleEmulation = id; 23 | mouseMiddleMenu = id; 24 | mouseRightMenu = id; 25 | ok = id; 26 | spaceAssign = id; 27 | spaceDevice = id; 28 | spaceElement = id; 29 | spaceInvert = id; 30 | }; 31 | CLASS = GLUTPreferencesController; 32 | LANGUAGE = ObjC; 33 | OUTLETS = { 34 | joyAssign = NSButton; 35 | joyAssignNote = NSTextField; 36 | joyAssignWarningIcon = NSImageView; 37 | joyDeviceMenu = NSPopUpButton; 38 | joyElement = NSTextField; 39 | joyInputMenu = NSPopUpButton; 40 | joyInverted = NSButton; 41 | launchDebugMode = NSButton; 42 | launchFadeTime = NSTextField; 43 | launchGamemodeCaptureSingle = NSButton; 44 | launchIconic = NSButton; 45 | launchInitHeight = NSTextField; 46 | launchInitWidth = NSTextField; 47 | launchInitX = NSTextField; 48 | launchInitY = NSTextField; 49 | launchMenuIdle = NSTextField; 50 | launchSyncToVBL = NSButton; 51 | launchUseCurrWD = NSButton; 52 | launchUseExtendedDesktop = NSButton; 53 | launchUseMacOSXCoords = NSButton; 54 | mouseAssignWarningIcon = NSImageView; 55 | mouseAssignWarningText = NSTextField; 56 | mouseDetected = NSTextField; 57 | mouseEmulation = NSButton; 58 | mouseMiddleConfigMenu = NSPopUpButton; 59 | mouseRightConfigMenu = NSPopUpButton; 60 | prefsTabView = NSTabView; 61 | spaceAssign = NSButton; 62 | spaceAssignNote = NSTextField; 63 | spaceAssignWarningIcon = NSImageView; 64 | spaceDeviceMenu = NSPopUpButton; 65 | spaceElement = NSTextField; 66 | spaceInputMenu = NSPopUpButton; 67 | spaceInverted = NSButton; 68 | }; 69 | SUPERCLASS = NSWindowController; 70 | } 71 | ); 72 | IBVersion = 1; 73 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 16 329 410 240 0 0 1920 1178 7 | IBFramework Version 8 | 439.0 9 | IBOpenObjects 10 | 11 | 205 12 | 13 | IBSystem Version 14 | 8G32 15 | 16 | 17 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTUI.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTUI.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | GLUT 9 | CFBundleGetInfoString 10 | 3.4.0, Copyright (c) 2001-2008 Apple Inc., All Rights Reserved 11 | CFBundleIdentifier 12 | com.apple.glut 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.4.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | GLUT-3.4.0 23 | 24 | 25 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/blankCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/blankCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomrightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomrightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/crossCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/crossCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/cycleCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/cycleCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/destroyCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/destroyCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/fingerCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/fingerCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/helpCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/helpCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftRightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftRightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightArrowCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightArrowCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/sprayCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/sprayCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/toprightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/toprightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/upDownCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/upDownCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/waitCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/waitCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/GLUT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/GLUT -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/copy.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Written By Linas Vepstas November 1991 5 | */ 6 | 7 | 8 | #define COPY_THREE_WORDS(A,B) { \ 9 | struct three_words { int a, b, c, }; \ 10 | *(struct three_words *) (A) = *(struct three_words *) (B); \ 11 | } 12 | 13 | #define COPY_FOUR_WORDS(A,B) { \ 14 | struct four_words { int a, b, c, d, }; \ 15 | *(struct four_words *) (A) = *(struct four_words *) (B); \ 16 | } 17 | 18 | /* ============================================================= */ 19 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/extrude.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * extrude.h 4 | * 5 | * FUNCTION: 6 | * prototypes for privately used subroutines for the tubing library 7 | * 8 | * HISTORY: 9 | * Linas Vepstas 1991 10 | */ 11 | 12 | #include "port.h" /* for gleDouble */ 13 | 14 | #ifndef M_PI 15 | #define M_PI 3.14159265358979323846 16 | #endif 17 | 18 | /* ============================================================ */ 19 | /* 20 | * Provides choice of calling subroutine, vs. invoking macro. 21 | * Basically, inlines the source, or not. 22 | * Trades performance for executable size. 23 | */ 24 | 25 | #define INLINE_INTERSECT 26 | #ifdef INLINE_INTERSECT 27 | #define INNERSECT(sect,p,n,v1,v2) { INTERSECT(sect,p,n,v1,v2); } 28 | #else 29 | #define INNERSECT(sect,p,n,v1,v2) intersect(sect,p,n,v1,v2) 30 | #endif /* INLINE_INTERSECT */ 31 | 32 | /* ============================================================ */ 33 | /* The folowing defines give a kludgy way of accessing the qmesh primitive */ 34 | 35 | /* 36 | #define bgntmesh _emu_qmesh_bgnqmesh 37 | #define endtmesh _emu_qmesh_endqmesh 38 | #define c3f _emu_qmesh_c3f 39 | #define n3f _emu_qmesh_n3f 40 | #define v3f _emu_qmesh_v3f 41 | */ 42 | 43 | /* ============================================================ */ 44 | 45 | extern void up_sanity_check (gleDouble up[3], /* up vector for contour */ 46 | int npoints, /* numpoints in poly-line */ 47 | gleDouble point_array[][3]); /* polyline */ 48 | 49 | 50 | extern void draw_raw_style_end_cap (int ncp, /* number of contour points */ 51 | gleDouble contour[][2], /* 2D contour */ 52 | gleDouble zval, /* where to draw cap */ 53 | int frontwards); /* front or back cap */ 54 | 55 | extern void draw_round_style_cap_callback (int iloop, 56 | double cap[][3], 57 | float face_color[3], 58 | gleDouble cut_vector[3], 59 | gleDouble bisect_vector[3], 60 | double norms[][3], 61 | int frontwards); 62 | 63 | extern void draw_angle_style_front_cap (int ncp, 64 | gleDouble bi[3], 65 | gleDouble point_array[][3]); 66 | 67 | extern void extrusion_raw_join (int ncp, /* number of contour points */ 68 | gleDouble contour[][2], /* 2D contour */ 69 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 70 | gleDouble up[3], /* up vector for contour */ 71 | int npoints, /* numpoints in poly-line */ 72 | gleDouble point_array[][3], /* polyline */ 73 | float color_array[][3], /* color of polyline */ 74 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 75 | 76 | 77 | extern void extrusion_round_or_cut_join (int ncp, /* number of contour points */ 78 | gleDouble contour[][2], /* 2D contour */ 79 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 80 | gleDouble up[3], /* up vector for contour */ 81 | int npoints, /* numpoints in poly-line */ 82 | gleDouble point_array[][3], /* polyline */ 83 | float color_array[][3], /* color of polyline */ 84 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 85 | 86 | 87 | extern void extrusion_angle_join (int ncp, /* number of contour points */ 88 | gleDouble contour[][2], /* 2D contour */ 89 | gleDouble cont_normal[][2],/* 2D contour normal vecs */ 90 | gleDouble up[3], /* up vector for contour */ 91 | int npoints, /* numpoints in poly-line */ 92 | gleDouble point_array[][3], /* polyline */ 93 | float color_array[][3], /* color of polyline */ 94 | gleDouble xform_array[][2][3]); /* 2D contour xforms */ 95 | 96 | /* -------------------------- end of file -------------------------------- */ 97 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/glsmapint.h: -------------------------------------------------------------------------------- 1 | #ifndef __glsmapint_h__ 2 | #define __glsmapint_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glsmap.h" 11 | 12 | enum { X = 0, Y = 1, Z = 2 }; 13 | 14 | #define INITFACE(mesh) \ 15 | int steps = mesh->steps; \ 16 | int sqsteps = mesh->steps * mesh->steps 17 | 18 | #define FACE(side,y,x) \ 19 | mesh->face[(side)*sqsteps + (y)*steps + (x)] 20 | 21 | #define FACExy(side,i,j) \ 22 | (&FACE(side,i,j).x) 23 | 24 | #define FACEst(side,i,j) \ 25 | (&FACE(side,i,j).s) 26 | 27 | #define INITBACK(mesh) \ 28 | int allrings = mesh->rings + mesh->edgeExtend; \ 29 | int ringedspokes = allrings * mesh->steps 30 | 31 | #define BACK(edge,ring,spoke) \ 32 | mesh->back[(edge)*ringedspokes + (ring)*mesh->steps + (spoke)] 33 | 34 | #define BACKxy(edge,ring,spoke) \ 35 | (&BACK(edge,ring,spoke).x) 36 | 37 | #define BACKst(edge,ring,spoke) \ 38 | (&BACK(edge,ring,spoke).s) 39 | 40 | typedef struct _STXY { 41 | GLfloat s, t; 42 | GLfloat x, y; 43 | } STXY; 44 | 45 | typedef struct _SphereMapMesh { 46 | 47 | int refcnt; 48 | 49 | int steps; 50 | int rings; 51 | int edgeExtend; 52 | 53 | STXY *face; 54 | STXY *back; 55 | 56 | } SphereMapMesh; 57 | 58 | struct _SphereMap { 59 | 60 | /* Shared sphere map mesh vertex data. */ 61 | SphereMapMesh *mesh; 62 | 63 | /* Texture object ids. */ 64 | GLuint smapTexObj; 65 | GLuint viewTexObjs[6]; 66 | GLuint viewTexObj; 67 | 68 | /* Flags */ 69 | SphereMapFlags flags; 70 | 71 | /* Texture dimensions must be a power of two. */ 72 | int viewTexDim; /* view texture dimension */ 73 | int smapTexDim; /* sphere map texture dimension */ 74 | 75 | /* Viewport origins for view and sphere map rendering. */ 76 | int viewOrigin[2]; 77 | int smapOrigin[2]; 78 | 79 | /* Viewing vectors. */ 80 | GLfloat eye[3]; 81 | GLfloat up[3]; 82 | GLfloat obj[3]; 83 | 84 | /* Projection parameters. */ 85 | GLfloat viewNear; 86 | GLfloat viewFar; 87 | 88 | /* Rendering callbacks. */ 89 | void (*positionLights)(int view, void *context); 90 | void (*drawView)(int view, void *context); 91 | 92 | /* Application specified callback data. */ 93 | void *context; 94 | 95 | }; 96 | 97 | /* Library internal routines. */ 98 | extern void __smapDrawSphereMapMeshSide(SphereMapMesh *mesh, int side); 99 | extern void __smapDrawSphereMapMeshBack(SphereMapMesh *mesh); 100 | extern void __smapValidateSphereMapMesh(SphereMapMesh *mesh); 101 | 102 | #endif /* __glsmapint_h__ */ 103 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/glutbitmap.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutbitmap_h__ 2 | #define __glutbitmap_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #include "glut.h" 11 | 12 | typedef struct { 13 | const GLsizei width; 14 | const GLsizei height; 15 | const GLfloat xorig; 16 | const GLfloat yorig; 17 | const GLfloat advance; 18 | const GLubyte *bitmap; 19 | } BitmapCharRec, *BitmapCharPtr; 20 | 21 | typedef struct { 22 | const char *name; 23 | const int num_chars; 24 | const int first; 25 | const BitmapCharRec * const *ch; 26 | } BitmapFontRec, *BitmapFontPtr; 27 | 28 | typedef void *GLUTbitmapFont; 29 | 30 | #endif /* __glutbitmap_h__ */ 31 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/glutf90.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutf90_h__ 2 | #define __glutf90_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | /* This header provides the binding interface for William Mitchell's 11 | f90gl Fortran 90 GLUT binding. Other GLUT language bindings 12 | can and should use this interace. */ 13 | 14 | /* I appreciate the guidance from William Mitchell 15 | (mitchell@cam.nist.gov) in developing this friend interface 16 | for use by the f90gl package. See ../../README.fortran */ 17 | 18 | #include 19 | 20 | #ifndef GLUTCALLBACK 21 | #define GLUTCALLBACK 22 | #endif 23 | #ifndef APIENTRY 24 | #define APIENTRY 25 | #endif 26 | 27 | /* Which callback enumerants for the __glutSetFCB/__glutGetFCB routines. */ 28 | /* NOTE These values are part of a binary interface for the f90gl Fortran 29 | 90 binding and so must NOT changes (additions are allowed). */ 30 | 31 | /* GLUTwindow callbacks. */ 32 | #define GLUT_FCB_DISPLAY 0 /* GLUTdisplayFCB */ 33 | #define GLUT_FCB_RESHAPE 1 /* GLUTreshapeFCB */ 34 | #define GLUT_FCB_MOUSE 2 /* GLUTmouseFCB */ 35 | #define GLUT_FCB_MOTION 3 /* GLUTmotionFCB */ 36 | #define GLUT_FCB_PASSIVE 4 /* GLUTpassiveFCB */ 37 | #define GLUT_FCB_ENTRY 5 /* GLUTentryFCB */ 38 | #define GLUT_FCB_KEYBOARD 6 /* GLUTkeyboardFCB */ 39 | #define GLUT_FCB_KEYBOARD_UP 7 /* GLUTkeyboardFCB */ 40 | #define GLUT_FCB_WINDOW_STATUS 8 /* GLUTwindowStatusFCB */ 41 | #define GLUT_FCB_VISIBILITY 9 /* GLUTvisibilityFCB */ 42 | #define GLUT_FCB_SPECIAL 10 /* GLUTspecialFCB */ 43 | #define GLUT_FCB_SPECIAL_UP 11 /* GLUTspecialFCB */ 44 | #define GLUT_FCB_BUTTON_BOX 12 /* GLUTbuttonBoxFCB */ 45 | #define GLUT_FCB_DIALS 13 /* GLUTdialsFCB */ 46 | #define GLUT_FCB_SPACE_MOTION 14 /* GLUTspaceMotionFCB */ 47 | #define GLUT_FCB_SPACE_ROTATE 15 /* GLUTspaceRotateFCB */ 48 | #define GLUT_FCB_SPACE_BUTTON 16 /* GLUTspaceButtonFCB */ 49 | #define GLUT_FCB_TABLET_MOTION 17 /* GLUTtabletMotionFCB */ 50 | #define GLUT_FCB_TABLET_BUTTON 18 /* GLUTtabletButtonFCB */ 51 | #define GLUT_FCB_JOYSTICK 19 /* GLUTjoystickFCB */ 52 | #define GLUT_FCB_WMCLOSE 20 /* GLUTwmcloseFCB */ 53 | /* Non-GLUTwindow callbacks. */ 54 | #define GLUT_FCB_OVERLAY_DISPLAY 100 /* GLUTdisplayFCB */ 55 | #define GLUT_FCB_SELECT 101 /* GLUTselectFCB */ 56 | #define GLUT_FCB_TIMER 102 /* GLUTtimerFCB */ 57 | 58 | /* GLUT Fortran callback function types. */ 59 | typedef void (GLUTCALLBACK *GLUTdisplayFCB) (void); 60 | typedef void (GLUTCALLBACK *GLUTwmcloseFCB) (void); 61 | typedef void (GLUTCALLBACK *GLUTreshapeFCB) (int *, int *); 62 | /* NOTE the pressed key is int, not unsigned char for Fortran! */ 63 | typedef void (GLUTCALLBACK *GLUTkeyboardFCB) (int *, int *, int *); 64 | typedef void (GLUTCALLBACK *GLUTmouseFCB) (int *, int *, int *, int *); 65 | typedef void (GLUTCALLBACK *GLUTmotionFCB) (int *, int *); 66 | typedef void (GLUTCALLBACK *GLUTpassiveFCB) (int *, int *); 67 | typedef void (GLUTCALLBACK *GLUTentryFCB) (int *); 68 | typedef void (GLUTCALLBACK *GLUTwindowStatusFCB) (int *); 69 | typedef void (GLUTCALLBACK *GLUTvisibilityFCB) (int *); 70 | typedef void (GLUTCALLBACK *GLUTspecialFCB) (int *, int *, int *); 71 | typedef void (GLUTCALLBACK *GLUTbuttonBoxFCB) (int *, int *); 72 | typedef void (GLUTCALLBACK *GLUTdialsFCB) (int *, int *); 73 | typedef void (GLUTCALLBACK *GLUTspaceMotionFCB) (int *, int *, int *); 74 | typedef void (GLUTCALLBACK *GLUTspaceRotateFCB) (int *, int *, int *); 75 | typedef void (GLUTCALLBACK *GLUTspaceButtonFCB) (int *, int *); 76 | typedef void (GLUTCALLBACK *GLUTtabletMotionFCB) (int *, int *); 77 | typedef void (GLUTCALLBACK *GLUTtabletButtonFCB) (int *, int *, int *, int *); 78 | typedef void (GLUTCALLBACK *GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); 79 | 80 | typedef void (GLUTCALLBACK *GLUTselectFCB) (int *); 81 | typedef void (GLUTCALLBACK *GLUTtimerFCB) (int *); 82 | typedef void (GLUTCALLBACK *GLUTmenuStateFCB) (int *); /* DEPRICATED. */ 83 | typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *); 84 | typedef void (GLUTCALLBACK *GLUTidleFCB) (void); 85 | 86 | /* Functions that set and return Fortran callback functions. */ 87 | extern void* APIENTRY __glutGetFCB(int which); 88 | extern void APIENTRY __glutSetFCB(int which, void *func); 89 | 90 | #endif /* __glutf90_h__ */ 91 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/glutstroke.h: -------------------------------------------------------------------------------- 1 | #ifndef __glutstroke_h__ 2 | #define __glutstroke_h__ 3 | 4 | /* Copyright (c) Mark J. Kilgard, 1994. */ 5 | 6 | /* This program is freely distributable without licensing fees 7 | and is provided without guarantee or warrantee expressed or 8 | implied. This program is -not- in the public domain. */ 9 | 10 | #if defined(_WIN32) 11 | #pragma warning (disable:4244) /* disable bogus conversion warnings */ 12 | #pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ 13 | #endif 14 | 15 | typedef struct { 16 | float x; 17 | float y; 18 | } CoordRec, *CoordPtr; 19 | 20 | typedef struct { 21 | int num_coords; 22 | const CoordRec *coord; 23 | } StrokeRec, *StrokePtr; 24 | 25 | typedef struct { 26 | int num_strokes; 27 | const StrokeRec *stroke; 28 | float center; 29 | float right; 30 | } StrokeCharRec, *StrokeCharPtr; 31 | 32 | typedef struct { 33 | const char *name; 34 | int num_chars; 35 | const StrokeCharRec *ch; 36 | float top; 37 | float bottom; 38 | } StrokeFontRec, *StrokeFontPtr; 39 | 40 | typedef void *GLUTstrokeFont; 41 | 42 | #endif /* __glutstroke_h__ */ 43 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/gutil.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * gutil.h 4 | * 5 | * FUNCTION: 6 | * Provide utilities that allow rotation to occur 7 | * around any axis. 8 | * 9 | * HISTORY: 10 | * created by Linas Vepstas 1990 11 | * added single & double precision, June 1991, Linas Vepstas 12 | */ 13 | 14 | #ifndef __GUTIL_H__ 15 | #define __GUTIL_H__ 16 | 17 | #ifdef __GUTIL_DOUBLE 18 | #define gutDouble double 19 | #else 20 | #define gutDouble float 21 | #endif 22 | 23 | 24 | #ifdef _NO_PROTO /* NO ANSI C PROTOTYPING */ 25 | 26 | /* Rotation Utilities */ 27 | extern void rot_axis_f (); 28 | extern void rot_about_axis_f (); 29 | extern void rot_omega_f (); 30 | extern void urot_axis_f (); 31 | extern void urot_about_axis_f (); 32 | extern void urot_omega_f (); 33 | 34 | /* double-precision versions */ 35 | extern void rot_axis_d (); 36 | extern void rot_about_axis_d (); 37 | extern void rot_omega_d (); 38 | extern void urot_axis_d (); 39 | extern void urot_about_axis_d (); 40 | extern void urot_omega_d (); 41 | 42 | /* viewpoint functions */ 43 | extern void uview_direction_d (); 44 | extern void uview_direction_f (); 45 | extern void uviewpoint_d (); 46 | extern void uviewpoint_f (); 47 | 48 | #else /* _NO_PROTO */ /* ANSI C PROTOTYPING */ 49 | 50 | /* Rotation Utilities */ 51 | extern void rot_axis_f (float omega, float axis[3]); 52 | extern void rot_about_axis_f (float angle, float axis[3]); 53 | extern void rot_omega_f (float axis[3]); 54 | extern void urot_axis_f (float m[4][4], float omega, float axis[3]); 55 | extern void urot_about_axis_f (float m[4][4], float angle, float axis[3]); 56 | extern void urot_omega_f (float m[4][4], float axis[3]); 57 | 58 | /* double-precision versions */ 59 | extern void rot_axis_d (double omega, double axis[3]); 60 | extern void rot_about_axis_d (double angle, double axis[3]); 61 | extern void rot_omega_d (double axis[3]); 62 | extern void urot_axis_d (double m[4][4], double omega, double axis[3]); 63 | extern void urot_about_axis_d (double m[4][4], double angle, double axis[3]); 64 | extern void urot_omega_d (double m[4][4], double axis[3]); 65 | 66 | /* viewpoint functions */ 67 | extern void uview_direction_d (double m[4][4], /* returned */ 68 | double v21[3], /* input */ 69 | double up[3]); /* input */ 70 | 71 | extern void uview_direction_f (float m[4][4], /* returned */ 72 | float v21[3], /* input */ 73 | float up[3]); /* input */ 74 | 75 | extern void uviewpoint_d (double m[4][4], /* returned */ 76 | double v1[3], /* input */ 77 | double v2[3], /* input */ 78 | double up[3]); /* input */ 79 | 80 | extern void uviewpoint_f (float m[4][4], /* returned */ 81 | float v1[3], /* input */ 82 | float v2[3], /* input */ 83 | float up[3]); /* input */ 84 | 85 | #endif /* _NO_PROTO */ 86 | 87 | #endif /* _GUTIL_H__ */ 88 | 89 | /* ------------------- end of file ---------------------- */ 90 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/rot.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * rot.h 4 | * 5 | * FUNCTION: 6 | * rotation matrix utilities 7 | * 8 | * HISTORY: 9 | * Linas Vepstas Aug 1990 10 | */ 11 | 12 | /* ========================================================== */ 13 | /* 14 | * The MACROS below generate and return more traditional rotation 15 | * matrices -- matrices for rotations about principal axes. 16 | */ 17 | /* ========================================================== */ 18 | 19 | #define ROTX_CS(m,cosine,sine) \ 20 | { \ 21 | /* rotation about the x-axis */ \ 22 | \ 23 | m[0][0] = 1.0; \ 24 | m[0][1] = 0.0; \ 25 | m[0][2] = 0.0; \ 26 | m[0][3] = 0.0; \ 27 | \ 28 | m[1][0] = 0.0; \ 29 | m[1][1] = (cosine); \ 30 | m[1][2] = (sine); \ 31 | m[1][3] = 0.0; \ 32 | \ 33 | m[2][0] = 0.0; \ 34 | m[2][1] = -(sine); \ 35 | m[2][2] = (cosine); \ 36 | m[2][3] = 0.0; \ 37 | \ 38 | m[3][0] = 0.0; \ 39 | m[3][1] = 0.0; \ 40 | m[3][2] = 0.0; \ 41 | m[3][3] = 1.0; \ 42 | } 43 | 44 | /* ========================================================== */ 45 | 46 | #define ROTY_CS(m,cosine,sine) \ 47 | { \ 48 | /* rotation about the y-axis */ \ 49 | \ 50 | m[0][0] = (cosine); \ 51 | m[0][1] = 0.0; \ 52 | m[0][2] = -(sine); \ 53 | m[0][3] = 0.0; \ 54 | \ 55 | m[1][0] = 0.0; \ 56 | m[1][1] = 1.0; \ 57 | m[1][2] = 0.0; \ 58 | m[1][3] = 0.0; \ 59 | \ 60 | m[2][0] = (sine); \ 61 | m[2][1] = 0.0; \ 62 | m[2][2] = (cosine); \ 63 | m[2][3] = 0.0; \ 64 | \ 65 | m[3][0] = 0.0; \ 66 | m[3][1] = 0.0; \ 67 | m[3][2] = 0.0; \ 68 | m[3][3] = 1.0; \ 69 | } 70 | 71 | /* ========================================================== */ 72 | 73 | #define ROTZ_CS(m,cosine,sine) \ 74 | { \ 75 | /* rotation about the z-axis */ \ 76 | \ 77 | m[0][0] = (cosine); \ 78 | m[0][1] = (sine); \ 79 | m[0][2] = 0.0; \ 80 | m[0][3] = 0.0; \ 81 | \ 82 | m[1][0] = -(sine); \ 83 | m[1][1] = (cosine); \ 84 | m[1][2] = 0.0; \ 85 | m[1][3] = 0.0; \ 86 | \ 87 | m[2][0] = 0.0; \ 88 | m[2][1] = 0.0; \ 89 | m[2][2] = 1.0; \ 90 | m[2][3] = 0.0; \ 91 | \ 92 | m[3][0] = 0.0; \ 93 | m[3][1] = 0.0; \ 94 | m[3][2] = 0.0; \ 95 | m[3][3] = 1.0; \ 96 | } 97 | 98 | /* ========================================================== */ 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/segment.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * MODULE: segment.h 4 | * 5 | * FUNCTION: 6 | * Contains function prototypes for segment drawing subroutines. 7 | * These are used only internally, and are not to be exported to 8 | * the user. 9 | * 10 | * HISTORY: 11 | * Create by Linas Vepstas 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | /* ============================================================ */ 16 | 17 | #include "tube.h" 18 | 19 | extern void draw_segment_plain (int ncp, /* number of contour points */ 20 | gleDouble front_contour[][3], 21 | gleDouble back_contour[][3], 22 | int inext, double len); 23 | 24 | extern void draw_segment_color (int ncp, /* number of contour points */ 25 | gleDouble front_contour[][3], 26 | gleDouble back_contour[][3], 27 | float color_last[3], 28 | float color_next[3], 29 | int inext, double len); 30 | 31 | extern void draw_segment_edge_n (int ncp, /* number of contour points */ 32 | gleDouble front_contour[][3], 33 | gleDouble back_contour[][3], 34 | double norm_cont[][3], 35 | int inext, double len); 36 | 37 | extern void draw_segment_c_and_edge_n (int ncp, 38 | gleDouble front_contour[][3], 39 | gleDouble back_contour[][3], 40 | double norm_cont[][3], 41 | float color_last[3], 42 | float color_next[3], 43 | int inext, double len); 44 | 45 | extern void draw_segment_facet_n (int ncp, 46 | gleDouble front_contour[][3], 47 | gleDouble back_contour[][3], 48 | double norm_cont[][3], 49 | int inext, double len); 50 | 51 | extern void draw_segment_c_and_facet_n (int ncp, 52 | gleDouble front_contour[][3], 53 | gleDouble back_contour[][3], 54 | double norm_cont[][3], 55 | float color_last[3], 56 | float color_next[3], 57 | int inext, double len); 58 | 59 | /* ============================================================ */ 60 | 61 | extern void draw_binorm_segment_edge_n (int ncp, 62 | double front_contour[][3], 63 | double back_contour[][3], 64 | double front_norm[][3], 65 | double back_norm[][3], 66 | int inext, double len); 67 | 68 | extern void draw_binorm_segment_c_and_edge_n (int ncp, 69 | double front_contour[][3], 70 | double back_contour[][3], 71 | double front_norm[][3], 72 | double back_norm[][3], 73 | float color_last[3], 74 | float color_next[3], 75 | int inext, double len); 76 | 77 | extern void draw_binorm_segment_facet_n (int ncp, 78 | double front_contour[][3], 79 | double back_contour[][3], 80 | double front_norm[][3], 81 | double back_norm[][3], 82 | int inext, double len); 83 | 84 | extern void draw_binorm_segment_c_and_facet_n (int ncp, 85 | double front_contour[][3], 86 | double back_contour[][3], 87 | double front_norm[][3], 88 | double back_norm[][3], 89 | float color_last[3], 90 | float color_next[3], 91 | int inext, double len); 92 | 93 | extern void draw_angle_style_back_cap (int ncp, /* number of contour points */ 94 | gleDouble bi[3], /* biscetor */ 95 | gleDouble point_array[][3]); /* polyline */ 96 | 97 | /* -------------------------- end of file -------------------------------- */ 98 | 99 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Headers/tube_gc.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * tube_gc.h 4 | * 5 | * FUNCTION: 6 | * This file allows for easy changes to changes in the way the extrusion 7 | * library handles state info (i.e. context). 8 | * 9 | * HISTORY: 10 | * Linas Vepstas --- February 1993 11 | * Added auto texture coord generation hacks, Linas April 1994 12 | * Added tube.h include to define gleDouble, tad February 2002 13 | */ 14 | 15 | #include "tube.h" 16 | #include "port.h" /* for gleVector */ 17 | 18 | typedef float gleColor[3]; 19 | typedef double gleTwoVec[2]; 20 | 21 | typedef struct { 22 | 23 | /* public methods */ 24 | void (*bgn_gen_texture) (int, double); 25 | void (*n3f_gen_texture) (float *); 26 | void (*n3d_gen_texture) (double *); 27 | void (*v3f_gen_texture) (float *, int, int); 28 | void (*v3d_gen_texture) (double *, int, int); 29 | void (*end_gen_texture) (void); 30 | 31 | /* protected members -- "general knowledge" stuff */ 32 | int join_style; 33 | 34 | /* arguments passed into extrusion code */ 35 | int ncp; /* number of contour points */ 36 | gleTwoVec *contour; /* 2D contour */ 37 | gleTwoVec *cont_normal; /* 2D contour normals */ 38 | gleDouble *up; /* up vector */ 39 | int npoints; /* number of points in polyline */ 40 | gleVector *point_array; /* path */ 41 | gleColor *color_array; /* path colors */ 42 | gleAffine *xform_array; /* contour xforms */ 43 | 44 | /* private members, used by texturing code */ 45 | int num_vert; 46 | int segment_number; 47 | double segment_length; 48 | double accum_seg_len; 49 | double prev_x; 50 | double prev_y; 51 | 52 | void (*save_bgn_gen_texture) (int, double); 53 | void (*save_n3f_gen_texture) (float *); 54 | void (*save_n3d_gen_texture) (double *); 55 | void (*save_v3f_gen_texture) (float *, int, int); 56 | void (*save_v3d_gen_texture) (double *, int, int); 57 | void (*save_end_gen_texture) (void); 58 | 59 | } gleGC; 60 | 61 | extern gleGC *_gle_gc; 62 | extern gleGC * gleCreateGC (void); 63 | 64 | #define INIT_GC() {if (!_gle_gc) _gle_gc = gleCreateGC(); } 65 | #define extrusion_join_style (_gle_gc->join_style) 66 | 67 | #define __TUBE_CLOSE_CONTOUR (extrusion_join_style & TUBE_CONTOUR_CLOSED) 68 | #define __TUBE_DRAW_CAP (extrusion_join_style & TUBE_JN_CAP) 69 | #define __TUBE_DRAW_FACET_NORMALS (extrusion_join_style & TUBE_NORM_FACET) 70 | #define __TUBE_DRAW_PATH_EDGE_NORMALS (extrusion_join_style & TUBE_NORM_PATH_EDGE) 71 | 72 | #define __TUBE_STYLE (extrusion_join_style & TUBE_JN_MASK) 73 | #define __TUBE_RAW_JOIN (extrusion_join_style & TUBE_JN_RAW) 74 | #define __TUBE_CUT_JOIN (extrusion_join_style & TUBE_JN_CUT) 75 | #define __TUBE_ANGLE_JOIN (extrusion_join_style & TUBE_JN_ANGLE) 76 | #define __TUBE_ROUND_JOIN (extrusion_join_style & TUBE_JN_ROUND) 77 | 78 | /* ======================= END OF FILE ========================== */ 79 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/Caution.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/Caution.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUT.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = {timerAction = id; }; 11 | CLASS = GLUTApplication; 12 | LANGUAGE = ObjC; 13 | OUTLETS = { 14 | "_aboutMenuItem" = NSMenuItem; 15 | "_hideMenuItem" = NSMenuItem; 16 | "_quitMenuItem" = NSMenuItem; 17 | }; 18 | SUPERCLASS = NSApplication; 19 | }, 20 | { 21 | ACTIONS = {toggleWindow = id; }; 22 | CLASS = GLUTClipboardController; 23 | LANGUAGE = ObjC; 24 | OUTLETS = {"_infoText" = id; "_scrollView" = id; }; 25 | SUPERCLASS = NSWindowController; 26 | }, 27 | { 28 | ACTIONS = { 29 | assign = id; 30 | cancel = id; 31 | inputMenu = id; 32 | invertInput = id; 33 | mouseMatrix = id; 34 | mousePreset = id; 35 | ok = id; 36 | setDefault = id; 37 | }; 38 | CLASS = GLUTPreferencesController; 39 | LANGUAGE = ObjC; 40 | OUTLETS = { 41 | assignPrompt = NSTextField; 42 | assignText = NSTextField; 43 | inputMenu = NSPopUpButton; 44 | inverted = NSButton; 45 | mbConfigMenu = NSPopUpButton; 46 | mbConfigWarningIcon = NSImageView; 47 | mbConfigWarningText = NSTextField; 48 | middleButtonMatrix = NSMatrix; 49 | rightButtonMatrix = NSMatrix; 50 | }; 51 | SUPERCLASS = NSWindowController; 52 | } 53 | ); 54 | IBVersion = 1; 55 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUT.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 4 104 410 240 0 0 1152 848 7 | IBEditorPositions 8 | 9 | 29 10 | 19 615 246 44 0 0 1152 848 11 | 12 | IBFramework Version 13 | 291.0 14 | IBGroupedObjects 15 | 16 | IBLastGroupID 17 | 1 18 | IBOpenObjects 19 | 20 | 29 21 | 22 | IBSystem Version 23 | 6I32 24 | 25 | 26 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUT.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUT.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTClipboard.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 4 | { 5 | ACTIONS = {toggleWindow = id; }; 6 | CLASS = GLUTClipboardController; 7 | LANGUAGE = ObjC; 8 | OUTLETS = {_infoText = id; _scrollView = id; }; 9 | SUPERCLASS = NSWindowController; 10 | } 11 | ); 12 | IBVersion = 1; 13 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTClipboard.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 63 221 356 240 0 0 1600 1178 7 | IBFramework Version 8 | 263.2 9 | IBSystem Version 10 | 5S41 11 | 12 | 13 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTClipboard.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTClipboard.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTPreferences.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | { 4 | ACTIONS = {save = id; saveAs = id; }; 5 | CLASS = FirstResponder; 6 | LANGUAGE = ObjC; 7 | SUPERCLASS = NSObject; 8 | }, 9 | { 10 | ACTIONS = { 11 | cancel = id; 12 | joyAssign = id; 13 | joyDevice = id; 14 | joyElement = id; 15 | joyInvert = id; 16 | launchDebugMode = id; 17 | launchGamemodeCaptureSingle = id; 18 | launchIconic = id; 19 | launchUseCurrWD = id; 20 | launchUseExtDesktop = id; 21 | launchUseMacOSCoords = id; 22 | mouseEanbleEmulation = id; 23 | mouseMiddleMenu = id; 24 | mouseRightMenu = id; 25 | ok = id; 26 | spaceAssign = id; 27 | spaceDevice = id; 28 | spaceElement = id; 29 | spaceInvert = id; 30 | }; 31 | CLASS = GLUTPreferencesController; 32 | LANGUAGE = ObjC; 33 | OUTLETS = { 34 | joyAssign = NSButton; 35 | joyAssignNote = NSTextField; 36 | joyAssignWarningIcon = NSImageView; 37 | joyDeviceMenu = NSPopUpButton; 38 | joyElement = NSTextField; 39 | joyInputMenu = NSPopUpButton; 40 | joyInverted = NSButton; 41 | launchDebugMode = NSButton; 42 | launchFadeTime = NSTextField; 43 | launchGamemodeCaptureSingle = NSButton; 44 | launchIconic = NSButton; 45 | launchInitHeight = NSTextField; 46 | launchInitWidth = NSTextField; 47 | launchInitX = NSTextField; 48 | launchInitY = NSTextField; 49 | launchMenuIdle = NSTextField; 50 | launchSyncToVBL = NSButton; 51 | launchUseCurrWD = NSButton; 52 | launchUseExtendedDesktop = NSButton; 53 | launchUseMacOSXCoords = NSButton; 54 | mouseAssignWarningIcon = NSImageView; 55 | mouseAssignWarningText = NSTextField; 56 | mouseDetected = NSTextField; 57 | mouseEmulation = NSButton; 58 | mouseMiddleConfigMenu = NSPopUpButton; 59 | mouseRightConfigMenu = NSPopUpButton; 60 | prefsTabView = NSTabView; 61 | spaceAssign = NSButton; 62 | spaceAssignNote = NSTextField; 63 | spaceAssignWarningIcon = NSImageView; 64 | spaceDeviceMenu = NSPopUpButton; 65 | spaceElement = NSTextField; 66 | spaceInputMenu = NSPopUpButton; 67 | spaceInverted = NSButton; 68 | }; 69 | SUPERCLASS = NSWindowController; 70 | } 71 | ); 72 | IBVersion = 1; 73 | } -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTPreferences.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 16 329 410 240 0 0 1920 1178 7 | IBFramework Version 8 | 439.0 9 | IBOpenObjects 10 | 11 | 205 12 | 13 | IBSystem Version 14 | 8G32 15 | 16 | 17 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTPreferences.nib/objects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTPreferences.nib/objects.nib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTUI.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/GLUTUI.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | GLUT 9 | CFBundleGetInfoString 10 | 3.4.0, Copyright (c) 2001-2008 Apple Inc., All Rights Reserved 11 | CFBundleIdentifier 12 | com.apple.glut 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.4.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | GLUT-3.4.0 23 | 24 | 25 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/blankCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/blankCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomrightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/bottomrightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/crossCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/crossCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/cycleCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/cycleCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/destroyCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/destroyCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/fingerCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/fingerCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/helpCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/helpCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/leftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/leftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/leftRightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/leftRightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/rightArrowCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/rightArrowCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/rightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/rightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/sprayCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/sprayCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/topCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/topCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/topleftCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/topleftCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/toprightCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/toprightCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/upDownCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/upDownCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/waitCursor.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Frameworks/GLUT.framework/Versions/Current/Resources/waitCursor.tiff -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 13F34 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | ofApp 11 | CFBundleIconFile 12 | icon.icns 13 | CFBundleIdentifier 14 | cc.openFrameworks.ofapp 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | DTCompiler 24 | com.apple.compilers.llvm.clang.1_0 25 | DTPlatformBuild 26 | 5B1008 27 | DTPlatformVersion 28 | GM 29 | DTSDKBuild 30 | 13C64 31 | DTSDKName 32 | macosx10.9 33 | DTXcode 34 | 0511 35 | DTXcodeBuild 36 | 5B1008 37 | 38 | 39 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/MacOS/libfmodex.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/MacOS/libfmodex.dylib -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/MacOS/ofApp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/MacOS/ofApp -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /example-ofxSketchFilter/bin/ofApp.app/Contents/Resources/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/bin/ofApp.app/Contents/Resources/icon.icns -------------------------------------------------------------------------------- /example-ofxSketchFilter/ofApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/ofApp.xcodeproj/project.xcworkspace/xcuserdata/tatsuya_yokoda.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/example-ofxSketchFilter/ofApp.xcodeproj/project.xcworkspace/xcuserdata/tatsuya_yokoda.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /example-ofxSketchFilter/ofApp.xcodeproj/xcshareddata/xcschemes/ofApp Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/ofApp.xcodeproj/xcshareddata/xcschemes/ofApp Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/ofApp.xcodeproj/xcuserdata/tatsuya_yokoda.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SuppressBuildableAutocreation 6 | 7 | E4B69B5A0A3A1756003C02F2 8 | 9 | primary 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.ofapp 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(320 * 4, 240 * 4, OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-ofxSketchFilter/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #include "ofxSketchFilter.h" 6 | 7 | class ofApp : public ofBaseApp { 8 | public: 9 | int videoWidth; 10 | int videoHeight; 11 | ofVideoGrabber videoGrabber; 12 | 13 | ofxSketchFilter sketchFilter; 14 | 15 | public: 16 | void setup(); 17 | void update(); 18 | void draw(); 19 | 20 | void updateSource(); 21 | 22 | void keyPressed(int key); 23 | void keyReleased(int key); 24 | void mouseMoved(int x, int y ); 25 | void mouseDragged(int x, int y, int button); 26 | void mousePressed(int x, int y, int button); 27 | void mouseReleased(int x, int y, int button); 28 | void windowResized(int w, int h); 29 | void dragEvent(ofDragInfo dragInfo); 30 | void gotMessage(ofMessage msg); 31 | 32 | protected: 33 | 34 | private: 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/img1.png -------------------------------------------------------------------------------- /img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/img2.png -------------------------------------------------------------------------------- /img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/img3.png -------------------------------------------------------------------------------- /img4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/img4.png -------------------------------------------------------------------------------- /img5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/img5.png -------------------------------------------------------------------------------- /ofxaddons_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/ofxaddons_thumbnail.png -------------------------------------------------------------------------------- /src/filters/BilateralFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "BilateralFilter.h" 2 | 3 | namespace ns_ofxSketchFilter { 4 | 5 | //-------------------------------------------------------------- 6 | // 7 | BilateralFilter::BilateralFilter() { 8 | 9 | } 10 | //-------------------------------------------------------------- 11 | // 12 | BilateralFilter::~BilateralFilter() { } 13 | 14 | //-------------------------------------------------------------- 15 | // SETUP / UPDATE / DRAW 16 | //-------------------------------------------------------------- 17 | 18 | //-------------------------------------------------------------- 19 | // 20 | void BilateralFilter::setup( 21 | float w, 22 | float h, 23 | int internalFormat, 24 | float blurOffset, 25 | float normalization 26 | ) { 27 | _width = w; 28 | _height = h; 29 | _internalFormat = internalFormat; 30 | _texelSpacing = ofVec2f(blurOffset, blurOffset); 31 | _normalization = normalization; 32 | 33 | _setupFbo(); 34 | 35 | _shader.load("shaders/bilateral/bilateral"); 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | // PUBLIC METHOD 40 | //-------------------------------------------------------------- 41 | 42 | //-------------------------------------------------------------- 43 | // 44 | void BilateralFilter::ping() { 45 | _pingFbo.begin(); 46 | ofClear(0, 0, 0, 0); 47 | } 48 | 49 | //-------------------------------------------------------------- 50 | // 51 | void BilateralFilter::pong() { 52 | _pingFbo.end(); 53 | 54 | _pongFbo.begin(); 55 | ofClear(0, 0, 0, 0); 56 | _pingFbo.draw(0, 0); 57 | _pongFbo.end(); 58 | } 59 | 60 | //-------------------------------------------------------------- 61 | // 62 | void BilateralFilter::begin() { 63 | _shader.begin(); 64 | _shader.setUniform1f("texelWidthOffset", _texelSpacing.x / _width); 65 | _shader.setUniform1f("texelHeightOffset", 0.0); 66 | _shader.setUniform1f("distanceNormalizationFactor", _normalization); 67 | 68 | ping(); 69 | } 70 | 71 | //-------------------------------------------------------------- 72 | // 73 | void BilateralFilter::end() { 74 | _shader.setUniform1f("texelWidthOffset", 0.0); 75 | _shader.setUniform1f("texelHeightOffset", _texelSpacing.y / _height); 76 | _shader.setUniform1f("distanceNormalizationFactor", _normalization); 77 | 78 | pong(); 79 | 80 | _shader.end(); 81 | } 82 | 83 | //-------------------------------------------------------------- 84 | // 85 | void BilateralFilter::draw() { 86 | _pongFbo.getTextureReference().draw(0, 0); 87 | } 88 | 89 | 90 | //-------------------------------------------------------------- 91 | // 92 | void BilateralFilter::resize(int w, int h) { 93 | _width = w; 94 | _height = h; 95 | 96 | _setupFbo(); 97 | } 98 | 99 | //-------------------------------------------------------------- 100 | // PROTECTED / PRIVATE 101 | //-------------------------------------------------------------- 102 | 103 | //-------------------------------------------------------------- 104 | // 105 | void BilateralFilter::_setupFbo() { 106 | _pingFbo.allocate(_width, _height, _internalFormat); 107 | _pingFbo.begin(); 108 | ofClear(0, 0, 0, 0); 109 | _pingFbo.end(); 110 | 111 | _pongFbo.allocate(_width, _height, _internalFormat); 112 | _pongFbo.begin(); 113 | ofClear(0, 0, 0, 0); 114 | _pongFbo.end(); 115 | } 116 | 117 | } 118 | 119 | -------------------------------------------------------------------------------- /src/filters/BilateralFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ns_ofxSketchFilter { 6 | 7 | class BilateralFilter { 8 | public: 9 | 10 | protected: 11 | 12 | private: 13 | float _width; 14 | float _height; 15 | ofVec2f _texelSpacing; 16 | float _normalization; 17 | int _internalFormat; 18 | 19 | ofShader _shader; 20 | 21 | ofFbo _pingFbo; 22 | ofFbo _pongFbo; 23 | 24 | public: 25 | BilateralFilter(); 26 | ~BilateralFilter(); 27 | 28 | void setup( 29 | float width, 30 | float height, 31 | int internalFormat = GL_RGBA, 32 | float blurOffset = 4.0, 33 | float normalization = 6.0 34 | ); 35 | 36 | void ping(); 37 | void pong(); 38 | 39 | void begin(); 40 | void end(); 41 | void draw(); 42 | 43 | void resize(int w, int h); 44 | 45 | inline float width() { return _width; } 46 | inline void width(float width) { 47 | _width = width; 48 | _setupFbo(); 49 | } 50 | 51 | inline float height() { return _height; } 52 | inline void height(float height) { 53 | _height = height; 54 | _setupFbo(); 55 | } 56 | 57 | inline float normalization() { return _normalization; } 58 | inline void normalization(float value) { _normalization = value; } 59 | 60 | inline float blurOffset() { return _texelSpacing.x; } 61 | inline void blurOffset(float blurOffset) { _texelSpacing = ofVec2f(blurOffset, blurOffset); } 62 | 63 | inline ofShader& shader() { return _shader; } 64 | 65 | inline ofFbo& pingFbo() { return _pingFbo; } 66 | inline ofFbo& pongFbo() { return _pongFbo; } 67 | 68 | virtual ofTexture& getTextureReference() { return _pongFbo.getTextureReference(); } 69 | 70 | protected: 71 | 72 | private: 73 | void _setupFbo(); 74 | 75 | }; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/filters/BinarizationFilter.cpp: -------------------------------------------------------------------------------- 1 | #include "BinarizationFilter.h" 2 | 3 | namespace ns_ofxSketchFilter { 4 | 5 | //============================================================== 6 | // CONSTRUCTOR / DESTRUCTOR 7 | //============================================================== 8 | 9 | //-------------------------------------------------------------- 10 | // 11 | BinarizationFilter::BinarizationFilter() { 12 | cout << "[BinarizationFilter]BinarizationFilter()" << endl; 13 | 14 | _threshold = 0.85; 15 | } 16 | 17 | //-------------------------------------------------------------- 18 | // 19 | BinarizationFilter::~BinarizationFilter() { 20 | cout << "[BinarizationFilter]~BinarizationFilter()" << endl; 21 | 22 | _threshold = 0; 23 | } 24 | 25 | //============================================================== 26 | // SETUP / UPDATE / DRAW 27 | //============================================================== 28 | 29 | //-------------------------------------------------------------- 30 | // 31 | void BinarizationFilter::setup(int width, int height, int internalformat) { 32 | // cout << "[BinarizationFilter]_setup()" << endl; 33 | 34 | //-------------------------------------- 35 | //シェーダー 36 | _shader.load( 37 | "shaders/binarization/binarization.vert", 38 | "shaders/binarization/binarization.frag" 39 | ); 40 | //-------------------------------------- 41 | 42 | threshold(_threshold); 43 | 44 | _allocate(width, height, internalformat); 45 | } 46 | 47 | //-------------------------------------------------------------- 48 | // 49 | void BinarizationFilter::draw() { 50 | // cout << "[BinarizationFilter]draw()" << endl; 51 | 52 | _destination.draw(0, 0); 53 | } 54 | 55 | //============================================================== 56 | // PUBLIC MEHTOD 57 | //============================================================== 58 | 59 | //-------------------------------------------------------------- 60 | // 61 | void BinarizationFilter::begin() { 62 | // cout << "[GaussianBlur]begin()" << endl; 63 | 64 | //---------------------------------- 65 | _destination.begin(); 66 | glClearColor(0, 0, 0, 0); 67 | glClear(GL_COLOR_BUFFER_BIT); 68 | 69 | _shader.begin(); 70 | } 71 | //-------------------------------------------------------------- 72 | // 73 | void BinarizationFilter::end() { 74 | // cout << "[GaussianBlur]end()" << endl; 75 | 76 | _shader.end(); 77 | 78 | _destination.end(); 79 | //---------------------------------- 80 | } 81 | 82 | //-------------------------------------------------------------- 83 | // 84 | void BinarizationFilter::_allocate(int width, int height, int internalformat) { 85 | _bufferWidth = width; 86 | _bufferHeight = height; 87 | 88 | //---------------------------------- 89 | ofFbo::Settings settings; 90 | settings.width = _bufferWidth; 91 | settings.height = _bufferHeight; 92 | settings.internalformat = internalformat; 93 | // settings.internalformat = GL_RGBA; 94 | // settings.internalformat = GL_RGBA16; 95 | // settings.internalformat = GL_RGB; 96 | // settings.numSamples = 0; 97 | // settings.useDepth = true; 98 | // settings.useStencil = true; 99 | // settings.depthStencilAsTexture = true; 100 | // settings.textureTarget = ofGetUsingArbTex() ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D; 101 | // settings.textureTarget = GL_TEXTURE_RECTANGLE_ARB; 102 | //---------------------------------- 103 | 104 | _destination.allocate(settings); 105 | _destination.begin(); 106 | glClearColor(0, 0, 0, 0); 107 | glClear(GL_COLOR_BUFFER_BIT); 108 | _destination.end(); 109 | } 110 | 111 | //-------------------------------------------------------------- 112 | // 113 | void BinarizationFilter::resize(int width, int height, int internalformat) { 114 | _allocate(width, height, internalformat); 115 | } 116 | 117 | //============================================================== 118 | // SETTER / GETTER 119 | //============================================================== 120 | 121 | //-------------------------------------------------------------- 122 | // 123 | const float BinarizationFilter::threshold() { return _threshold; } 124 | void BinarizationFilter::threshold(float value) { 125 | _threshold = value; 126 | if(_threshold <= 0.0) _threshold = 0.0; 127 | if(_threshold >= 1.0) _threshold = 1.0; 128 | 129 | //-------------------------------------- 130 | _shader.begin(); 131 | _shader.setUniform1f("u_threshold", _threshold); 132 | _shader.end(); 133 | //-------------------------------------- 134 | } 135 | 136 | //============================================================== 137 | // PROTECTED / PRIVATE METHOD 138 | //============================================================== 139 | 140 | } -------------------------------------------------------------------------------- /src/filters/BinarizationFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ns_ofxSketchFilter { 6 | 7 | class BinarizationFilter { 8 | public: 9 | 10 | protected: 11 | 12 | private: 13 | int _bufferWidth; 14 | int _bufferHeight; 15 | 16 | ofShader _shader; 17 | ofFbo _destination; 18 | 19 | float _threshold; 20 | 21 | public: 22 | BinarizationFilter(); 23 | ~BinarizationFilter(); 24 | 25 | void setup(int width, int height, int internalformat = GL_RGBA); 26 | void draw(); 27 | 28 | void begin(); 29 | void end(); 30 | 31 | void resize(int width, int height, int internalformat = GL_RGBA); 32 | 33 | inline ofFbo& result() { return _destination; } 34 | 35 | //-------------------------------------- 36 | const float threshold(); 37 | void threshold(float value); 38 | //-------------------------------------- 39 | 40 | protected: 41 | 42 | private: 43 | void _allocate(int width, int height, int internalformat = GL_RGBA); 44 | }; 45 | 46 | } -------------------------------------------------------------------------------- /src/filters/GaussianBlurFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ns_ofxSketchFilter { 6 | 7 | class GaussianBlurFilter { 8 | public: 9 | 10 | protected: 11 | 12 | private: 13 | int _bufferWidth; 14 | int _bufferHeight; 15 | 16 | ofShader _shader1; 17 | ofShader _shader2; 18 | 19 | ofFbo _destination1; 20 | ofFbo _destination2; 21 | 22 | float _sigma; 23 | float _horizontalBlurSize; 24 | float _verticalBlurSize; 25 | 26 | public: 27 | GaussianBlurFilter(); 28 | ~GaussianBlurFilter(); 29 | 30 | void setup(int width, int height, int internalformat = GL_RGBA); 31 | void draw(); 32 | 33 | void begin(); 34 | void end(); 35 | 36 | void resize(int width, int height, int internalformat = GL_RGBA); 37 | 38 | inline ofFbo& result() { return _destination2; } 39 | 40 | //-------------------------------------- 41 | const float sigma(); 42 | void sigma(float value); 43 | 44 | const float horizontalBlurSize(); 45 | void horizontalBlurSize(float value); 46 | 47 | const float verticalBlurSize(); 48 | void verticalBlurSize(float value); 49 | //-------------------------------------- 50 | 51 | protected: 52 | 53 | private: 54 | void _allocate(int width, int height, int internalformat = GL_RGBA); 55 | 56 | }; 57 | 58 | } -------------------------------------------------------------------------------- /src/filters/GlayScaleFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ns_ofxSketchFilter { 6 | 7 | class GlayScaleFilter { 8 | public: 9 | 10 | protected: 11 | 12 | private: 13 | int _bufferWidth; 14 | int _bufferHeight; 15 | 16 | ofShader _shader; 17 | ofFbo _destination; 18 | 19 | float _intensity; 20 | float _redCoefficient; 21 | float _greenCoefficient; 22 | float _blueCoefficient; 23 | float _alphaCoefficient; 24 | 25 | public: 26 | GlayScaleFilter(); 27 | ~GlayScaleFilter(); 28 | 29 | void setup(int width, int height, int internalformat = GL_RGBA); 30 | void draw(); 31 | 32 | void begin(); 33 | void end(); 34 | 35 | void resize(int width, int height, int internalformat = GL_RGBA); 36 | 37 | inline ofFbo result() { return _destination; } 38 | 39 | //---------------------------------- 40 | const float intensity(); 41 | void intensity(float value); 42 | 43 | const float redCoefficient(); 44 | void redCoefficient(float value); 45 | 46 | const float greenCoefficient(); 47 | void greenCoefficient(float value); 48 | 49 | const float blueCoefficient(); 50 | void blueCoefficient(float value); 51 | 52 | const float alphaCoefficient(); 53 | void alphaCoefficient(float value); 54 | //---------------------------------- 55 | 56 | protected: 57 | 58 | private: 59 | void _allocate(int width, int height, int internalformat = GL_RGBA); 60 | 61 | }; 62 | 63 | } -------------------------------------------------------------------------------- /src/ofxSketchFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BilateralFilter.h" 4 | #include "GlayScaleFilter.h" 5 | #include "GaussianBlurFilter.h" 6 | #include "BinarizationFilter.h" 7 | 8 | typedef ns_ofxSketchFilter::BilateralFilter BilateralFilter; 9 | typedef ns_ofxSketchFilter::GlayScaleFilter GlayScaleFilter; 10 | typedef ns_ofxSketchFilter::GaussianBlurFilter GaussianBlurFilter; 11 | typedef ns_ofxSketchFilter::BinarizationFilter BinarizationFilter; 12 | 13 | class ofxSketchFilter { 14 | public: 15 | 16 | protected: 17 | 18 | private: 19 | ofFbo _sourceFbo; 20 | ofFbo _tempFbo; 21 | ofFbo _distinationFbo; 22 | 23 | BilateralFilter _bilateralFilter; 24 | GlayScaleFilter _glayScaleFilter; 25 | GaussianBlurFilter _gaussianBlurFilter1; 26 | GaussianBlurFilter _gaussianBlurFilter2; 27 | ofShader _divisionShader; 28 | BinarizationFilter _binarizationFilter; 29 | 30 | ofShader _luminosityShader; 31 | 32 | bool _bilateralEnabled; 33 | bool _fillEnabled; 34 | bool _lineBoldEnabled; 35 | 36 | public: 37 | ofxSketchFilter(); 38 | ~ofxSketchFilter(); 39 | 40 | void setup(int width, int height); 41 | void draw(); 42 | 43 | void begin(); 44 | void end(); 45 | 46 | void resize(int width, int height); 47 | 48 | inline bool bilateralEnabled() { return _bilateralEnabled; } 49 | inline void bilateralEnabled(bool value) { _bilateralEnabled = value; } 50 | 51 | inline bool fillEnabled() { return _fillEnabled; } 52 | inline void fillEnabled(bool value) { _fillEnabled = value; } 53 | 54 | inline bool lineBoldEnabled() { return _lineBoldEnabled; } 55 | inline void lineBoldEnabled(bool value) { _lineBoldEnabled = value; } 56 | 57 | inline float bilateralNormalization() { return _bilateralFilter.normalization(); } 58 | inline void bilateralNormalization(float value) { _bilateralFilter.normalization(value); } 59 | 60 | inline float bilateralBlurOffset() { return _bilateralFilter.blurOffset(); } 61 | inline void bilateralBlurOffset(float value) { _bilateralFilter.blurOffset(value); } 62 | 63 | inline float horizontalBlurSize1() { return _gaussianBlurFilter1.horizontalBlurSize(); } 64 | inline void horizontalBlurSize1(float value) { _gaussianBlurFilter1.horizontalBlurSize(value); } 65 | 66 | inline float verticalBlurSize1() { return _gaussianBlurFilter1.verticalBlurSize(); } 67 | inline void verticalBlurSize1(float value) { _gaussianBlurFilter1.verticalBlurSize(value); } 68 | 69 | inline float horizontalBlurSize2() { return _gaussianBlurFilter2.horizontalBlurSize(); } 70 | inline void horizontalBlurSize2(float value) { _gaussianBlurFilter2.horizontalBlurSize(value); } 71 | 72 | inline float verticalBlurSize2() { return _gaussianBlurFilter2.verticalBlurSize(); } 73 | inline void verticalBlurSize2(float value) { _gaussianBlurFilter2.verticalBlurSize(value); } 74 | 75 | inline float binarizationThreshold() { return _binarizationFilter.threshold(); } 76 | inline void binarizationThreshold(float value) { _binarizationFilter.threshold(value); } 77 | 78 | protected: 79 | 80 | private: 81 | void _applyEffects1(); 82 | void _applyEffects2(); 83 | 84 | }; 85 | -------------------------------------------------------------------------------- /thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/selflash/ofxSketchFilter/b1989b968043d83d6049d1b47027a22bd5e856f9/thumbnail.gif --------------------------------------------------------------------------------