├── README.md
├── resources
├── CinderApp.icns
├── pass.vert
├── project.vert
├── hblur.frag
├── vblur.frag
└── project.frag
├── include
└── Resources.h
├── xcode
├── AlJebr.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
├── AlJebr_Prefix.pch
├── Info.plist
└── JaggedCylinder.h
├── scrap_code
└── ring.py
├── LICENSE
├── src
├── AsynchMovieWriter.h
├── SvvimPost.h
├── aljebr.h
└── AlJebrApp.cpp
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | JaggedCylinderApp
2 | =================
3 |
4 | Generative contorted cylinder
5 |
--------------------------------------------------------------------------------
/resources/CinderApp.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whatever/JaggedCylinderApp/master/resources/CinderApp.icns
--------------------------------------------------------------------------------
/include/Resources.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "cinder/CinderResources.h"
3 |
4 | //#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE )
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/xcode/AlJebr.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/resources/pass.vert:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | void main () {
4 | gl_TexCoord[0] = gl_MultiTexCoord0;
5 | gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;;
6 | gl_FrontColor = gl_Color;
7 | gl_BackColor = vec4(0.f, 0.f, 0.f, 1.f);
8 | }
--------------------------------------------------------------------------------
/resources/project.vert:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | varying vec3 v;
4 | varying vec3 normal;
5 | varying vec4 ambientGlobal;
6 |
7 | void main() {
8 | ambientGlobal = gl_LightModel.ambient * gl_FrontMaterial.ambient;
9 | v = vec3(gl_ModelViewMatrix * gl_Vertex);
10 | normal = normalize(gl_NormalMatrix * gl_Normal);
11 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
12 | }
--------------------------------------------------------------------------------
/xcode/AlJebr_Prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #if defined( __cplusplus )
6 | #include "cinder/Cinder.h"
7 |
8 | #include "cinder/app/AppBasic.h"
9 |
10 | #include "cinder/gl/gl.h"
11 |
12 | #include "cinder/CinderMath.h"
13 | #include "cinder/Matrix.h"
14 | #include "cinder/Vector.h"
15 | #include "cinder/Quaternion.h"
16 | #endif
17 |
--------------------------------------------------------------------------------
/scrap_code/ring.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | import math
4 |
5 | class SizeError(Exception):
6 | def __init__ (self, value): self.value = value
7 | def __str__ (self): return repr(self.value)
8 |
9 |
10 | def ring (points = 3):
11 |
12 | if points < 3:
13 | raise SizeError("points needs a value larger than 2")
14 |
15 | for k in range(points):
16 | theta = 2 * math.pi * k/points
17 | fi = 2 * math.pi * (k+1)/points
18 |
19 | p = [ math.cos(theta), math.sin(theta) ]
20 | q = [ math.cos(fi), math.sin(fi) ]
21 | p = map(lambda x: round(x, 2), p)
22 | q = map(lambda x: round(x, 2), q)
23 |
24 | print p
25 | print q
26 | print
27 |
28 |
29 |
30 |
31 | ring(100)
32 |
--------------------------------------------------------------------------------
/resources/hblur.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform sampler2D texture;
4 | uniform float size = 1/1024.f;
5 |
6 | const float offset[3] = float[] (0.0, 1.3846153846, 3.2307692308);
7 | const float weight[3] = float[] (0.2270270270, 0.3162162162, 0.0702702703);
8 |
9 | float luminance (vec4 color) {
10 | return dot(vec3(.17f, .51f, .32f), color.rgb);
11 | }
12 |
13 | void main () {
14 | vec2 coord = gl_TexCoord[0].xy;
15 |
16 | vec4 color = texture2D(texture, coord) * weight[0];
17 | float s = 4.f * size;
18 | color += texture2D(texture, coord + vec2(offset[1], 0)*s) * weight[1];
19 | color += texture2D(texture, coord - vec2(offset[1], 0)*s) * weight[1];
20 | color += texture2D(texture, coord + vec2(offset[2], 0)*s) * weight[2];
21 | color += texture2D(texture, coord - vec2(offset[2], 0)*s) * weight[2];
22 |
23 | gl_FragColor = color;
24 | }
--------------------------------------------------------------------------------
/resources/vblur.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform sampler2D texture;
4 | uniform float size = 1/1024.f;
5 |
6 | const float offset[3] = float[] (0.0, 1.3846153846, 3.2307692308);
7 | const float weight[3] = float[] (0.2270270270, 0.3162162162, 0.0702702703);
8 |
9 | float luminance (vec4 color) {
10 | return dot(vec3(.17f, .51f, .32f), color.rgb);
11 | }
12 |
13 | void main () {
14 | vec2 coord = gl_TexCoord[0].xy;
15 |
16 | vec4 color = texture2D(texture, coord) * weight[0];
17 | float s = 4.f * size;
18 | color += texture2D(texture, coord + vec2(0, offset[1])*s) * weight[1];
19 | color += texture2D(texture, coord - vec2(0, offset[1])*s) * weight[1];
20 | color += texture2D(texture, coord + vec2(0, offset[2])*s) * weight[2];
21 | color += texture2D(texture, coord - vec2(0, offset[2])*s) * weight[2];
22 |
23 | gl_FragColor = color;
24 | }
--------------------------------------------------------------------------------
/resources/project.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | varying vec3 v;
4 | varying vec3 normal;
5 | varying vec4 ambientGlobal;
6 |
7 | void main (void) {
8 | vec3 N = gl_FrontFacing ? normal : -normal;
9 | vec3 L = normalize(gl_LightSource[0].position.xyz - v);
10 | vec3 E = normalize(-v); // we are in Eye Coordinates, so EyePos is (0,0,0)
11 | vec3 R = normalize(-reflect(L,N));
12 |
13 | //calculate Ambient Term:
14 | vec4 Iamb = gl_FrontLightProduct[0].ambient;
15 |
16 | //calculate Diffuse Term:
17 | vec4 Idiff = gl_FrontLightProduct[0].diffuse * max(dot(N,L), 0.0);
18 | Idiff = clamp(Idiff, 0.0, 1.0);
19 |
20 | // calculate Specular Term:
21 | vec4 Ispec = gl_FrontLightProduct[0].specular * pow(max(dot(R,E),0.0), 0.3*gl_FrontMaterial.shininess);
22 | Ispec = clamp(Ispec, 0.0, 1.0);
23 |
24 | // write Total Color:
25 | gl_FragColor = gl_FrontLightModelProduct.sceneColor + Iamb + Idiff + Ispec;
26 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Matt Owen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/xcode/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | CinderApp.icns
11 | CFBundleIdentifier
12 | org.libcinder.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | ${MACOSX_DEPLOYMENT_TARGET}
27 | NSHumanReadableCopyright
28 | Copyright © 2013 __MyCompanyName__. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/xcode/JaggedCylinder.h:
--------------------------------------------------------------------------------
1 | //
2 | // JaggedCylinder.h
3 | // AlJebr
4 | //
5 | // Created by Matthew Owen on 1/29/14.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "aljebr.h"
12 | #include "cinder/gl/Vbo.h"
13 | #include
14 |
15 | class Ring {
16 | public:
17 | Ring(int points = 5, float skew = 0.0f, float y = 0.0f);
18 | ci::gl::VboMeshRef generate() const;
19 |
20 | private:
21 | };
22 |
23 | #define RAND_FLOAT (float) (rand() / ((float) RAND_MAX))
24 |
25 |
26 | std::vector create_ring (int points, float skew, float y) {
27 | std::vector ring;
28 |
29 | int seed_val;
30 | std::mt19937 rng;
31 | std::uniform_int_distribution dist(-.2, .2);
32 | rng.seed(seed_val);
33 |
34 | for (int k=0; k < points; k++) {
35 | float theta = 2.0f * M_PI * (k+0.0f) / points + skew;
36 | float r = 1.0f;
37 | ci::Vec3f p = ci::Vec3f((r + RAND_FLOAT/3.f)*cos(theta) + dist(rng), r*sin(theta) + dist(rng), y + RAND_FLOAT/1.5f);
38 | ring.push_back(p);
39 | }
40 |
41 | return ring;
42 | }
43 |
44 | al::Geometry create_jagged (float ymin, float ymax, float steps) {
45 | aljebr::Geometry geom;
46 |
47 | std::vector prev = create_ring(9, 0, ymin);
48 | std::vector next;
49 |
50 | float skew = 0.0f;
51 |
52 | for (int k=0; k < steps; k++) {
53 | skew += 1.25f;
54 | // skew = 0.0f;
55 |
56 | float y = ymin + (k+1)/steps * (ymax - ymin);
57 |
58 | next = create_ring(9, skew, y);
59 |
60 | for (int k=0; k < next.size()-1; k++) {
61 | ci::Vec3f p = prev[k];
62 | ci::Vec3f q = next[k];
63 | ci::Vec3f r = prev[(k+1) % prev.size()];
64 | ci::Vec3f s = next[(k+1) % next.size()];
65 | al::Face bl, ur;
66 | bl.a = p;
67 | bl.b = q;
68 | bl.c = r;
69 | ur.a = s;
70 | ur.b = r;
71 | ur.c = q;
72 | geom.addFace(bl);
73 | geom.addFace(ur);
74 | }
75 | ci::Vec3f p = prev[prev.size()-1];
76 | ci::Vec3f q = next[next.size()-1];
77 | ci::Vec3f r = prev[0];
78 | ci::Vec3f s = next[0];
79 | al::Face bl, ur;
80 | bl.a = p; bl.b = q; bl.c = r;
81 | ur.a = s; ur.b = r; ur.c = q;
82 | geom.addFace(bl);
83 | geom.addFace(ur);
84 |
85 | prev = next;
86 | }
87 |
88 | return geom;
89 | }
--------------------------------------------------------------------------------
/src/AsynchMovieWriter.h:
--------------------------------------------------------------------------------
1 | //
2 | // AsynchMovieWriter.h
3 | // Projected
4 | //
5 | // Created by Matthew Owen on 1/6/14.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "cinder/qtime/MovieWriter.h"
12 | #include "cinder/ImageIo.h"
13 | #include "cinder/Thread.h"
14 | #include "cinder/gl/Texture.h"
15 |
16 | #include
17 | #include
18 |
19 | using namespace std;
20 | using namespace ci;
21 | using namespace ci::app;
22 |
23 | using namespace cinder;
24 | using namespace cinder::qtime;
25 |
26 | class AsynchMovieWriter {
27 | public:
28 |
29 | // Useless constructor
30 | AsynchMovieWriter() : mClosing(true) {
31 | app::console() << "WARNING: Using bad default constructor\n";
32 | }
33 |
34 | // Useful constructor
35 | AsynchMovieWriter (const fs::path &path, int32_t width, int32_t height, const qtime::MovieWriter::Format & format = qtime::MovieWriter::Format()) {
36 | mClosing = false;
37 | mPath = path;
38 | mFormat = format;
39 | // MovieWriter
40 | mMovieWriter = qtime::MovieWriter::create(mPath, width, height, mFormat);
41 | // Thread
42 | mThread = make_shared( bind(&AsynchMovieWriter::processFrames, this) );
43 | }
44 |
45 | // Destructor
46 | ~AsynchMovieWriter () {
47 | mClosing = true;
48 | mThread->join();
49 | }
50 |
51 | // Addframe
52 | void addFrame (const ImageSourceRef &imageSource, float duration = -1.0f) {
53 | Frame frame;
54 | frame.image = imageSource;
55 | frame.duration = duration;
56 | // Accessing mFrames requires a lock
57 | mLatch.lock();
58 | mFrames.push(frame);
59 | mLatch.unlock();
60 | }
61 |
62 |
63 | private:
64 |
65 | // Ongoing loop that only dies at end
66 | void processFrames () {
67 | while (!mClosing) {
68 | while (mFrames.size() > 0) {
69 | Frame frame = mFrames.front();
70 | // Ensure that multiple frames aren't being written and that
71 | // mFrames access doesn't happen simultaneously
72 | mLatch.lock();
73 | mMovieWriter->addFrame(frame.image, frame.duration);
74 | mFrames.pop();
75 | mLatch.unlock();
76 | }
77 | }
78 | }
79 |
80 | /**
81 | * FRAME STRUCT
82 | * image : an image reference to be used with
83 | * duration : duration of the frame
84 | */
85 | struct Frame {
86 | ImageSourceRef image;
87 | float duration;
88 | };
89 |
90 | // Queue of frame objects
91 | std::queue mFrames;
92 | // Thread stuff
93 | bool mClosing;
94 | std::mutex mLatch;
95 | std::shared_ptr mThread;
96 | // Recorded variables
97 | fs::path mPath;
98 | qtime::MovieWriter::Format mFormat;
99 | qtime::MovieWriterRef mMovieWriter;
100 | };
--------------------------------------------------------------------------------
/src/SvvimPost.h:
--------------------------------------------------------------------------------
1 | //
2 | // SvvimPost.h
3 | // SvvimGram
4 | //
5 | // Created by Matthew Owen on 1/6/14.
6 | //
7 | //
8 |
9 | #ifndef SvvimGram_SvvimPost_h
10 | #define SvvimGram_SvvimPost_h
11 |
12 | #include "cinder/app/App.h"
13 | #include "cinder/gl/gl.h"
14 | #include "cinder/gl/Texture.h"
15 | #include "cinder/gl/GlslProg.h"
16 | #include "cinder/gl/Fbo.h"
17 |
18 | using namespace cinder;
19 | using namespace cinder::gl;
20 | using namespace ci::app;
21 | using namespace std;
22 |
23 | #define SVVIM_POST_DEF_FBO_WIDTH 500
24 | #define SVVIM_POST_DEF_FBO_HEIGHT 500
25 |
26 | class SvvimPost {
27 | public:
28 |
29 | SvvimPost(int width = SVVIM_POST_DEF_FBO_WIDTH, int height = SVVIM_POST_DEF_FBO_HEIGHT) {
30 | mWidth = width > 0 ? width : SVVIM_POST_DEF_FBO_WIDTH;
31 | mHeight = height > 0 ? height : SVVIM_POST_DEF_FBO_HEIGHT;
32 | }
33 |
34 | void setup () {
35 | mFirstPassFbo = Fbo(500, 500);
36 | mSecondPassFbo = Fbo(500, 500);
37 | HBLUR = GlslProg(loadResource("pass.vert"), loadResource("hblur.frag"));
38 | VBLUR = GlslProg(loadResource("pass.vert"), loadResource("vblur.frag"));
39 | }
40 |
41 | gl::Texture applyBlur( const gl::Texture &texture, const float amount);
42 |
43 | private:
44 | int mWidth, mHeight;
45 |
46 | GlslProg CRUSH;
47 | GlslProg HBLUR;
48 | GlslProg VBLUR;
49 |
50 | Fbo mFirstPassFbo, mSecondPassFbo;
51 | };
52 |
53 |
54 | // Implementation
55 |
56 | gl::Texture SvvimPost::applyBlur(const gl::Texture &texture, const float amount) {
57 | gl::pushMatrices();
58 |
59 | float a = amount/getWindowWidth();
60 |
61 | // Apply vertical blur shader
62 | {
63 | glClearColor(.2, .2, .2, 1);
64 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
65 | HBLUR.bind();
66 | HBLUR.uniform("texture", 0);
67 | HBLUR.uniform("size", (float) a);
68 | mFirstPassFbo.bindFramebuffer();
69 | texture.bind(0);
70 | gl::setMatricesWindow(getWindowWidth(), getWindowHeight());
71 | gl::clear(ColorA(0, 0, 0, 0));
72 | gl::color(1, 1, 1);
73 | gl::drawSolidRect(mFirstPassFbo.getBounds());
74 | texture.unbind(0);
75 | mFirstPassFbo.unbindFramebuffer();
76 | HBLUR.unbind();
77 | }
78 |
79 | // Apply horizontal blur shader
80 | {
81 | glClearColor(.2, .2, .2, 1);
82 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
83 | VBLUR.bind();
84 | VBLUR.uniform("texture", 0);
85 | VBLUR.uniform("size", (float) a);
86 | mSecondPassFbo.bindFramebuffer();
87 | mFirstPassFbo.bindTexture(0);
88 | gl::setMatricesWindow(getWindowWidth(), getWindowHeight());
89 | gl::clear(ColorA(0, 0, 0, 0));
90 | gl::color(1, 1, 1);
91 | gl::drawSolidRect(mSecondPassFbo.getBounds());
92 | mFirstPassFbo.unbindTexture();
93 | mSecondPassFbo.unbindFramebuffer();
94 | VBLUR.unbind();
95 | }
96 |
97 | gl::popMatrices();
98 | return mSecondPassFbo.getTexture();
99 | }
100 |
101 | #endif
102 |
--------------------------------------------------------------------------------
/src/aljebr.h:
--------------------------------------------------------------------------------
1 | //
2 | // aljebr.h
3 | // AlJebr
4 | //
5 | // Created by Matthew Owen on 1/29/14.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "cinder/gl/Vbo.h"
12 | #include "cinder/app/App.h"
13 |
14 | namespace aljebr {
15 |
16 | /**
17 | * Triange Face
18 | * Structure to store 3 points - a, b, c - that define a plane
19 | * and their normal. In principle, the normal can be computed
20 | * from a, b, c and a boolean flag.
21 | */
22 | struct Face {
23 | ci::Vec3f a, b, c;
24 | ci::Vec3f n;
25 | };
26 |
27 | /**
28 | * Square Face
29 | * Strictire to store 4 points - a, b. c. d = tjat define a square tile
30 | * and its normal.
31 | */
32 | struct SquareFace {
33 | ci::Vec3f a, b, c, d;
34 | ci::Vec3f n;
35 | };
36 |
37 | /**
38 | * Geometry
39 | */
40 | class Geometry {
41 | public:
42 | Geometry();
43 | void addFace(const Face &f);
44 | void addFace(const Face &f, const ci::Vec3f &n);
45 | ci::gl::VboMeshRef generate() const;
46 | private:
47 | ci::gl::VboMesh::Layout mLayout;
48 | ci::gl::VboMeshRef mMeshRef;
49 |
50 | std::vector mPoints;
51 | std::vector mNormals;
52 | std::vector mIndices;
53 | std::vector mTexCoords;
54 | };
55 | }
56 |
57 | namespace al = aljebr;
58 |
59 | al::Geometry::Geometry () {
60 | mLayout.setStaticIndices();
61 | mLayout.setStaticPositions();
62 | mLayout.setStaticNormals();
63 | }
64 |
65 | void al::Geometry::addFace (const Face &f) {
66 | mPoints.push_back(f.a);
67 | mPoints.push_back(f.b);
68 | mPoints.push_back(f.c);
69 |
70 | unsigned int k = mIndices.size();
71 | mIndices.push_back(k+0);
72 | mIndices.push_back(k+1);
73 | mIndices.push_back(k+2);
74 |
75 | ci::Vec3f p = f.a - f.b;
76 | ci::Vec3f q = f.a - f.c;
77 | p.normalize();
78 | q.normalize();
79 | ci::Vec3f n = p.cross(q);
80 | n.normalize();
81 | mNormals.push_back(n);
82 | mNormals.push_back(n);
83 | mNormals.push_back(n);
84 | }
85 |
86 | void al::Geometry::addFace (const Face &f, const ci::Vec3f &n) {
87 | mPoints.push_back(f.a);
88 | mPoints.push_back(f.b);
89 | mPoints.push_back(f.c);
90 | unsigned int k = mIndices.size();
91 | mIndices.push_back(k+0);
92 | mIndices.push_back(k+1);
93 | mIndices.push_back(k+2);
94 | }
95 |
96 | ci::gl::VboMeshRef al::Geometry::generate () const {
97 | ci::gl::VboMeshRef mesh;
98 |
99 | if (mPoints.size() != mIndices.size()) {
100 | ci::app::console() << mPoints.size() << " != " << mIndices.size() << "\n";
101 | return mesh;
102 | }
103 |
104 | std::vector points;
105 | std::vector indices;
106 |
107 | mesh = ci::gl::VboMesh::create(mPoints.size(), mIndices.size(), mLayout, GL_TRIANGLES);
108 | mesh->bufferPositions(mPoints);
109 | mesh->bufferIndices(mIndices);
110 | mesh->bufferNormals(mNormals);
111 |
112 | return mesh;
113 | }
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #########################
2 | # .gitignore file for Xcode4 / OS X Source projects
3 | #
4 | # Version 2.0
5 | # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
6 | #
7 | # 2013 updates:
8 | # - fixed the broken "save personal Schemes"
9 | #
10 | # NB: if you are storing "built" products, this WILL NOT WORK,
11 | # and you should use a different .gitignore (or none at all)
12 | # This file is for SOURCE projects, where there are many extra
13 | # files that we want to exclude
14 | #
15 | #########################
16 |
17 | #####
18 | # OS X temporary files that should never be committed
19 |
20 | .DS_Store
21 | *.swp
22 | *.lock
23 | profile
24 |
25 |
26 | ####
27 | # Xcode temporary files that should never be committed
28 | #
29 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
30 |
31 | *~.nib
32 |
33 |
34 | ####
35 | # Xcode build files -
36 | #
37 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
38 |
39 | DerivedData/
40 |
41 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
42 |
43 | build/
44 | Build/
45 |
46 |
47 | #####
48 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
49 | #
50 | # This is complicated:
51 | #
52 | # SOMETIMES you need to put this file in version control.
53 | # Apple designed it poorly - if you use "custom executables", they are
54 | # saved in this file.
55 | # 99% of projects do NOT use those, so they do NOT want to version control this file.
56 | # ..but if you're in the 1%, comment out the line "*.pbxuser"
57 |
58 | *.pbxuser
59 | *.mode1v3
60 | *.mode2v3
61 | *.perspectivev3
62 | # NB: also, whitelist the default ones, some projects need to use these
63 | !default.pbxuser
64 | !default.mode1v3
65 | !default.mode2v3
66 | !default.perspectivev3
67 |
68 |
69 | ####
70 | # Xcode 4 - semi-personal settings
71 | #
72 | #
73 | # OPTION 1: ---------------------------------
74 | # throw away ALL personal settings (including custom schemes!
75 | # - unless they are "shared")
76 | #
77 | # NB: this is exclusive with OPTION 2 below
78 | xcuserdata
79 |
80 | # OPTION 2: ---------------------------------
81 | # get rid of ALL personal settings, but KEEP SOME OF THEM
82 | # - NB: you must manually uncomment the bits you want to keep
83 | #
84 | # NB: this is exclusive with OPTION 1 above
85 | #
86 | #xcuserdata/**/*
87 |
88 | # (requires option 2 above): Personal Schemes
89 | #
90 | #!xcuserdata/**/xcschemes/*
91 |
92 | ####
93 | # XCode 4 workspaces - more detailed
94 | #
95 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :)
96 | #
97 | # Workspace layout is quite spammy. For reference:
98 | #
99 | # /(root)/
100 | # /(project-name).xcodeproj/
101 | # project.pbxproj
102 | # /project.xcworkspace/
103 | # contents.xcworkspacedata
104 | # /xcuserdata/
105 | # /(your name)/xcuserdatad/
106 | # UserInterfaceState.xcuserstate
107 | # /xcsshareddata/
108 | # /xcschemes/
109 | # (shared scheme name).xcscheme
110 | # /xcuserdata/
111 | # /(your name)/xcuserdatad/
112 | # (private scheme).xcscheme
113 | # xcschememanagement.plist
114 | #
115 | #
116 |
117 | ####
118 | # Xcode 4 - Deprecated classes
119 | #
120 | # Allegedly, if you manually "deprecate" your classes, they get moved here.
121 | #
122 | # We're using source-control, so this is a "feature" that we do not want!
123 |
124 | *.moved-aside
125 |
126 |
127 | ####
128 | # UNKNOWN: recommended by others, but I can't discover what these files are
129 | #
130 | # ...none. Everything is now explained.
131 |
--------------------------------------------------------------------------------
/src/AlJebrApp.cpp:
--------------------------------------------------------------------------------
1 | #include "cinder/app/AppNative.h"
2 | #include "cinder/gl/gl.h"
3 | #include "cinder/Camera.h"
4 | #include "cinder/gl/Light.h"
5 | #include "cinder/gl/GlslProg.h"
6 | #include "cinder/gl/Fbo.h"
7 |
8 | #include "aljebr.h"
9 | #include "JaggedCylinder.h"
10 |
11 | #include "cinder/qtime/QuickTime.h"
12 | #include "AsynchMovieWriter.h"
13 |
14 | #include "SvvimPost.h"
15 |
16 | using namespace ci;
17 | using namespace ci::app;
18 | using namespace std;
19 |
20 | class AlJebrApp : public AppNative {
21 | public:
22 | void setup();
23 | void update();
24 | void draw();
25 |
26 | private:
27 | void prepareSettings(Settings *settings);
28 | void setupGeometry();
29 | void updateGeometry();
30 |
31 | gl::Texture render();
32 |
33 | gl::VboMeshRef mMesh;
34 | CameraPersp mCam;
35 |
36 | shared_ptr mLight;
37 | gl::GlslProg mPhongShader;
38 | gl::Fbo mFbo;
39 |
40 | shared_ptr mWriter;
41 |
42 | SvvimPost mPost;
43 | };
44 |
45 | void AlJebrApp::prepareSettings(Settings *settings) {
46 | settings->setWindowSize(500, 500);
47 | }
48 |
49 | void AlJebrApp::setup() {
50 | mPost.setup();
51 |
52 | gl::Fbo::Format fboFormat;
53 | fboFormat.setSamples(16);
54 | mFbo = gl::Fbo(500, 500, fboFormat);
55 |
56 | setupGeometry();
57 | mLight = make_shared (gl::Light::DIRECTIONAL, 0);
58 | try {
59 | mPhongShader = gl::GlslProg(loadResource("project.vert"), loadResource("project.frag"));
60 | }
61 | catch (const std::exception &e) {
62 | app::console() << e.what() << "\n";
63 | }
64 |
65 | fs::path path = fs::path("./what.mp4");
66 | if (path.empty())
67 | return;
68 |
69 | qtime::MovieWriter::Format format;
70 | format.setCodec(qtime::MovieWriter::CODEC_RAW);
71 | mWriter = make_shared (path, 500, 500, format);
72 | }
73 |
74 | void AlJebrApp::update() {
75 | Vec3f eye = Vec3f(0, 4, 0);
76 | Vec3f target = Vec3f(0, 0, 0);
77 | Vec3f up = Vec3f(0, 0, 1);
78 | mCam.lookAt(eye, target, up);
79 | mLight->setAmbient(ci::Color(.8, .8, .8));
80 | mLight->setDiffuse(ci::Color(.9, .9, .9));
81 | mLight->setSpecular(ci::Color(1, 1, 1));
82 | mLight->lookAt(Vec3f(5, 0, 0), target);
83 | }
84 |
85 | void AlJebrApp::draw() {
86 | gl::setMatricesWindow(getWindowWidth(), getWindowHeight());
87 |
88 | gl::Texture orig = render();
89 | gl::Texture blur = mPost.applyBlur(orig, 1.5f + 1.5f * cos(getElapsedSeconds()));
90 |
91 | // Disable lighting so that we can use our own
92 | glEnable(GL_BLEND);
93 | glBlendFunc(GL_SRC_ALPHA, GL_ONE);
94 | glDisable(GL_LIGHTING);
95 | glDisable(GL_DEPTH_TEST);
96 | gl::disableDepthRead();
97 | gl::disableDepthWrite();
98 |
99 | // Draw FBO
100 | ci::gl::clear(Color(0, 0, 0));
101 |
102 | gl::color(1, 1, 1, 0.7f);
103 | gl::draw(orig, getWindowBounds());
104 | gl::color(1, 1, 1, 0.3f);
105 | gl::draw(blur, getWindowBounds());
106 |
107 | if (mWriter)
108 | mWriter->addFrame(copyWindowSurface());
109 | }
110 |
111 | void AlJebrApp::setupGeometry() {
112 | aljebr::Geometry geom = create_jagged(-3.5f, 3.5f, 7);
113 | mMesh = geom.generate();
114 | }
115 |
116 | void AlJebrApp::updateGeometry() {
117 | }
118 |
119 | gl::Texture AlJebrApp::render () {
120 | mFbo.bindFramebuffer();
121 | gl::pushMatrices();
122 |
123 | glEnable(GL_LIGHTING);
124 | glEnable(GL_DEPTH_TEST);
125 | gl::enableDepthWrite();
126 | gl::enableDepthRead();
127 | gl::disableAlphaBlending();
128 | ci::gl::clear(Color(0, 0, 0));
129 |
130 | gl::setMatrices(mCam);
131 |
132 | float t = getElapsedSeconds();
133 | gl::rotate(45 * Vec3f(0, 0, t));
134 |
135 | // Bind Phong Shader
136 | if (mPhongShader) {
137 | mPhongShader.bind();
138 | }
139 |
140 | // Draw mesh or cube
141 | if (mMesh) {
142 | gl::color(1, 1, 1);
143 | gl::draw(mMesh);
144 | }
145 | else {
146 | gl::color(1, 0, 1);
147 | gl::drawCube(Vec3f(0, 0, 0), Vec3f(1, 1, 1));
148 | }
149 |
150 | // Unbind Phong Shader
151 | if (mPhongShader) {
152 | mPhongShader.unbind();
153 | }
154 |
155 | gl::popMatrices();
156 | mFbo.unbindFramebuffer();
157 | return mFbo.getTexture();
158 | }
159 |
160 | CINDER_APP_NATIVE( AlJebrApp, RendererGl )
161 |
--------------------------------------------------------------------------------
/xcode/AlJebr.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0091D8F80E81B9330029341E /* OpenGL.framework */; };
11 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */; };
12 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */; };
13 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */; };
14 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */; };
15 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */; };
16 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5323E6B50EAFCA7E003A9687 /* QTKit.framework */; };
17 | 5E036FC4226047D08C828C1F /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F9147AE514D4FB1A151F4A3 /* QuickTime.framework */; };
18 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
19 | A5F755B1C065403DBB15C508 /* AlJebrApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4EDF1B8A00A2497E8BB947DC /* AlJebrApp.cpp */; };
20 | C84E7230B0DA454084E47952 /* CinderApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = 109E0EDC538B4C0C978C9501 /* CinderApp.icns */; };
21 | C9B95BAC1899FF5200FE67CF /* hblur.frag in Resources */ = {isa = PBXBuildFile; fileRef = C9B95BA61899FF3100FE67CF /* hblur.frag */; };
22 | C9B95BAD1899FF5200FE67CF /* pass.vert in Resources */ = {isa = PBXBuildFile; fileRef = C9B95BA71899FF3100FE67CF /* pass.vert */; };
23 | C9B95BAE1899FF5200FE67CF /* vblur.frag in Resources */ = {isa = PBXBuildFile; fileRef = C9B95BA81899FF3100FE67CF /* vblur.frag */; };
24 | C9D403791899B01F00558653 /* project.frag in Resources */ = {isa = PBXBuildFile; fileRef = C9D4037518999E4100558653 /* project.frag */; };
25 | C9D4037A1899B01F00558653 /* project.vert in Resources */ = {isa = PBXBuildFile; fileRef = C9D4037618999E4100558653 /* project.vert */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXFileReference section */
29 | 0091D8F80E81B9330029341E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
30 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
31 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
32 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
33 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
34 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
35 | 109E0EDC538B4C0C978C9501 /* CinderApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = CinderApp.icns; path = ../resources/CinderApp.icns; sourceTree = ""; };
36 | 14C2B6E380CB4D5BA0F7CB73 /* Resources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resources.h; path = ../include/Resources.h; sourceTree = ""; };
37 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
38 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
39 | 456896066DA743DE951CC42E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
40 | 4EDF1B8A00A2497E8BB947DC /* AlJebrApp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.cpp; name = AlJebrApp.cpp; path = ../src/AlJebrApp.cpp; sourceTree = ""; };
41 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; };
42 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; };
43 | 8D1107320486CEB800E47090 /* AlJebr.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AlJebr.app; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 9F9147AE514D4FB1A151F4A3 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = System/Library/Frameworks/QuickTime.framework; sourceTree = SDKROOT; };
45 | B115E7CE92EB4BE6969CAE86 /* AlJebr_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = "\"\""; path = AlJebr_Prefix.pch; sourceTree = ""; };
46 | C9B95BA41899EA9E00FE67CF /* AsynchMovieWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsynchMovieWriter.h; path = ../src/AsynchMovieWriter.h; sourceTree = ""; };
47 | C9B95BA51899EC3300FE67CF /* SvvimPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SvvimPost.h; path = ../src/SvvimPost.h; sourceTree = ""; };
48 | C9B95BA61899FF3100FE67CF /* hblur.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = hblur.frag; path = ../resources/hblur.frag; sourceTree = ""; };
49 | C9B95BA71899FF3100FE67CF /* pass.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = pass.vert; path = ../resources/pass.vert; sourceTree = ""; };
50 | C9B95BA81899FF3100FE67CF /* vblur.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = vblur.frag; path = ../resources/vblur.frag; sourceTree = ""; };
51 | C9D4037318994E4300558653 /* aljebr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = aljebr.h; path = ../src/aljebr.h; sourceTree = ""; };
52 | C9D40374189997EC00558653 /* JaggedCylinder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JaggedCylinder.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
53 | C9D4037518999E4100558653 /* project.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = project.frag; path = ../resources/project.frag; sourceTree = ""; };
54 | C9D4037618999E4100558653 /* project.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = project.vert; path = ../resources/project.vert; sourceTree = ""; };
55 | /* End PBXFileReference section */
56 |
57 | /* Begin PBXFrameworksBuildPhase section */
58 | 8D11072E0486CEB800E47090 /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
63 | 0091D8F90E81B9330029341E /* OpenGL.framework in Frameworks */,
64 | 5323E6B20EAFCA74003A9687 /* CoreVideo.framework in Frameworks */,
65 | 5323E6B60EAFCA7E003A9687 /* QTKit.framework in Frameworks */,
66 | 00B784B30FF439BC000DE1D7 /* Accelerate.framework in Frameworks */,
67 | 00B784B40FF439BC000DE1D7 /* AudioToolbox.framework in Frameworks */,
68 | 00B784B50FF439BC000DE1D7 /* AudioUnit.framework in Frameworks */,
69 | 00B784B60FF439BC000DE1D7 /* CoreAudio.framework in Frameworks */,
70 | 5E036FC4226047D08C828C1F /* QuickTime.framework in Frameworks */,
71 | );
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | /* End PBXFrameworksBuildPhase section */
75 |
76 | /* Begin PBXGroup section */
77 | 01B97315FEAEA392516A2CEA /* Blocks */ = {
78 | isa = PBXGroup;
79 | children = (
80 | );
81 | name = Blocks;
82 | sourceTree = "";
83 | };
84 | 080E96DDFE201D6D7F000001 /* Source */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 4EDF1B8A00A2497E8BB947DC /* AlJebrApp.cpp */,
88 | );
89 | name = Source;
90 | sourceTree = "";
91 | };
92 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 00B784AF0FF439BC000DE1D7 /* Accelerate.framework */,
96 | 00B784B00FF439BC000DE1D7 /* AudioToolbox.framework */,
97 | 00B784B10FF439BC000DE1D7 /* AudioUnit.framework */,
98 | 00B784B20FF439BC000DE1D7 /* CoreAudio.framework */,
99 | 5323E6B50EAFCA7E003A9687 /* QTKit.framework */,
100 | 5323E6B10EAFCA74003A9687 /* CoreVideo.framework */,
101 | 0091D8F80E81B9330029341E /* OpenGL.framework */,
102 | 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
103 | );
104 | name = "Linked Frameworks";
105 | sourceTree = "";
106 | };
107 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
111 | 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
112 | );
113 | name = "Other Frameworks";
114 | sourceTree = "";
115 | };
116 | 19C28FACFE9D520D11CA2CBB /* Products */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 8D1107320486CEB800E47090 /* AlJebr.app */,
120 | );
121 | name = Products;
122 | sourceTree = "";
123 | };
124 | 29B97314FDCFA39411CA2CEA /* AlJebr */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 01B97315FEAEA392516A2CEA /* Blocks */,
128 | 29B97315FDCFA39411CA2CEA /* Headers */,
129 | 080E96DDFE201D6D7F000001 /* Source */,
130 | 29B97317FDCFA39411CA2CEA /* Resources */,
131 | 29B97323FDCFA39411CA2CEA /* Frameworks */,
132 | 19C28FACFE9D520D11CA2CBB /* Products */,
133 | );
134 | name = AlJebr;
135 | sourceTree = "";
136 | };
137 | 29B97315FDCFA39411CA2CEA /* Headers */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 14C2B6E380CB4D5BA0F7CB73 /* Resources.h */,
141 | B115E7CE92EB4BE6969CAE86 /* AlJebr_Prefix.pch */,
142 | C9D4037318994E4300558653 /* aljebr.h */,
143 | C9D40374189997EC00558653 /* JaggedCylinder.h */,
144 | C9B95BA41899EA9E00FE67CF /* AsynchMovieWriter.h */,
145 | C9B95BA51899EC3300FE67CF /* SvvimPost.h */,
146 | );
147 | name = Headers;
148 | sourceTree = "";
149 | };
150 | 29B97317FDCFA39411CA2CEA /* Resources */ = {
151 | isa = PBXGroup;
152 | children = (
153 | C9D4037618999E4100558653 /* project.vert */,
154 | C9D4037518999E4100558653 /* project.frag */,
155 | C9B95BA71899FF3100FE67CF /* pass.vert */,
156 | C9B95BA61899FF3100FE67CF /* hblur.frag */,
157 | C9B95BA81899FF3100FE67CF /* vblur.frag */,
158 | 109E0EDC538B4C0C978C9501 /* CinderApp.icns */,
159 | 456896066DA743DE951CC42E /* Info.plist */,
160 | );
161 | name = Resources;
162 | sourceTree = "";
163 | };
164 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
165 | isa = PBXGroup;
166 | children = (
167 | 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
168 | 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
169 | 9F9147AE514D4FB1A151F4A3 /* QuickTime.framework */,
170 | );
171 | name = Frameworks;
172 | sourceTree = "";
173 | };
174 | /* End PBXGroup section */
175 |
176 | /* Begin PBXNativeTarget section */
177 | 8D1107260486CEB800E47090 /* AlJebr */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "AlJebr" */;
180 | buildPhases = (
181 | 8D1107290486CEB800E47090 /* Resources */,
182 | 8D11072C0486CEB800E47090 /* Sources */,
183 | 8D11072E0486CEB800E47090 /* Frameworks */,
184 | );
185 | buildRules = (
186 | );
187 | dependencies = (
188 | );
189 | name = AlJebr;
190 | productInstallPath = "$(HOME)/Applications";
191 | productName = AlJebr;
192 | productReference = 8D1107320486CEB800E47090 /* AlJebr.app */;
193 | productType = "com.apple.product-type.application";
194 | };
195 | /* End PBXNativeTarget section */
196 |
197 | /* Begin PBXProject section */
198 | 29B97313FDCFA39411CA2CEA /* Project object */ = {
199 | isa = PBXProject;
200 | attributes = {
201 | };
202 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AlJebr" */;
203 | compatibilityVersion = "Xcode 3.2";
204 | developmentRegion = English;
205 | hasScannedForEncodings = 1;
206 | knownRegions = (
207 | English,
208 | Japanese,
209 | French,
210 | German,
211 | );
212 | mainGroup = 29B97314FDCFA39411CA2CEA /* AlJebr */;
213 | projectDirPath = "";
214 | projectRoot = "";
215 | targets = (
216 | 8D1107260486CEB800E47090 /* AlJebr */,
217 | );
218 | };
219 | /* End PBXProject section */
220 |
221 | /* Begin PBXResourcesBuildPhase section */
222 | 8D1107290486CEB800E47090 /* Resources */ = {
223 | isa = PBXResourcesBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | C9B95BAC1899FF5200FE67CF /* hblur.frag in Resources */,
227 | C9B95BAD1899FF5200FE67CF /* pass.vert in Resources */,
228 | C9B95BAE1899FF5200FE67CF /* vblur.frag in Resources */,
229 | C9D403791899B01F00558653 /* project.frag in Resources */,
230 | C9D4037A1899B01F00558653 /* project.vert in Resources */,
231 | C84E7230B0DA454084E47952 /* CinderApp.icns in Resources */,
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | };
235 | /* End PBXResourcesBuildPhase section */
236 |
237 | /* Begin PBXSourcesBuildPhase section */
238 | 8D11072C0486CEB800E47090 /* Sources */ = {
239 | isa = PBXSourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | A5F755B1C065403DBB15C508 /* AlJebrApp.cpp in Sources */,
243 | );
244 | runOnlyForDeploymentPostprocessing = 0;
245 | };
246 | /* End PBXSourcesBuildPhase section */
247 |
248 | /* Begin XCBuildConfiguration section */
249 | C01FCF4B08A954540054247B /* Debug */ = {
250 | isa = XCBuildConfiguration;
251 | buildSettings = {
252 | COMBINE_HIDPI_IMAGES = YES;
253 | COPY_PHASE_STRIP = NO;
254 | DEAD_CODE_STRIPPING = YES;
255 | GCC_DYNAMIC_NO_PIC = NO;
256 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
257 | GCC_OPTIMIZATION_LEVEL = 0;
258 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
259 | GCC_PREFIX_HEADER = AlJebr_Prefix.pch;
260 | GCC_PREPROCESSOR_DEFINITIONS = (
261 | "DEBUG=1",
262 | "$(inherited)",
263 | );
264 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
265 | INFOPLIST_FILE = Info.plist;
266 | INSTALL_PATH = "$(HOME)/Applications";
267 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/libcinder_d.a\"";
268 | PRODUCT_NAME = AlJebr;
269 | SYMROOT = ./build;
270 | WRAPPER_EXTENSION = app;
271 | };
272 | name = Debug;
273 | };
274 | C01FCF4C08A954540054247B /* Release */ = {
275 | isa = XCBuildConfiguration;
276 | buildSettings = {
277 | COMBINE_HIDPI_IMAGES = YES;
278 | DEAD_CODE_STRIPPING = YES;
279 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
280 | GCC_FAST_MATH = YES;
281 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
282 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
283 | GCC_OPTIMIZATION_LEVEL = 3;
284 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
285 | GCC_PREFIX_HEADER = AlJebr_Prefix.pch;
286 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
287 | INFOPLIST_FILE = Info.plist;
288 | INSTALL_PATH = "$(HOME)/Applications";
289 | OTHER_LDFLAGS = "\"$(CINDER_PATH)/lib/libcinder.a\"";
290 | PRODUCT_NAME = AlJebr;
291 | STRIP_INSTALLED_PRODUCT = YES;
292 | SYMROOT = ./build;
293 | WRAPPER_EXTENSION = app;
294 | };
295 | name = Release;
296 | };
297 | C01FCF4F08A954540054247B /* Debug */ = {
298 | isa = XCBuildConfiguration;
299 | buildSettings = {
300 | ALWAYS_SEARCH_USER_PATHS = NO;
301 | ARCHS = i386;
302 | CINDER_PATH = ../../../../libs/cinder_0.8.5_mac;
303 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
304 | CLANG_CXX_LIBRARY = "libc++";
305 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
306 | GCC_WARN_UNUSED_VARIABLE = YES;
307 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/boost\"";
308 | MACOSX_DEPLOYMENT_TARGET = 10.7;
309 | SDKROOT = macosx;
310 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../blocks/QuickTime/include";
311 | };
312 | name = Debug;
313 | };
314 | C01FCF5008A954540054247B /* Release */ = {
315 | isa = XCBuildConfiguration;
316 | buildSettings = {
317 | ALWAYS_SEARCH_USER_PATHS = NO;
318 | ARCHS = i386;
319 | CINDER_PATH = ../../../../libs/cinder_0.8.5_mac;
320 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
321 | CLANG_CXX_LIBRARY = "libc++";
322 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
323 | GCC_WARN_UNUSED_VARIABLE = YES;
324 | HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/boost\"";
325 | MACOSX_DEPLOYMENT_TARGET = 10.7;
326 | SDKROOT = macosx;
327 | USER_HEADER_SEARCH_PATHS = "\"$(CINDER_PATH)/include\" ../include ../blocks/QuickTime/include";
328 | };
329 | name = Release;
330 | };
331 | /* End XCBuildConfiguration section */
332 |
333 | /* Begin XCConfigurationList section */
334 | C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "AlJebr" */ = {
335 | isa = XCConfigurationList;
336 | buildConfigurations = (
337 | C01FCF4B08A954540054247B /* Debug */,
338 | C01FCF4C08A954540054247B /* Release */,
339 | );
340 | defaultConfigurationIsVisible = 0;
341 | defaultConfigurationName = Release;
342 | };
343 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "AlJebr" */ = {
344 | isa = XCConfigurationList;
345 | buildConfigurations = (
346 | C01FCF4F08A954540054247B /* Debug */,
347 | C01FCF5008A954540054247B /* Release */,
348 | );
349 | defaultConfigurationIsVisible = 0;
350 | defaultConfigurationName = Release;
351 | };
352 | /* End XCConfigurationList section */
353 | };
354 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
355 | }
356 |
--------------------------------------------------------------------------------