From e796377f17b9f8831861b8c7d26ca1326bf59670 Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 13:18:28 +0100 Subject: [PATCH 1/9] Moves examples to separate folder --- .../01_twoScreens}/Project.xcconfig | 0 .../01_twoScreens}/addons.make | 0 .../01_twoScreens}/bin/data/.gitkeep | 0 .../01_twoScreens}/bin/data/SmoothEdgeBlend.frag | 0 .../01_twoScreens}/bin/data/SmoothEdgeBlend.vert | 0 .../01_twoScreens}/openFrameworks-Info.plist | 0 .../01_twoScreens}/src/main.cpp | 0 .../01_twoScreens}/src/testApp.cpp | 0 .../01_twoScreens}/src/testApp.h | 0 .../01_twoScreens}/twoScreens.cbp | 0 .../01_twoScreens}/twoScreens.vcxproj | 0 .../01_twoScreens}/twoScreens.vcxproj.filters | 0 .../01_twoScreens}/twoScreens.vcxproj.user | 0 .../01_twoScreens}/twoScreens.workspace | 0 .../twoScreens.xcodeproj/project.pbxproj | 0 .../xcschemes/twoScreens Debug.xcscheme | 0 .../xcschemes/twoScreens Release.xcscheme | 0 .../02_threeVertical}/Project.xcconfig | 0 .../02_threeVertical}/addons.make | 0 .../02_threeVertical}/bin/data/.gitkeep | 0 .../02_threeVertical}/openFrameworks-Info.plist | 0 .../02_threeVertical}/src/main.cpp | 0 .../02_threeVertical}/src/testApp.cpp | 0 .../02_threeVertical}/src/testApp.h | 0 .../02_threeVertical}/threeVertical.cbp | 0 .../02_threeVertical}/threeVertical.sln | 0 .../02_threeVertical}/threeVertical.vcxproj | 0 .../02_threeVertical}/threeVertical.vcxproj.filters | 0 .../02_threeVertical}/threeVertical.vcxproj.user | 0 .../02_threeVertical}/threeVertical.workspace | 0 .../threeVertical.xcodeproj/project.pbxproj | 0 .../xcschemes/threeVertical Debug.xcscheme | 0 .../xcschemes/threeVertical Release.xcscheme | 0 .../03_guiControls}/Project.xcconfig | 0 .../03_guiControls}/addons.make | 0 .../03_guiControls}/bin/data/.gitkeep | 0 .../03_guiControls}/bin/data/_settings.xml | 0 .../03_guiControls}/guiControls.cbp | 0 .../03_guiControls}/guiControls.sln | 0 .../03_guiControls}/guiControls.vcxproj | 0 .../03_guiControls}/guiControls.vcxproj.filters | 0 .../03_guiControls}/guiControls.vcxproj.user | 0 .../03_guiControls}/guiControls.workspace | 0 .../guiControls.xcodeproj/project.pbxproj | 0 .../xcschemes/guiControls Debug.xcscheme | 0 .../xcschemes/guiControls Release.xcscheme | 0 .../03_guiControls}/openFrameworks-Info.plist | 0 .../03_guiControls}/src/main.cpp | 0 .../03_guiControls}/src/testApp.cpp | 0 .../03_guiControls}/src/testApp.h | 0 .../04_blendClown}/Project.xcconfig | 0 .../04_blendClown}/addons.make | 0 .../04_blendClown}/bin/data/.gitkeep | 0 .../04_blendClown}/bin/data/blendClown.png | Bin .../04_blendClown}/bin/data/blendClown.psd | Bin .../04_blendClown}/blendClown.cbp | 0 .../04_blendClown}/blendClown.sln | 0 .../04_blendClown}/blendClown.vcxproj | 0 .../04_blendClown}/blendClown.vcxproj.filters | 0 .../04_blendClown}/blendClown.vcxproj.user | 0 .../04_blendClown}/blendClown.workspace | 0 .../blendClown.xcodeproj/project.pbxproj | 0 .../xcschemes/blendClown Debug.xcscheme | 0 .../xcschemes/blendClown Release.xcscheme | 0 .../04_blendClown}/openFrameworks-Info.plist | 0 .../04_blendClown}/src/main.cpp | 0 .../04_blendClown}/src/testApp.cpp | 0 .../04_blendClown}/src/testApp.h | 0 68 files changed, 0 insertions(+), 0 deletions(-) rename {01_twoScreens => examples/01_twoScreens}/Project.xcconfig (100%) rename {01_twoScreens => examples/01_twoScreens}/addons.make (100%) rename {01_twoScreens => examples/01_twoScreens}/bin/data/.gitkeep (100%) rename {01_twoScreens => examples/01_twoScreens}/bin/data/SmoothEdgeBlend.frag (100%) rename {01_twoScreens => examples/01_twoScreens}/bin/data/SmoothEdgeBlend.vert (100%) rename {01_twoScreens => examples/01_twoScreens}/openFrameworks-Info.plist (100%) rename {01_twoScreens => examples/01_twoScreens}/src/main.cpp (100%) rename {01_twoScreens => examples/01_twoScreens}/src/testApp.cpp (100%) rename {01_twoScreens => examples/01_twoScreens}/src/testApp.h (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.cbp (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.vcxproj (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.vcxproj.filters (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.vcxproj.user (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.workspace (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.xcodeproj/project.pbxproj (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Debug.xcscheme (100%) rename {01_twoScreens => examples/01_twoScreens}/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Release.xcscheme (100%) rename {02_threeVertical => examples/02_threeVertical}/Project.xcconfig (100%) rename {02_threeVertical => examples/02_threeVertical}/addons.make (100%) rename {02_threeVertical => examples/02_threeVertical}/bin/data/.gitkeep (100%) rename {02_threeVertical => examples/02_threeVertical}/openFrameworks-Info.plist (100%) rename {02_threeVertical => examples/02_threeVertical}/src/main.cpp (100%) rename {02_threeVertical => examples/02_threeVertical}/src/testApp.cpp (100%) rename {02_threeVertical => examples/02_threeVertical}/src/testApp.h (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.cbp (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.sln (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.vcxproj (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.vcxproj.filters (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.vcxproj.user (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.workspace (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.xcodeproj/project.pbxproj (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Debug.xcscheme (100%) rename {02_threeVertical => examples/02_threeVertical}/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Release.xcscheme (100%) rename {03_guiControls => examples/03_guiControls}/Project.xcconfig (100%) rename {03_guiControls => examples/03_guiControls}/addons.make (100%) rename {03_guiControls => examples/03_guiControls}/bin/data/.gitkeep (100%) rename {03_guiControls => examples/03_guiControls}/bin/data/_settings.xml (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.cbp (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.sln (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.vcxproj (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.vcxproj.filters (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.vcxproj.user (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.workspace (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.xcodeproj/project.pbxproj (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Debug.xcscheme (100%) rename {03_guiControls => examples/03_guiControls}/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Release.xcscheme (100%) rename {03_guiControls => examples/03_guiControls}/openFrameworks-Info.plist (100%) rename {03_guiControls => examples/03_guiControls}/src/main.cpp (100%) rename {03_guiControls => examples/03_guiControls}/src/testApp.cpp (100%) rename {03_guiControls => examples/03_guiControls}/src/testApp.h (100%) rename {04_blendClown => examples/04_blendClown}/Project.xcconfig (100%) rename {04_blendClown => examples/04_blendClown}/addons.make (100%) rename {04_blendClown => examples/04_blendClown}/bin/data/.gitkeep (100%) rename {04_blendClown => examples/04_blendClown}/bin/data/blendClown.png (100%) rename {04_blendClown => examples/04_blendClown}/bin/data/blendClown.psd (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.cbp (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.sln (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.vcxproj (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.vcxproj.filters (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.vcxproj.user (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.workspace (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.xcodeproj/project.pbxproj (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Debug.xcscheme (100%) rename {04_blendClown => examples/04_blendClown}/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Release.xcscheme (100%) rename {04_blendClown => examples/04_blendClown}/openFrameworks-Info.plist (100%) rename {04_blendClown => examples/04_blendClown}/src/main.cpp (100%) rename {04_blendClown => examples/04_blendClown}/src/testApp.cpp (100%) rename {04_blendClown => examples/04_blendClown}/src/testApp.h (100%) diff --git a/01_twoScreens/Project.xcconfig b/examples/01_twoScreens/Project.xcconfig similarity index 100% rename from 01_twoScreens/Project.xcconfig rename to examples/01_twoScreens/Project.xcconfig diff --git a/01_twoScreens/addons.make b/examples/01_twoScreens/addons.make similarity index 100% rename from 01_twoScreens/addons.make rename to examples/01_twoScreens/addons.make diff --git a/01_twoScreens/bin/data/.gitkeep b/examples/01_twoScreens/bin/data/.gitkeep similarity index 100% rename from 01_twoScreens/bin/data/.gitkeep rename to examples/01_twoScreens/bin/data/.gitkeep diff --git a/01_twoScreens/bin/data/SmoothEdgeBlend.frag b/examples/01_twoScreens/bin/data/SmoothEdgeBlend.frag similarity index 100% rename from 01_twoScreens/bin/data/SmoothEdgeBlend.frag rename to examples/01_twoScreens/bin/data/SmoothEdgeBlend.frag diff --git a/01_twoScreens/bin/data/SmoothEdgeBlend.vert b/examples/01_twoScreens/bin/data/SmoothEdgeBlend.vert similarity index 100% rename from 01_twoScreens/bin/data/SmoothEdgeBlend.vert rename to examples/01_twoScreens/bin/data/SmoothEdgeBlend.vert diff --git a/01_twoScreens/openFrameworks-Info.plist b/examples/01_twoScreens/openFrameworks-Info.plist similarity index 100% rename from 01_twoScreens/openFrameworks-Info.plist rename to examples/01_twoScreens/openFrameworks-Info.plist diff --git a/01_twoScreens/src/main.cpp b/examples/01_twoScreens/src/main.cpp similarity index 100% rename from 01_twoScreens/src/main.cpp rename to examples/01_twoScreens/src/main.cpp diff --git a/01_twoScreens/src/testApp.cpp b/examples/01_twoScreens/src/testApp.cpp similarity index 100% rename from 01_twoScreens/src/testApp.cpp rename to examples/01_twoScreens/src/testApp.cpp diff --git a/01_twoScreens/src/testApp.h b/examples/01_twoScreens/src/testApp.h similarity index 100% rename from 01_twoScreens/src/testApp.h rename to examples/01_twoScreens/src/testApp.h diff --git a/01_twoScreens/twoScreens.cbp b/examples/01_twoScreens/twoScreens.cbp similarity index 100% rename from 01_twoScreens/twoScreens.cbp rename to examples/01_twoScreens/twoScreens.cbp diff --git a/01_twoScreens/twoScreens.vcxproj b/examples/01_twoScreens/twoScreens.vcxproj similarity index 100% rename from 01_twoScreens/twoScreens.vcxproj rename to examples/01_twoScreens/twoScreens.vcxproj diff --git a/01_twoScreens/twoScreens.vcxproj.filters b/examples/01_twoScreens/twoScreens.vcxproj.filters similarity index 100% rename from 01_twoScreens/twoScreens.vcxproj.filters rename to examples/01_twoScreens/twoScreens.vcxproj.filters diff --git a/01_twoScreens/twoScreens.vcxproj.user b/examples/01_twoScreens/twoScreens.vcxproj.user similarity index 100% rename from 01_twoScreens/twoScreens.vcxproj.user rename to examples/01_twoScreens/twoScreens.vcxproj.user diff --git a/01_twoScreens/twoScreens.workspace b/examples/01_twoScreens/twoScreens.workspace similarity index 100% rename from 01_twoScreens/twoScreens.workspace rename to examples/01_twoScreens/twoScreens.workspace diff --git a/01_twoScreens/twoScreens.xcodeproj/project.pbxproj b/examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj similarity index 100% rename from 01_twoScreens/twoScreens.xcodeproj/project.pbxproj rename to examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj diff --git a/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Debug.xcscheme b/examples/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Debug.xcscheme similarity index 100% rename from 01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Debug.xcscheme rename to examples/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Debug.xcscheme diff --git a/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Release.xcscheme b/examples/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Release.xcscheme similarity index 100% rename from 01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Release.xcscheme rename to examples/01_twoScreens/twoScreens.xcodeproj/xcshareddata/xcschemes/twoScreens Release.xcscheme diff --git a/02_threeVertical/Project.xcconfig b/examples/02_threeVertical/Project.xcconfig similarity index 100% rename from 02_threeVertical/Project.xcconfig rename to examples/02_threeVertical/Project.xcconfig diff --git a/02_threeVertical/addons.make b/examples/02_threeVertical/addons.make similarity index 100% rename from 02_threeVertical/addons.make rename to examples/02_threeVertical/addons.make diff --git a/02_threeVertical/bin/data/.gitkeep b/examples/02_threeVertical/bin/data/.gitkeep similarity index 100% rename from 02_threeVertical/bin/data/.gitkeep rename to examples/02_threeVertical/bin/data/.gitkeep diff --git a/02_threeVertical/openFrameworks-Info.plist b/examples/02_threeVertical/openFrameworks-Info.plist similarity index 100% rename from 02_threeVertical/openFrameworks-Info.plist rename to examples/02_threeVertical/openFrameworks-Info.plist diff --git a/02_threeVertical/src/main.cpp b/examples/02_threeVertical/src/main.cpp similarity index 100% rename from 02_threeVertical/src/main.cpp rename to examples/02_threeVertical/src/main.cpp diff --git a/02_threeVertical/src/testApp.cpp b/examples/02_threeVertical/src/testApp.cpp similarity index 100% rename from 02_threeVertical/src/testApp.cpp rename to examples/02_threeVertical/src/testApp.cpp diff --git a/02_threeVertical/src/testApp.h b/examples/02_threeVertical/src/testApp.h similarity index 100% rename from 02_threeVertical/src/testApp.h rename to examples/02_threeVertical/src/testApp.h diff --git a/02_threeVertical/threeVertical.cbp b/examples/02_threeVertical/threeVertical.cbp similarity index 100% rename from 02_threeVertical/threeVertical.cbp rename to examples/02_threeVertical/threeVertical.cbp diff --git a/02_threeVertical/threeVertical.sln b/examples/02_threeVertical/threeVertical.sln similarity index 100% rename from 02_threeVertical/threeVertical.sln rename to examples/02_threeVertical/threeVertical.sln diff --git a/02_threeVertical/threeVertical.vcxproj b/examples/02_threeVertical/threeVertical.vcxproj similarity index 100% rename from 02_threeVertical/threeVertical.vcxproj rename to examples/02_threeVertical/threeVertical.vcxproj diff --git a/02_threeVertical/threeVertical.vcxproj.filters b/examples/02_threeVertical/threeVertical.vcxproj.filters similarity index 100% rename from 02_threeVertical/threeVertical.vcxproj.filters rename to examples/02_threeVertical/threeVertical.vcxproj.filters diff --git a/02_threeVertical/threeVertical.vcxproj.user b/examples/02_threeVertical/threeVertical.vcxproj.user similarity index 100% rename from 02_threeVertical/threeVertical.vcxproj.user rename to examples/02_threeVertical/threeVertical.vcxproj.user diff --git a/02_threeVertical/threeVertical.workspace b/examples/02_threeVertical/threeVertical.workspace similarity index 100% rename from 02_threeVertical/threeVertical.workspace rename to examples/02_threeVertical/threeVertical.workspace diff --git a/02_threeVertical/threeVertical.xcodeproj/project.pbxproj b/examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj similarity index 100% rename from 02_threeVertical/threeVertical.xcodeproj/project.pbxproj rename to examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj diff --git a/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Debug.xcscheme b/examples/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Debug.xcscheme similarity index 100% rename from 02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Debug.xcscheme rename to examples/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Debug.xcscheme diff --git a/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Release.xcscheme b/examples/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Release.xcscheme similarity index 100% rename from 02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Release.xcscheme rename to examples/02_threeVertical/threeVertical.xcodeproj/xcshareddata/xcschemes/threeVertical Release.xcscheme diff --git a/03_guiControls/Project.xcconfig b/examples/03_guiControls/Project.xcconfig similarity index 100% rename from 03_guiControls/Project.xcconfig rename to examples/03_guiControls/Project.xcconfig diff --git a/03_guiControls/addons.make b/examples/03_guiControls/addons.make similarity index 100% rename from 03_guiControls/addons.make rename to examples/03_guiControls/addons.make diff --git a/03_guiControls/bin/data/.gitkeep b/examples/03_guiControls/bin/data/.gitkeep similarity index 100% rename from 03_guiControls/bin/data/.gitkeep rename to examples/03_guiControls/bin/data/.gitkeep diff --git a/03_guiControls/bin/data/_settings.xml b/examples/03_guiControls/bin/data/_settings.xml similarity index 100% rename from 03_guiControls/bin/data/_settings.xml rename to examples/03_guiControls/bin/data/_settings.xml diff --git a/03_guiControls/guiControls.cbp b/examples/03_guiControls/guiControls.cbp similarity index 100% rename from 03_guiControls/guiControls.cbp rename to examples/03_guiControls/guiControls.cbp diff --git a/03_guiControls/guiControls.sln b/examples/03_guiControls/guiControls.sln similarity index 100% rename from 03_guiControls/guiControls.sln rename to examples/03_guiControls/guiControls.sln diff --git a/03_guiControls/guiControls.vcxproj b/examples/03_guiControls/guiControls.vcxproj similarity index 100% rename from 03_guiControls/guiControls.vcxproj rename to examples/03_guiControls/guiControls.vcxproj diff --git a/03_guiControls/guiControls.vcxproj.filters b/examples/03_guiControls/guiControls.vcxproj.filters similarity index 100% rename from 03_guiControls/guiControls.vcxproj.filters rename to examples/03_guiControls/guiControls.vcxproj.filters diff --git a/03_guiControls/guiControls.vcxproj.user b/examples/03_guiControls/guiControls.vcxproj.user similarity index 100% rename from 03_guiControls/guiControls.vcxproj.user rename to examples/03_guiControls/guiControls.vcxproj.user diff --git a/03_guiControls/guiControls.workspace b/examples/03_guiControls/guiControls.workspace similarity index 100% rename from 03_guiControls/guiControls.workspace rename to examples/03_guiControls/guiControls.workspace diff --git a/03_guiControls/guiControls.xcodeproj/project.pbxproj b/examples/03_guiControls/guiControls.xcodeproj/project.pbxproj similarity index 100% rename from 03_guiControls/guiControls.xcodeproj/project.pbxproj rename to examples/03_guiControls/guiControls.xcodeproj/project.pbxproj diff --git a/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Debug.xcscheme b/examples/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Debug.xcscheme similarity index 100% rename from 03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Debug.xcscheme rename to examples/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Debug.xcscheme diff --git a/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Release.xcscheme b/examples/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Release.xcscheme similarity index 100% rename from 03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Release.xcscheme rename to examples/03_guiControls/guiControls.xcodeproj/xcshareddata/xcschemes/guiControls Release.xcscheme diff --git a/03_guiControls/openFrameworks-Info.plist b/examples/03_guiControls/openFrameworks-Info.plist similarity index 100% rename from 03_guiControls/openFrameworks-Info.plist rename to examples/03_guiControls/openFrameworks-Info.plist diff --git a/03_guiControls/src/main.cpp b/examples/03_guiControls/src/main.cpp similarity index 100% rename from 03_guiControls/src/main.cpp rename to examples/03_guiControls/src/main.cpp diff --git a/03_guiControls/src/testApp.cpp b/examples/03_guiControls/src/testApp.cpp similarity index 100% rename from 03_guiControls/src/testApp.cpp rename to examples/03_guiControls/src/testApp.cpp diff --git a/03_guiControls/src/testApp.h b/examples/03_guiControls/src/testApp.h similarity index 100% rename from 03_guiControls/src/testApp.h rename to examples/03_guiControls/src/testApp.h diff --git a/04_blendClown/Project.xcconfig b/examples/04_blendClown/Project.xcconfig similarity index 100% rename from 04_blendClown/Project.xcconfig rename to examples/04_blendClown/Project.xcconfig diff --git a/04_blendClown/addons.make b/examples/04_blendClown/addons.make similarity index 100% rename from 04_blendClown/addons.make rename to examples/04_blendClown/addons.make diff --git a/04_blendClown/bin/data/.gitkeep b/examples/04_blendClown/bin/data/.gitkeep similarity index 100% rename from 04_blendClown/bin/data/.gitkeep rename to examples/04_blendClown/bin/data/.gitkeep diff --git a/04_blendClown/bin/data/blendClown.png b/examples/04_blendClown/bin/data/blendClown.png similarity index 100% rename from 04_blendClown/bin/data/blendClown.png rename to examples/04_blendClown/bin/data/blendClown.png diff --git a/04_blendClown/bin/data/blendClown.psd b/examples/04_blendClown/bin/data/blendClown.psd similarity index 100% rename from 04_blendClown/bin/data/blendClown.psd rename to examples/04_blendClown/bin/data/blendClown.psd diff --git a/04_blendClown/blendClown.cbp b/examples/04_blendClown/blendClown.cbp similarity index 100% rename from 04_blendClown/blendClown.cbp rename to examples/04_blendClown/blendClown.cbp diff --git a/04_blendClown/blendClown.sln b/examples/04_blendClown/blendClown.sln similarity index 100% rename from 04_blendClown/blendClown.sln rename to examples/04_blendClown/blendClown.sln diff --git a/04_blendClown/blendClown.vcxproj b/examples/04_blendClown/blendClown.vcxproj similarity index 100% rename from 04_blendClown/blendClown.vcxproj rename to examples/04_blendClown/blendClown.vcxproj diff --git a/04_blendClown/blendClown.vcxproj.filters b/examples/04_blendClown/blendClown.vcxproj.filters similarity index 100% rename from 04_blendClown/blendClown.vcxproj.filters rename to examples/04_blendClown/blendClown.vcxproj.filters diff --git a/04_blendClown/blendClown.vcxproj.user b/examples/04_blendClown/blendClown.vcxproj.user similarity index 100% rename from 04_blendClown/blendClown.vcxproj.user rename to examples/04_blendClown/blendClown.vcxproj.user diff --git a/04_blendClown/blendClown.workspace b/examples/04_blendClown/blendClown.workspace similarity index 100% rename from 04_blendClown/blendClown.workspace rename to examples/04_blendClown/blendClown.workspace diff --git a/04_blendClown/blendClown.xcodeproj/project.pbxproj b/examples/04_blendClown/blendClown.xcodeproj/project.pbxproj similarity index 100% rename from 04_blendClown/blendClown.xcodeproj/project.pbxproj rename to examples/04_blendClown/blendClown.xcodeproj/project.pbxproj diff --git a/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Debug.xcscheme b/examples/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Debug.xcscheme similarity index 100% rename from 04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Debug.xcscheme rename to examples/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Debug.xcscheme diff --git a/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Release.xcscheme b/examples/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Release.xcscheme similarity index 100% rename from 04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Release.xcscheme rename to examples/04_blendClown/blendClown.xcodeproj/xcshareddata/xcschemes/blendClown Release.xcscheme diff --git a/04_blendClown/openFrameworks-Info.plist b/examples/04_blendClown/openFrameworks-Info.plist similarity index 100% rename from 04_blendClown/openFrameworks-Info.plist rename to examples/04_blendClown/openFrameworks-Info.plist diff --git a/04_blendClown/src/main.cpp b/examples/04_blendClown/src/main.cpp similarity index 100% rename from 04_blendClown/src/main.cpp rename to examples/04_blendClown/src/main.cpp diff --git a/04_blendClown/src/testApp.cpp b/examples/04_blendClown/src/testApp.cpp similarity index 100% rename from 04_blendClown/src/testApp.cpp rename to examples/04_blendClown/src/testApp.cpp diff --git a/04_blendClown/src/testApp.h b/examples/04_blendClown/src/testApp.h similarity index 100% rename from 04_blendClown/src/testApp.h rename to examples/04_blendClown/src/testApp.h From 97a97bf5e0c9ec283e706cdecebb58f0bdfb7623 Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 13:21:26 +0100 Subject: [PATCH 2/9] Renamed project files to the new ofApp instead of testApp --- examples/01_twoScreens/src/main.cpp | 4 +- .../src/{testApp.cpp => ofApp.cpp} | 50 +++++++++---------- .../01_twoScreens/src/{testApp.h => ofApp.h} | 6 +-- examples/01_twoScreens/twoScreens.cbp | 4 +- examples/01_twoScreens/twoScreens.vcxproj | 4 +- .../01_twoScreens/twoScreens.vcxproj.filters | 4 +- .../twoScreens.xcodeproj/project.pbxproj | 12 ++--- examples/02_threeVertical/src/main.cpp | 4 +- .../src/{testApp.cpp => ofApp.cpp} | 50 +++++++++---------- .../src/{testApp.h => ofApp.h} | 4 +- examples/02_threeVertical/threeVertical.cbp | 4 +- .../02_threeVertical/threeVertical.vcxproj | 4 +- .../threeVertical.vcxproj.filters | 4 +- .../threeVertical.xcodeproj/project.pbxproj | 12 ++--- examples/03_guiControls/guiControls.cbp | 4 +- examples/03_guiControls/guiControls.vcxproj | 4 +- .../guiControls.vcxproj.filters | 4 +- .../guiControls.xcodeproj/project.pbxproj | 12 ++--- examples/03_guiControls/src/main.cpp | 4 +- .../src/{testApp.cpp => ofApp.cpp} | 44 ++++++++-------- .../03_guiControls/src/{testApp.h => ofApp.h} | 4 +- examples/04_blendClown/blendClown.cbp | 4 +- examples/04_blendClown/blendClown.vcxproj | 4 +- .../04_blendClown/blendClown.vcxproj.filters | 4 +- .../blendClown.xcodeproj/project.pbxproj | 12 ++--- examples/04_blendClown/src/main.cpp | 4 +- .../src/{testApp.cpp => ofApp.cpp} | 50 +++++++++---------- .../04_blendClown/src/{testApp.h => ofApp.h} | 4 +- 28 files changed, 162 insertions(+), 162 deletions(-) rename examples/01_twoScreens/src/{testApp.cpp => ofApp.cpp} (83%) rename examples/01_twoScreens/src/{testApp.h => ofApp.h} (95%) rename examples/02_threeVertical/src/{testApp.cpp => ofApp.cpp} (85%) rename examples/02_threeVertical/src/{testApp.h => ofApp.h} (93%) rename examples/03_guiControls/src/{testApp.cpp => ofApp.cpp} (80%) rename examples/03_guiControls/src/{testApp.h => ofApp.h} (94%) rename examples/04_blendClown/src/{testApp.cpp => ofApp.cpp} (85%) rename examples/04_blendClown/src/{testApp.h => ofApp.h} (94%) diff --git a/examples/01_twoScreens/src/main.cpp b/examples/01_twoScreens/src/main.cpp index 2b66fd1..a48484d 100644 --- a/examples/01_twoScreens/src/main.cpp +++ b/examples/01_twoScreens/src/main.cpp @@ -1,5 +1,5 @@ #include "ofMain.h" -#include "testApp.h" +#include "ofApp.h" #include "ofAppGlutWindow.h" //======================================================================== @@ -11,6 +11,6 @@ int main( ){ // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: - ofRunApp( new testApp()); + ofRunApp( new ofApp()); } diff --git a/examples/01_twoScreens/src/testApp.cpp b/examples/01_twoScreens/src/ofApp.cpp similarity index 83% rename from examples/01_twoScreens/src/testApp.cpp rename to examples/01_twoScreens/src/ofApp.cpp index ce08ed0..1fa261c 100644 --- a/examples/01_twoScreens/src/testApp.cpp +++ b/examples/01_twoScreens/src/ofApp.cpp @@ -1,46 +1,46 @@ -#include "testApp.h" +#include "ofApp.h" //-------------------------------------------------------------- -void testApp::setup(){ +void ofApp::setup(){ blender.setup(PROJECTOR_WIDTH, PROJECTOR_HEIGHT, PROJECTOR_COUNT, PIXEL_OVERLAP); blender.gamma[0] = .5; blender.blendPower[0] = 1; blender.luminance[0] = 0; - + cout << "canvas size: " << blender.getCanvasWidth() << " x " << blender.getCanvasHeight() << endl; cout << "display size: " << blender.getDisplayWidth() << " x " << blender.getDisplayHeight() << endl; - + ofSetWindowShape(blender.getDisplayWidth(), blender.getDisplayHeight()); } //-------------------------------------------------------------- -void testApp::update(){ +void ofApp::update(){ } //-------------------------------------------------------------- -void testApp::draw() { - +void ofApp::draw() { + blender.begin(); //call blender.begin() to draw onto the blendable canvas { //light gray backaground ofSetColor(100, 100, 100); ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); - + //thick grid lines for blending ofSetColor(255, 255, 255); ofSetLineWidth(3); - + //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ ofLine(i, 0, i, blender.getCanvasHeight()); } - + //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ ofLine(0, j, blender.getCanvasWidth(), j); } - + //instructions ofSetColor(255, 255, 255); ofRect(10, 10, 300, 100); @@ -48,29 +48,29 @@ void testApp::draw() { ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } blender.end(); //call when you are finished drawing - - + + //this draws to the main window blender.draw(); } //-------------------------------------------------------------- -void testApp::keyPressed(int key){ +void ofApp::keyPressed(int key){ } //-------------------------------------------------------------- -void testApp::keyReleased(int key){ - +void ofApp::keyReleased(int key){ + //hit spacebar to toggle the blending strip if(key == ' '){ //toggling this variable effects whether the blend strip is shown blender.showBlend = !blender.showBlend; } - + // more info here on what these variables do // http://local.wasp.uwa.edu.au/~pbourke/texture_colour/edgeblend/ - + else if(key == 'g'){ blender.gamma[0] -= .05; } @@ -92,36 +92,36 @@ void testApp::keyReleased(int key){ } //-------------------------------------------------------------- -void testApp::mouseMoved(int x, int y ){ +void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- -void testApp::mouseDragged(int x, int y, int button){ +void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mousePressed(int x, int y, int button){ +void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mouseReleased(int x, int y, int button){ +void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::windowResized(int w, int h){ +void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- -void testApp::gotMessage(ofMessage msg){ +void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- -void testApp::dragEvent(ofDragInfo dragInfo){ +void ofApp::dragEvent(ofDragInfo dragInfo){ } \ No newline at end of file diff --git a/examples/01_twoScreens/src/testApp.h b/examples/01_twoScreens/src/ofApp.h similarity index 95% rename from examples/01_twoScreens/src/testApp.h rename to examples/01_twoScreens/src/ofApp.h index 918e905..a07a1a8 100644 --- a/examples/01_twoScreens/src/testApp.h +++ b/examples/01_twoScreens/src/ofApp.h @@ -2,7 +2,7 @@ /** * - * testApp.h + * ofApp.h * * ofxProjectorBlend sample project * @@ -25,7 +25,7 @@ #define PROJECTOR_HEIGHT 480 #define PIXEL_OVERLAP 40 -class testApp : public ofBaseApp{ +class ofApp : public ofBaseApp{ public: void setup(); @@ -41,6 +41,6 @@ class testApp : public ofBaseApp{ void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - + ofxProjectorBlend blender; }; diff --git a/examples/01_twoScreens/twoScreens.cbp b/examples/01_twoScreens/twoScreens.cbp index 1c77c75..61cb342 100644 --- a/examples/01_twoScreens/twoScreens.cbp +++ b/examples/01_twoScreens/twoScreens.cbp @@ -115,10 +115,10 @@ - + - + diff --git a/examples/01_twoScreens/twoScreens.vcxproj b/examples/01_twoScreens/twoScreens.vcxproj index 7bb9978..2564e13 100644 --- a/examples/01_twoScreens/twoScreens.vcxproj +++ b/examples/01_twoScreens/twoScreens.vcxproj @@ -99,11 +99,11 @@ - + - + diff --git a/examples/01_twoScreens/twoScreens.vcxproj.filters b/examples/01_twoScreens/twoScreens.vcxproj.filters index b7775e9..458f401 100644 --- a/examples/01_twoScreens/twoScreens.vcxproj.filters +++ b/examples/01_twoScreens/twoScreens.vcxproj.filters @@ -1,7 +1,7 @@ - + src @@ -26,7 +26,7 @@ - + src diff --git a/examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj b/examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj index d681de8..9472459 100644 --- a/examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj +++ b/examples/01_twoScreens/twoScreens.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; @@ -77,8 +77,8 @@ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; E4B69B5B0A3A1756003C02F2 /* twoScreensDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = twoScreensDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; @@ -208,8 +208,8 @@ isa = PBXGroup; children = ( E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, ); path = src; sourceTree = SOURCE_ROOT; @@ -308,7 +308,7 @@ buildActionMask = 2147483647; files = ( E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 95e7ef0d58b6654ee78aa86474800394 /* ofxProjectorBlend.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/examples/02_threeVertical/src/main.cpp b/examples/02_threeVertical/src/main.cpp index 6a32c6a..6c04362 100644 --- a/examples/02_threeVertical/src/main.cpp +++ b/examples/02_threeVertical/src/main.cpp @@ -1,5 +1,5 @@ #include "ofMain.h" -#include "testApp.h" +#include "ofApp.h" #include "ofAppGlutWindow.h" //======================================================================== @@ -11,6 +11,6 @@ int main( ){ // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: - ofRunApp( new testApp()); + ofRunApp( new ofApp()); } diff --git a/examples/02_threeVertical/src/testApp.cpp b/examples/02_threeVertical/src/ofApp.cpp similarity index 85% rename from examples/02_threeVertical/src/testApp.cpp rename to examples/02_threeVertical/src/ofApp.cpp index d5d8943..ffe7882 100644 --- a/examples/02_threeVertical/src/testApp.cpp +++ b/examples/02_threeVertical/src/ofApp.cpp @@ -1,14 +1,14 @@ -#include "testApp.h" +#include "ofApp.h" //-------------------------------------------------------------- -void testApp::setup(){ +void ofApp::setup(){ ofSetFrameRate(60); ofSetVerticalSync(true); - - + + blender.setup(640, 480, 3, 20, ofxProjectorBlend_Vertical); blender.setWindowToDisplaySize(); - + radius = 40; pos.x = ofRandom(radius, blender.getCanvasWidth()-radius); pos.y = ofRandom(radius, blender.getCanvasHeight()-radius); @@ -16,7 +16,7 @@ void testApp::setup(){ } //-------------------------------------------------------------- -void testApp::update(){ +void ofApp::update(){ pos += vel; if(pos.x > blender.getCanvasWidth()-radius) { @@ -38,30 +38,30 @@ void testApp::update(){ } //-------------------------------------------------------------- -void testApp::draw(){ +void ofApp::draw(){ blender.begin(); //call blender.begin() to draw onto the blendable canvas { //light gray backaground ofSetColor(100, 100, 100); ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); - + //thick grid lines for blending ofSetColor(255, 255, 255); ofSetLineWidth(3); - + //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ ofLine(i, 0, i, blender.getCanvasHeight()); } - + //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ ofLine(0, j, blender.getCanvasWidth(), j); } - + ofSetColor(255, 0, 0); ofCircle(pos, radius); - + //instructions ofSetColor(255, 255, 255); ofRect(10, 10, 300, 100); @@ -69,28 +69,28 @@ void testApp::draw(){ ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } blender.end(); //call when you are finished drawing - - + + //this draws to the main window blender.draw(); } //-------------------------------------------------------------- -void testApp::keyPressed(int key){ +void ofApp::keyPressed(int key){ } //-------------------------------------------------------------- -void testApp::keyReleased(int key){ +void ofApp::keyReleased(int key){ //hit spacebar to toggle the blending strip if(key == ' '){ //toggling this variable effects whether the blend strip is shown blender.showBlend = !blender.showBlend; } - + // more info here on what these variables do // http://local.wasp.uwa.edu.au/~pbourke/texture_colour/edgeblend/ - + else if(key == 'g'){ blender.gamma[0] -= .05; blender.gamma[1] -= .05; @@ -118,36 +118,36 @@ void testApp::keyReleased(int key){ } //-------------------------------------------------------------- -void testApp::mouseMoved(int x, int y ){ +void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- -void testApp::mouseDragged(int x, int y, int button){ +void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mousePressed(int x, int y, int button){ +void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mouseReleased(int x, int y, int button){ +void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::windowResized(int w, int h){ +void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- -void testApp::gotMessage(ofMessage msg){ +void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- -void testApp::dragEvent(ofDragInfo dragInfo){ +void ofApp::dragEvent(ofDragInfo dragInfo){ } \ No newline at end of file diff --git a/examples/02_threeVertical/src/testApp.h b/examples/02_threeVertical/src/ofApp.h similarity index 93% rename from examples/02_threeVertical/src/testApp.h rename to examples/02_threeVertical/src/ofApp.h index 3406610..d8e91dd 100644 --- a/examples/02_threeVertical/src/testApp.h +++ b/examples/02_threeVertical/src/ofApp.h @@ -3,7 +3,7 @@ #include "ofMain.h" #include "ofxProjectorBlend.h" -class testApp : public ofBaseApp{ +class ofApp : public ofBaseApp{ public: void setup(); @@ -19,7 +19,7 @@ class testApp : public ofBaseApp{ void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - + ofxProjectorBlend blender; ofPoint pos, vel; float radius; diff --git a/examples/02_threeVertical/threeVertical.cbp b/examples/02_threeVertical/threeVertical.cbp index 011eab5..aeb82d7 100644 --- a/examples/02_threeVertical/threeVertical.cbp +++ b/examples/02_threeVertical/threeVertical.cbp @@ -115,10 +115,10 @@ - + - + diff --git a/examples/02_threeVertical/threeVertical.vcxproj b/examples/02_threeVertical/threeVertical.vcxproj index 16aae3a..3c1ed65 100644 --- a/examples/02_threeVertical/threeVertical.vcxproj +++ b/examples/02_threeVertical/threeVertical.vcxproj @@ -99,11 +99,11 @@ - + - + diff --git a/examples/02_threeVertical/threeVertical.vcxproj.filters b/examples/02_threeVertical/threeVertical.vcxproj.filters index b7775e9..458f401 100644 --- a/examples/02_threeVertical/threeVertical.vcxproj.filters +++ b/examples/02_threeVertical/threeVertical.vcxproj.filters @@ -1,7 +1,7 @@ - + src @@ -26,7 +26,7 @@ - + src diff --git a/examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj b/examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj index 6d21f6f..e5efe8c 100644 --- a/examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj +++ b/examples/02_threeVertical/threeVertical.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; @@ -76,8 +76,8 @@ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; E4B69B5B0A3A1756003C02F2 /* threeVerticalDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = threeVerticalDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; @@ -208,8 +208,8 @@ isa = PBXGroup; children = ( E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, ); path = src; sourceTree = SOURCE_ROOT; @@ -308,7 +308,7 @@ buildActionMask = 2147483647; files = ( E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 95e7ef0d58b6654ee78aa86474800394 /* ofxProjectorBlend.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/examples/03_guiControls/guiControls.cbp b/examples/03_guiControls/guiControls.cbp index 448e833..2035c0f 100644 --- a/examples/03_guiControls/guiControls.cbp +++ b/examples/03_guiControls/guiControls.cbp @@ -126,10 +126,10 @@ - + - + diff --git a/examples/03_guiControls/guiControls.vcxproj b/examples/03_guiControls/guiControls.vcxproj index 8dbdca7..ed5efd9 100644 --- a/examples/03_guiControls/guiControls.vcxproj +++ b/examples/03_guiControls/guiControls.vcxproj @@ -99,7 +99,7 @@ - + @@ -123,7 +123,7 @@ - + diff --git a/examples/03_guiControls/guiControls.vcxproj.filters b/examples/03_guiControls/guiControls.vcxproj.filters index 74782da..e33ddb2 100644 --- a/examples/03_guiControls/guiControls.vcxproj.filters +++ b/examples/03_guiControls/guiControls.vcxproj.filters @@ -1,7 +1,7 @@ - + src @@ -110,7 +110,7 @@ - + src diff --git a/examples/03_guiControls/guiControls.xcodeproj/project.pbxproj b/examples/03_guiControls/guiControls.xcodeproj/project.pbxproj index 32099b7..d0014bc 100644 --- a/examples/03_guiControls/guiControls.xcodeproj/project.pbxproj +++ b/examples/03_guiControls/guiControls.xcodeproj/project.pbxproj @@ -35,7 +35,7 @@ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; @@ -119,8 +119,8 @@ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; E4B69B5B0A3A1756003C02F2 /* guiControlsDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = guiControlsDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; @@ -368,8 +368,8 @@ isa = PBXGroup; children = ( E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, ); path = src; sourceTree = SOURCE_ROOT; @@ -476,7 +476,7 @@ buildActionMask = 2147483647; files = ( E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 63b57ac5bf4ef088491e0317dbb2ecaa /* ofxXmlSettings.cpp in Sources */, 933a2227713c720ceff80fd967d0a8ee /* tinyxml.cpp in Sources */, 9d44dc88ef9e7991b4a09951e2e4769f /* tinyxmlerror.cpp in Sources */, diff --git a/examples/03_guiControls/src/main.cpp b/examples/03_guiControls/src/main.cpp index 6a32c6a..6c04362 100644 --- a/examples/03_guiControls/src/main.cpp +++ b/examples/03_guiControls/src/main.cpp @@ -1,5 +1,5 @@ #include "ofMain.h" -#include "testApp.h" +#include "ofApp.h" #include "ofAppGlutWindow.h" //======================================================================== @@ -11,6 +11,6 @@ int main( ){ // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: - ofRunApp( new testApp()); + ofRunApp( new ofApp()); } diff --git a/examples/03_guiControls/src/testApp.cpp b/examples/03_guiControls/src/ofApp.cpp similarity index 80% rename from examples/03_guiControls/src/testApp.cpp rename to examples/03_guiControls/src/ofApp.cpp index b16f834..f4fb520 100644 --- a/examples/03_guiControls/src/testApp.cpp +++ b/examples/03_guiControls/src/ofApp.cpp @@ -1,12 +1,12 @@ -#include "testApp.h" +#include "ofApp.h" //-------------------------------------------------------------- -void testApp::setup(){ +void ofApp::setup(){ blender.setup(PROJECTOR_WIDTH, PROJECTOR_HEIGHT, PROJECTOR_COUNT, PIXEL_OVERLAP); blender.setWindowToDisplaySize(); - + gui.addToggle("Show Blend", blender.showBlend); for (int i=0; i - + - + diff --git a/examples/04_blendClown/blendClown.vcxproj b/examples/04_blendClown/blendClown.vcxproj index 25c9f66..cd4ce83 100644 --- a/examples/04_blendClown/blendClown.vcxproj +++ b/examples/04_blendClown/blendClown.vcxproj @@ -99,11 +99,11 @@ - + - + diff --git a/examples/04_blendClown/blendClown.vcxproj.filters b/examples/04_blendClown/blendClown.vcxproj.filters index b7775e9..458f401 100644 --- a/examples/04_blendClown/blendClown.vcxproj.filters +++ b/examples/04_blendClown/blendClown.vcxproj.filters @@ -1,7 +1,7 @@ - + src @@ -26,7 +26,7 @@ - + src diff --git a/examples/04_blendClown/blendClown.xcodeproj/project.pbxproj b/examples/04_blendClown/blendClown.xcodeproj/project.pbxproj index 2bbf6d3..8ac3ce0 100644 --- a/examples/04_blendClown/blendClown.xcodeproj/project.pbxproj +++ b/examples/04_blendClown/blendClown.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; }; + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; @@ -76,8 +76,8 @@ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; E4B69B5B0A3A1756003C02F2 /* blendClownDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = blendClownDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; }; - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; }; + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; @@ -208,8 +208,8 @@ isa = PBXGroup; children = ( E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, - E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */, - E4B69E1F0A3A1BDC003C02F2 /* testApp.h */, + E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, + E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, ); path = src; sourceTree = SOURCE_ROOT; @@ -308,7 +308,7 @@ buildActionMask = 2147483647; files = ( E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, - E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */, + E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 95e7ef0d58b6654ee78aa86474800394 /* ofxProjectorBlend.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/examples/04_blendClown/src/main.cpp b/examples/04_blendClown/src/main.cpp index 6a32c6a..6c04362 100644 --- a/examples/04_blendClown/src/main.cpp +++ b/examples/04_blendClown/src/main.cpp @@ -1,5 +1,5 @@ #include "ofMain.h" -#include "testApp.h" +#include "ofApp.h" #include "ofAppGlutWindow.h" //======================================================================== @@ -11,6 +11,6 @@ int main( ){ // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: - ofRunApp( new testApp()); + ofRunApp( new ofApp()); } diff --git a/examples/04_blendClown/src/testApp.cpp b/examples/04_blendClown/src/ofApp.cpp similarity index 85% rename from examples/04_blendClown/src/testApp.cpp rename to examples/04_blendClown/src/ofApp.cpp index d0f2254..2cf5c65 100644 --- a/examples/04_blendClown/src/testApp.cpp +++ b/examples/04_blendClown/src/ofApp.cpp @@ -1,49 +1,49 @@ -#include "testApp.h" +#include "ofApp.h" //-------------------------------------------------------------- -void testApp::setup(){ +void ofApp::setup(){ blender.setup(PROJECTOR_WIDTH, PROJECTOR_HEIGHT, PROJECTOR_COUNT, PIXEL_OVERLAP); blender.setWindowToDisplaySize(); - + cout << "canvas size: " << blender.getCanvasWidth() << " x " << blender.getCanvasHeight() << endl; cout << "display size: " << blender.getDisplayWidth() << " x " << blender.getDisplayHeight() << endl; - + blendClown.loadImage("blendClown.png"); bDrawClown = false; } //-------------------------------------------------------------- -void testApp::update(){ +void ofApp::update(){ } //-------------------------------------------------------------- -void testApp::draw(){ +void ofApp::draw(){ blender.begin(); //call blender.begin() to draw onto the blendable canvas { //light gray backaground ofSetColor(100, 100, 100); ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); - + //thick grid lines for blending ofSetColor(255, 255, 255); ofSetLineWidth(3); - + //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ ofLine(i, 0, i, blender.getCanvasHeight()); } - + //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ ofLine(0, j, blender.getCanvasWidth(), j); } - + if(bDrawClown) { blendClown.draw(0, 0); } - + //instructions ofSetColor(255, 255, 255); ofRect(10, 10, 300, 100); @@ -55,31 +55,31 @@ void testApp::draw(){ instructions << "[l/L] - adjust luminance" << endl; instructions << "[c] - show/hide blend clown" << endl; ofDrawBitmapString(instructions.str(), 15, 35); - + } blender.end(); //call when you are finished drawing - - + + //this draws to the main window blender.draw(); } //-------------------------------------------------------------- -void testApp::keyPressed(int key){ +void ofApp::keyPressed(int key){ } //-------------------------------------------------------------- -void testApp::keyReleased(int key){ +void ofApp::keyReleased(int key){ //hit spacebar to toggle the blending strip if(key == ' '){ //toggling this variable effects whether the blend strip is shown blender.showBlend = !blender.showBlend; } - + // more info here on what these variables do // http://local.wasp.uwa.edu.au/~pbourke/texture_colour/edgeblend/ - + else if(key == 'g'){ blender.gamma[0] -= .05; blender.gamma[1] -= .05; @@ -109,36 +109,36 @@ void testApp::keyReleased(int key){ } //-------------------------------------------------------------- -void testApp::mouseMoved(int x, int y ){ +void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- -void testApp::mouseDragged(int x, int y, int button){ +void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mousePressed(int x, int y, int button){ +void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::mouseReleased(int x, int y, int button){ +void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- -void testApp::windowResized(int w, int h){ +void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- -void testApp::gotMessage(ofMessage msg){ +void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- -void testApp::dragEvent(ofDragInfo dragInfo){ +void ofApp::dragEvent(ofDragInfo dragInfo){ } \ No newline at end of file diff --git a/examples/04_blendClown/src/testApp.h b/examples/04_blendClown/src/ofApp.h similarity index 94% rename from examples/04_blendClown/src/testApp.h rename to examples/04_blendClown/src/ofApp.h index 1116366..4266fd5 100644 --- a/examples/04_blendClown/src/testApp.h +++ b/examples/04_blendClown/src/ofApp.h @@ -8,7 +8,7 @@ #define PROJECTOR_HEIGHT 480 #define PIXEL_OVERLAP 40 -class testApp : public ofBaseApp{ +class ofApp : public ofBaseApp{ public: void setup(); @@ -24,7 +24,7 @@ class testApp : public ofBaseApp{ void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - + ofxProjectorBlend blender; ofImage blendClown; bool bDrawClown; From 92be89a598a0eb62daf0764cf3a9697a27b0965b Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 13:23:11 +0100 Subject: [PATCH 3/9] Applies new functions names; ofRect -> ofDrawRectangle, etc. --- examples/01_twoScreens/src/ofApp.cpp | 8 +-- examples/02_threeVertical/src/ofApp.cpp | 10 +-- examples/03_guiControls/src/ofApp.cpp | 6 +- examples/04_blendClown/src/ofApp.cpp | 10 +-- src/ofxProjectorBlend.cpp | 96 ++++++++++++------------- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/examples/01_twoScreens/src/ofApp.cpp b/examples/01_twoScreens/src/ofApp.cpp index 1fa261c..aea508c 100644 --- a/examples/01_twoScreens/src/ofApp.cpp +++ b/examples/01_twoScreens/src/ofApp.cpp @@ -25,7 +25,7 @@ void ofApp::draw() { { //light gray backaground ofSetColor(100, 100, 100); - ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); //thick grid lines for blending ofSetColor(255, 255, 255); @@ -33,17 +33,17 @@ void ofApp::draw() { //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofLine(i, 0, i, blender.getCanvasHeight()); + ofDrawLine(i, 0, i, blender.getCanvasHeight()); } //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofLine(0, j, blender.getCanvasWidth(), j); + ofDrawLine(0, j, blender.getCanvasWidth(), j); } //instructions ofSetColor(255, 255, 255); - ofRect(10, 10, 300, 100); + ofDrawRectangle(10, 10, 300, 100); ofSetColor(0, 0, 0); ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } diff --git a/examples/02_threeVertical/src/ofApp.cpp b/examples/02_threeVertical/src/ofApp.cpp index ffe7882..1a271f0 100644 --- a/examples/02_threeVertical/src/ofApp.cpp +++ b/examples/02_threeVertical/src/ofApp.cpp @@ -43,7 +43,7 @@ void ofApp::draw(){ { //light gray backaground ofSetColor(100, 100, 100); - ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); //thick grid lines for blending ofSetColor(255, 255, 255); @@ -51,20 +51,20 @@ void ofApp::draw(){ //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofLine(i, 0, i, blender.getCanvasHeight()); + ofDrawLine(i, 0, i, blender.getCanvasHeight()); } //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofLine(0, j, blender.getCanvasWidth(), j); + ofDrawLine(0, j, blender.getCanvasWidth(), j); } ofSetColor(255, 0, 0); - ofCircle(pos, radius); + ofDrawCircle(pos, radius); //instructions ofSetColor(255, 255, 255); - ofRect(10, 10, 300, 100); + ofDrawRectangle(10, 10, 300, 100); ofSetColor(0, 0, 0); ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } diff --git a/examples/03_guiControls/src/ofApp.cpp b/examples/03_guiControls/src/ofApp.cpp index f4fb520..53d465e 100644 --- a/examples/03_guiControls/src/ofApp.cpp +++ b/examples/03_guiControls/src/ofApp.cpp @@ -31,7 +31,7 @@ void ofApp::draw(){ { //light gray backaground ofSetColor(100, 100, 100); - ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); //thick grid lines for blending ofSetColor(255, 255, 255); @@ -39,12 +39,12 @@ void ofApp::draw(){ //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofLine(i, 0, i, blender.getCanvasHeight()); + ofDrawLine(i, 0, i, blender.getCanvasHeight()); } //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofLine(0, j, blender.getCanvasWidth(), j); + ofDrawLine(0, j, blender.getCanvasWidth(), j); } } blender.end(); //call when you are finished drawing diff --git a/examples/04_blendClown/src/ofApp.cpp b/examples/04_blendClown/src/ofApp.cpp index 2cf5c65..cedfc3b 100644 --- a/examples/04_blendClown/src/ofApp.cpp +++ b/examples/04_blendClown/src/ofApp.cpp @@ -9,7 +9,7 @@ void ofApp::setup(){ cout << "canvas size: " << blender.getCanvasWidth() << " x " << blender.getCanvasHeight() << endl; cout << "display size: " << blender.getDisplayWidth() << " x " << blender.getDisplayHeight() << endl; - blendClown.loadImage("blendClown.png"); + blendClown.load("blendClown.png"); bDrawClown = false; } @@ -24,7 +24,7 @@ void ofApp::draw(){ { //light gray backaground ofSetColor(100, 100, 100); - ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); //thick grid lines for blending ofSetColor(255, 255, 255); @@ -32,12 +32,12 @@ void ofApp::draw(){ //vertical line for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofLine(i, 0, i, blender.getCanvasHeight()); + ofDrawLine(i, 0, i, blender.getCanvasHeight()); } //horizontal lines for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofLine(0, j, blender.getCanvasWidth(), j); + ofDrawLine(0, j, blender.getCanvasWidth(), j); } if(bDrawClown) { @@ -46,7 +46,7 @@ void ofApp::draw(){ //instructions ofSetColor(255, 255, 255); - ofRect(10, 10, 300, 100); + ofDrawRectangle(10, 10, 300, 100); ofSetColor(0, 0, 0); stringstream instructions; instructions << "SPACE - toggle show blend" << endl; diff --git a/src/ofxProjectorBlend.cpp b/src/ofxProjectorBlend.cpp index 6d939da..a7fbad1 100644 --- a/src/ofxProjectorBlend.cpp +++ b/src/ofxProjectorBlend.cpp @@ -18,38 +18,38 @@ ofxProjectorBlend::ofxProjectorBlend() // -------------------------------------------------- -void ofxProjectorBlend::setup(int resolutionWidth, - int resolutionHeight, - int _numProjectors, - int _pixelOverlap, - ofxProjectorBlendLayout _layout, +void ofxProjectorBlend::setup(int resolutionWidth, + int resolutionHeight, + int _numProjectors, + int _pixelOverlap, + ofxProjectorBlendLayout _layout, ofxProjectorBlendRotation _rotation) { string l = "horizontal"; if(layout==ofxProjectorBlend_Vertical) l = "vertical"; - + string r = "normal"; if(rotation==ofxProjectorBlend_RotatedLeft) r = "rotated left"; else if(rotation==ofxProjectorBlend_RotatedRight) r = "rotated right"; - + ofLog(OF_LOG_NOTICE, "ofxProjectorBlend: res: %d x %d * %d, overlap: %d pixels, layout: %s, rotation: %s\n", resolutionWidth, resolutionHeight, _numProjectors, _pixelOverlap, l.c_str(), r.c_str()); numProjectors = _numProjectors; layout = _layout; rotation = _rotation; - + if(numProjectors <= 0){ ofLog(OF_LOG_ERROR, "Cannot initialize with " + ofToString(this->numProjectors) + " projectors."); return; } - + //allow editing projector heights for(int i = 0; i < numProjectors; i++){ projectorHeightOffset.push_back( 0 ); } - + pixelOverlap = _pixelOverlap; - + if(rotation == ofxProjectorBlend_NoRotation) { singleChannelWidth = resolutionWidth; singleChannelHeight = resolutionHeight; @@ -58,7 +58,7 @@ void ofxProjectorBlend::setup(int resolutionWidth, singleChannelWidth = resolutionHeight; singleChannelHeight = resolutionWidth; } - + if(layout == ofxProjectorBlend_Vertical) { fullTextureWidth = singleChannelWidth; fullTextureHeight = singleChannelHeight*numProjectors - pixelOverlap*(numProjectors-1); @@ -70,18 +70,18 @@ void ofxProjectorBlend::setup(int resolutionWidth, ofLog(OF_LOG_ERROR, "ofxProjectorBlend: You have used an invalid ofxProjectorBlendLayout in ofxProjectorBlend::setup()"); return; } - - + + displayWidth = resolutionWidth*numProjectors; displayHeight = resolutionHeight; - + fullTexture.allocate(fullTextureWidth, fullTextureHeight, GL_RGB, 4); - + blendShader.unload(); blendShader.setupShaderFromSource(GL_FRAGMENT_SHADER, ofxProjectorBlendFragShader(numProjectors-1)); blendShader.setupShaderFromSource(GL_VERTEX_SHADER, ofxProjectorBlendVertShader); blendShader.linkProgram(); - + gamma.resize(numProjectors-1, 0.5); blendPower.resize(numProjectors-1, 1); luminance.resize(numProjectors-1, 0); @@ -90,9 +90,9 @@ void ofxProjectorBlend::setup(int resolutionWidth, // -------------------------------------------------- void ofxProjectorBlend::begin() { - + fullTexture.begin(); - + ofPushStyle(); ofClear(0,0,0,0); } @@ -117,7 +117,7 @@ void ofxProjectorBlend::moveDisplayVertical(unsigned int targetDisplay, int yOff ofLog(OF_LOG_ERROR, "targetDisplay (" + ofToString(targetDisplay) + ") is invalid."); return; } - + projectorHeightOffset[targetDisplay] += yOffset; } @@ -156,7 +156,7 @@ void ofxProjectorBlend::end() // -------------------------------------------------- void ofxProjectorBlend::updateShaderUniforms() { - + blendShader.setUniform1f("OverlapTop", 0.0f); blendShader.setUniform1f("OverlapLeft", 0.0f); blendShader.setUniform1f("OverlapBottom", 0.0f); @@ -165,7 +165,7 @@ void ofxProjectorBlend::updateShaderUniforms() blendShader.setUniform1fv("BlendPower", &blendPower[0], blendPower.size()); blendShader.setUniform1fv("SomeLuminanceControl", &luminance[0], luminance.size()); blendShader.setUniform1fv("GammaCorrection", &gamma[0], gamma.size()); - + blendShader.setUniform1f("projectors", this->numProjectors); blendShader.setUniform1f("threshold", threshold); } @@ -180,47 +180,47 @@ void ofxProjectorBlend::draw(float x, float y) { blendShader.begin(); blendShader.setUniform1f("width", singleChannelWidth); blendShader.setUniform1f("height", singleChannelHeight); - + updateShaderUniforms(); - + if(layout == ofxProjectorBlend_Horizontal) { - blendShader.setUniform1f("OverlapRight", pixelOverlap); + blendShader.setUniform1f("OverlapRight", pixelOverlap); } else { blendShader.setUniform1f("OverlapTop", pixelOverlap); } - - blendShader.setUniformTexture("Tex0", fullTexture.getTextureReference(), 0); - - + + blendShader.setUniformTexture("Tex0", fullTexture.getTexture(), 0); + + ofVec2f offset(0,0); glPushMatrix(); - + // loop through each projector and glTranslatef() to its position and draw. for(int i = 0; i < numProjectors; i++) { blendShader.setUniform2f("texCoordOffset", offset.x, offset.y); - + if(i==1) { // set the first edge if(layout == ofxProjectorBlend_Horizontal) { - blendShader.setUniform1f("OverlapLeft", pixelOverlap); + blendShader.setUniform1f("OverlapLeft", pixelOverlap); } else { blendShader.setUniform1f("OverlapBottom", pixelOverlap); } - + } // if we're at the end of the list of projectors, turn off the second edge's blend - + if(i+1 == numProjectors) { if(layout == ofxProjectorBlend_Horizontal) { - blendShader.setUniform1f("OverlapRight", 0); + blendShader.setUniform1f("OverlapRight", 0); } else { blendShader.setUniform1f("OverlapTop", 0); } } - + glPushMatrix(); { if(rotation == ofxProjectorBlend_RotatedRight) { glRotatef(90, 0, 0, 1); @@ -230,46 +230,46 @@ void ofxProjectorBlend::draw(float x, float y) { glRotatef(-90, 0, 0, 1); glTranslatef(-singleChannelWidth, 0, 0); } - + glTranslatef(0, (float)projectorHeightOffset[i], 0); - + glBegin(GL_QUADS); - + glTexCoord2f(0, 0); glVertex2f(0, 0); - + glTexCoord2f(singleChannelWidth, 0); glVertex2f(singleChannelWidth, 0); - + glTexCoord2f(singleChannelWidth, singleChannelHeight); glVertex2f(singleChannelWidth, singleChannelHeight); - + glTexCoord2f(0, singleChannelHeight); glVertex2f(0, singleChannelHeight); - + glEnd(); } glPopMatrix(); - + // move the texture offset and where we're drawing to. if(layout == ofxProjectorBlend_Horizontal) { offset.x += singleChannelWidth - pixelOverlap; } else { offset.y += singleChannelHeight - pixelOverlap; - + } - + if(rotation == ofxProjectorBlend_RotatedLeft || rotation == ofxProjectorBlend_RotatedRight) { glTranslatef(singleChannelHeight, 0, 0); } else { glTranslatef(singleChannelWidth, 0, 0); } - + } glPopMatrix(); - + blendShader.end(); } else { fullTexture.draw(x, y); From dacdb734c9294936c97a4fbed0141aa1a42b6713 Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 13:34:39 +0100 Subject: [PATCH 4/9] Adds makefiles for building on commandline --- examples/01_twoScreens/Makefile | 13 +++ examples/01_twoScreens/config.make | 141 ++++++++++++++++++++++++++ examples/02_threeVertical/Makefile | 13 +++ examples/02_threeVertical/config.make | 141 ++++++++++++++++++++++++++ examples/03_guiControls/Makefile | 13 +++ examples/03_guiControls/addons.make | 5 +- examples/03_guiControls/config.make | 141 ++++++++++++++++++++++++++ examples/04_blendClown/Makefile | 13 +++ examples/04_blendClown/config.make | 141 ++++++++++++++++++++++++++ 9 files changed, 619 insertions(+), 2 deletions(-) create mode 100644 examples/01_twoScreens/Makefile create mode 100644 examples/01_twoScreens/config.make create mode 100644 examples/02_threeVertical/Makefile create mode 100644 examples/02_threeVertical/config.make create mode 100644 examples/03_guiControls/Makefile create mode 100644 examples/03_guiControls/config.make create mode 100644 examples/04_blendClown/Makefile create mode 100644 examples/04_blendClown/config.make diff --git a/examples/01_twoScreens/Makefile b/examples/01_twoScreens/Makefile new file mode 100644 index 0000000..3d105d6 --- /dev/null +++ b/examples/01_twoScreens/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/examples/01_twoScreens/config.make b/examples/01_twoScreens/config.make new file mode 100644 index 0000000..836fce7 --- /dev/null +++ b/examples/01_twoScreens/config.make @@ -0,0 +1,141 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +# +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +################################################################################ +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/examples/02_threeVertical/Makefile b/examples/02_threeVertical/Makefile new file mode 100644 index 0000000..3d105d6 --- /dev/null +++ b/examples/02_threeVertical/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/examples/02_threeVertical/config.make b/examples/02_threeVertical/config.make new file mode 100644 index 0000000..836fce7 --- /dev/null +++ b/examples/02_threeVertical/config.make @@ -0,0 +1,141 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +# +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +################################################################################ +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/examples/03_guiControls/Makefile b/examples/03_guiControls/Makefile new file mode 100644 index 0000000..3d105d6 --- /dev/null +++ b/examples/03_guiControls/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/examples/03_guiControls/addons.make b/examples/03_guiControls/addons.make index f5f73e4..6e8b79b 100644 --- a/examples/03_guiControls/addons.make +++ b/examples/03_guiControls/addons.make @@ -1,4 +1,5 @@ -ofxXmlSettings -ofxMSAInteractiveObject ofxProjectorBlend ofxSimpleGuiToo +ofxSimpleButton +ofxXmlSettings +ofxMSAInteractiveObject diff --git a/examples/03_guiControls/config.make b/examples/03_guiControls/config.make new file mode 100644 index 0000000..836fce7 --- /dev/null +++ b/examples/03_guiControls/config.make @@ -0,0 +1,141 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +# +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +################################################################################ +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/examples/04_blendClown/Makefile b/examples/04_blendClown/Makefile new file mode 100644 index 0000000..3d105d6 --- /dev/null +++ b/examples/04_blendClown/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/examples/04_blendClown/config.make b/examples/04_blendClown/config.make new file mode 100644 index 0000000..836fce7 --- /dev/null +++ b/examples/04_blendClown/config.make @@ -0,0 +1,141 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +# +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +################################################################################ +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = From 098b8dbaa5c069c4482b9f3184f9fd915eb97bc5 Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 13:36:28 +0100 Subject: [PATCH 5/9] Converts all indents to tabs and removes unneeded whitespace --- examples/01_twoScreens/src/main.cpp | 2 +- examples/01_twoScreens/src/ofApp.cpp | 54 ++-- examples/01_twoScreens/src/ofApp.h | 2 +- examples/02_threeVertical/src/main.cpp | 2 +- examples/02_threeVertical/src/ofApp.cpp | 104 ++++---- examples/02_threeVertical/src/ofApp.h | 6 +- examples/03_guiControls/src/main.cpp | 2 +- examples/03_guiControls/src/ofApp.cpp | 62 ++--- examples/03_guiControls/src/ofApp.h | 2 +- examples/04_blendClown/src/main.cpp | 2 +- examples/04_blendClown/src/ofApp.cpp | 84 +++--- examples/04_blendClown/src/ofApp.h | 6 +- src/ofxProjectorBlend.cpp | 26 +- src/ofxProjectorBlend.h | 44 ++-- src/ofxProjectorBlendShader.h | 332 ++++++++++++------------ 15 files changed, 365 insertions(+), 365 deletions(-) diff --git a/examples/01_twoScreens/src/main.cpp b/examples/01_twoScreens/src/main.cpp index a48484d..2363a78 100644 --- a/examples/01_twoScreens/src/main.cpp +++ b/examples/01_twoScreens/src/main.cpp @@ -5,7 +5,7 @@ //======================================================================== int main( ){ - ofAppGlutWindow window; + ofAppGlutWindow window; ofSetupOpenGL(&window, 1280, 480, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app diff --git a/examples/01_twoScreens/src/ofApp.cpp b/examples/01_twoScreens/src/ofApp.cpp index aea508c..06a0fba 100644 --- a/examples/01_twoScreens/src/ofApp.cpp +++ b/examples/01_twoScreens/src/ofApp.cpp @@ -7,10 +7,10 @@ void ofApp::setup(){ blender.blendPower[0] = 1; blender.luminance[0] = 0; - cout << "canvas size: " << blender.getCanvasWidth() << " x " << blender.getCanvasHeight() << endl; - cout << "display size: " << blender.getDisplayWidth() << " x " << blender.getDisplayHeight() << endl; + cout << "canvas size: " << blender.getCanvasWidth() << " x " << blender.getCanvasHeight() << endl; + cout << "display size: " << blender.getDisplayWidth() << " x " << blender.getDisplayHeight() << endl; - ofSetWindowShape(blender.getDisplayWidth(), blender.getDisplayHeight()); + ofSetWindowShape(blender.getDisplayWidth(), blender.getDisplayHeight()); } //-------------------------------------------------------------- @@ -22,30 +22,30 @@ void ofApp::update(){ void ofApp::draw() { blender.begin(); //call blender.begin() to draw onto the blendable canvas - { - //light gray backaground - ofSetColor(100, 100, 100); - ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); - - //thick grid lines for blending - ofSetColor(255, 255, 255); - ofSetLineWidth(3); - - //vertical line - for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofDrawLine(i, 0, i, blender.getCanvasHeight()); - } - - //horizontal lines - for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofDrawLine(0, j, blender.getCanvasWidth(), j); - } - - //instructions - ofSetColor(255, 255, 255); - ofDrawRectangle(10, 10, 300, 100); - ofSetColor(0, 0, 0); - ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); + { + //light gray backaground + ofSetColor(100, 100, 100); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + + //thick grid lines for blending + ofSetColor(255, 255, 255); + ofSetLineWidth(3); + + //vertical line + for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ + ofDrawLine(i, 0, i, blender.getCanvasHeight()); + } + + //horizontal lines + for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ + ofDrawLine(0, j, blender.getCanvasWidth(), j); + } + + //instructions + ofSetColor(255, 255, 255); + ofDrawRectangle(10, 10, 300, 100); + ofSetColor(0, 0, 0); + ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } blender.end(); //call when you are finished drawing diff --git a/examples/01_twoScreens/src/ofApp.h b/examples/01_twoScreens/src/ofApp.h index a07a1a8..0a4add2 100644 --- a/examples/01_twoScreens/src/ofApp.h +++ b/examples/01_twoScreens/src/ofApp.h @@ -42,5 +42,5 @@ class ofApp : public ofBaseApp{ void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - ofxProjectorBlend blender; + ofxProjectorBlend blender; }; diff --git a/examples/02_threeVertical/src/main.cpp b/examples/02_threeVertical/src/main.cpp index 6c04362..aca145e 100644 --- a/examples/02_threeVertical/src/main.cpp +++ b/examples/02_threeVertical/src/main.cpp @@ -5,7 +5,7 @@ //======================================================================== int main( ){ - ofAppGlutWindow window; + ofAppGlutWindow window; ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app diff --git a/examples/02_threeVertical/src/ofApp.cpp b/examples/02_threeVertical/src/ofApp.cpp index 1a271f0..04babe9 100644 --- a/examples/02_threeVertical/src/ofApp.cpp +++ b/examples/02_threeVertical/src/ofApp.cpp @@ -2,71 +2,71 @@ //-------------------------------------------------------------- void ofApp::setup(){ - ofSetFrameRate(60); - ofSetVerticalSync(true); + ofSetFrameRate(60); + ofSetVerticalSync(true); - blender.setup(640, 480, 3, 20, ofxProjectorBlend_Vertical); - blender.setWindowToDisplaySize(); + blender.setup(640, 480, 3, 20, ofxProjectorBlend_Vertical); + blender.setWindowToDisplaySize(); - radius = 40; - pos.x = ofRandom(radius, blender.getCanvasWidth()-radius); - pos.y = ofRandom(radius, blender.getCanvasHeight()-radius); - vel.set(10, 10); + radius = 40; + pos.x = ofRandom(radius, blender.getCanvasWidth()-radius); + pos.y = ofRandom(radius, blender.getCanvasHeight()-radius); + vel.set(10, 10); } //-------------------------------------------------------------- void ofApp::update(){ - pos += vel; - if(pos.x > blender.getCanvasWidth()-radius) { - pos.x = blender.getCanvasWidth()-radius; - vel.x *= -1; - } - if(pos.x < radius) { - pos.x = radius; - vel.x *= -1; - } - if(pos.y > blender.getCanvasHeight()-radius) { - pos.y = blender.getCanvasHeight()-radius; - vel.y *= -1; - } - if(pos.y < radius) { - pos.y = radius; - vel.y *= -1; - } + pos += vel; + if(pos.x > blender.getCanvasWidth()-radius) { + pos.x = blender.getCanvasWidth()-radius; + vel.x *= -1; + } + if(pos.x < radius) { + pos.x = radius; + vel.x *= -1; + } + if(pos.y > blender.getCanvasHeight()-radius) { + pos.y = blender.getCanvasHeight()-radius; + vel.y *= -1; + } + if(pos.y < radius) { + pos.y = radius; + vel.y *= -1; + } } //-------------------------------------------------------------- void ofApp::draw(){ blender.begin(); //call blender.begin() to draw onto the blendable canvas - { - //light gray backaground - ofSetColor(100, 100, 100); - ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); - - //thick grid lines for blending - ofSetColor(255, 255, 255); - ofSetLineWidth(3); - - //vertical line - for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ - ofDrawLine(i, 0, i, blender.getCanvasHeight()); - } - - //horizontal lines - for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ - ofDrawLine(0, j, blender.getCanvasWidth(), j); - } - - ofSetColor(255, 0, 0); - ofDrawCircle(pos, radius); - - //instructions - ofSetColor(255, 255, 255); - ofDrawRectangle(10, 10, 300, 100); - ofSetColor(0, 0, 0); - ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); + { + //light gray backaground + ofSetColor(100, 100, 100); + ofDrawRectangle(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + + //thick grid lines for blending + ofSetColor(255, 255, 255); + ofSetLineWidth(3); + + //vertical line + for(int i = 0; i <= blender.getCanvasWidth(); i+=40){ + ofDrawLine(i, 0, i, blender.getCanvasHeight()); + } + + //horizontal lines + for(int j = 0; j <= blender.getCanvasHeight(); j+=40){ + ofDrawLine(0, j, blender.getCanvasWidth(), j); + } + + ofSetColor(255, 0, 0); + ofDrawCircle(pos, radius); + + //instructions + ofSetColor(255, 255, 255); + ofDrawRectangle(10, 10, 300, 100); + ofSetColor(0, 0, 0); + ofDrawBitmapString("SPACE - toggle show blend\n[g/G] - adjust gamma\n[p/P] - adjust blend power\n[l/L] adjust luminance", 15, 35); } blender.end(); //call when you are finished drawing diff --git a/examples/02_threeVertical/src/ofApp.h b/examples/02_threeVertical/src/ofApp.h index d8e91dd..5e7dbd1 100644 --- a/examples/02_threeVertical/src/ofApp.h +++ b/examples/02_threeVertical/src/ofApp.h @@ -20,7 +20,7 @@ class ofApp : public ofBaseApp{ void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - ofxProjectorBlend blender; - ofPoint pos, vel; - float radius; + ofxProjectorBlend blender; + ofPoint pos, vel; + float radius; }; diff --git a/examples/03_guiControls/src/main.cpp b/examples/03_guiControls/src/main.cpp index 6c04362..aca145e 100644 --- a/examples/03_guiControls/src/main.cpp +++ b/examples/03_guiControls/src/main.cpp @@ -5,7 +5,7 @@ //======================================================================== int main( ){ - ofAppGlutWindow window; + ofAppGlutWindow window; ofSetupOpenGL(&window, 1024,768, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app diff --git a/examples/03_guiControls/src/ofApp.cpp b/examples/03_guiControls/src/ofApp.cpp index 53d465e..633194b 100644 --- a/examples/03_guiControls/src/ofApp.cpp +++ b/examples/03_guiControls/src/ofApp.cpp @@ -3,21 +3,21 @@ //-------------------------------------------------------------- void ofApp::setup(){ - blender.setup(PROJECTOR_WIDTH, PROJECTOR_HEIGHT, PROJECTOR_COUNT, PIXEL_OVERLAP); + blender.setup(PROJECTOR_WIDTH, PROJECTOR_HEIGHT, PROJECTOR_COUNT, PIXEL_OVERLAP); blender.setWindowToDisplaySize(); gui.addToggle("Show Blend", blender.showBlend); - for (int i=0; inumProjectors); blendShader.setUniform1f("threshold", threshold); diff --git a/src/ofxProjectorBlend.h b/src/ofxProjectorBlend.h index d37de00..06ce8d7 100644 --- a/src/ofxProjectorBlend.h +++ b/src/ofxProjectorBlend.h @@ -18,57 +18,57 @@ class ofxProjectorBlend { public: ofxProjectorBlend(); - + /** - * Set resolutionWidth and height to the resolutions of each projector output - if you're portrait, + * Set resolutionWidth and height to the resolutions of each projector output - if you're portrait, * still give it a landscape resolution. * * layout - this is how the projectors are stacked, so if they are next to eachother, it's horizontal * and if they're on-top of eachother, it's vertical. (this is regardless of rotation) - * - * rotation - this is the rotation of the projector. If the projectors are on their sides then it's + * + * rotation - this is the rotation of the projector. If the projectors are on their sides then it's * rotatedRight, if it's the right way round, it's noRotation. * */ - void setup(int resolutionWidth, int resolutionHeight, int numProjectors, int pixelOverlap, - ofxProjectorBlendLayout layout = ofxProjectorBlend_Horizontal, + void setup(int resolutionWidth, int resolutionHeight, int numProjectors, int pixelOverlap, + ofxProjectorBlendLayout layout = ofxProjectorBlend_Horizontal, ofxProjectorBlendRotation rotation = ofxProjectorBlend_NoRotation); - + //call begin and end like you would if if you were using a normal fbo void begin(); void end(); - + void draw(float x = 0, float y = 0); - - + + // this is how big the area to draw to is. float getCanvasWidth(); float getCanvasHeight(); ofFbo & getFullTexture() { return fullTexture; } - - /** + + /** * This is how big all the projector resolutions would be * if laid out horizontally, next to eachother. This is * essentially the output resolution (regardless of rotation * and orientation.) - the output to set your project to. * - * On a mac, if you want multiple screens doing fullscreen, + * On a mac, if you want multiple screens doing fullscreen, * you need to put your screens next to eachother with the * main one (the one with the menu) on the left hand side. * If you don't, you'll only get the first screen. */ float getDisplayWidth(); float getDisplayHeight(); - + void moveDisplayVertical(unsigned int targetDisplay, int yOffset); - - + + /** This changes your app's window size to the correct output size */ void setWindowToDisplaySize(); - + bool showBlend; - + // variables that control the blend // more info here on what these variables do // http://local.wasp.uwa.edu.au/~pbourke/texture_colour/edgeblend/ @@ -79,11 +79,11 @@ class ofxProjectorBlend //float gamma2; //float luminance2; float threshold; - + protected: - + vector projectorHeightOffset; - + float fullTextureWidth; float fullTextureHeight; float singleChannelWidth; @@ -91,7 +91,7 @@ class ofxProjectorBlend float displayWidth; float displayHeight; - + float pixelOverlap; int numProjectors; ofxProjectorBlendLayout layout; diff --git a/src/ofxProjectorBlendShader.h b/src/ofxProjectorBlendShader.h index cc61527..5e9ef47 100644 --- a/src/ofxProjectorBlendShader.h +++ b/src/ofxProjectorBlendShader.h @@ -12,178 +12,178 @@ string ofxProjectorBlendVertShader = STRINGIFY( void main(void) { - gl_Position = ftransform(); - gl_TexCoord[0] = gl_MultiTexCoord0; + gl_Position = ftransform(); + gl_TexCoord[0] = gl_MultiTexCoord0; }); string ofxProjectorBlendFragShader(int blends) { - string shader = "uniform float BlendPower["+ofToString(blends)+"]; \ - uniform float SomeLuminanceControl["+ofToString(blends)+"]; \ - uniform float GammaCorrection["+ofToString(blends)+"];"+STRINGIFY( - uniform sampler2DRect Tex0; - uniform float width; - uniform float height; - uniform float OverlapLeft; - uniform float OverlapRight; - uniform float OverlapTop; - uniform float OverlapBottom; - uniform float BlackOutLeft; - uniform float BlackOutRight; - uniform float BlackOutTop; - uniform float BlackOutBottom; - uniform float SolidEdgeEnable; - uniform vec4 SolidEdgeColor; - uniform vec2 texCoordOffset; - uniform float projectors; - uniform float threshold; - - vec4 drawSmoothEdge(float loc, float extend, float blePow, float lumCon, vec3 gamma) - { - vec4 edge; - float curve; - - curve = loc / extend; - curve = (curve < 0.5) ? - lumCon * pow(2.0 * curve, blePow) - : - 1.0 - (1.0 - lumCon) * pow(2.0 * (1.0 - curve), blePow); - - edge = vec4(pow(curve, 1.0 / gamma.r), - pow(curve, 1.0 / gamma.g), - pow(curve, 1.0 / gamma.b), - 1.0); - - return edge; - } - - vec4 drawSmoothEdges(in vec4 overlap, in vec4 blankout, in vec4 color) - { - vec2 xy = gl_TexCoord[0].xy; - vec2 xy_t = xy + texCoordOffset.xy; - vec4 blank = vec4(0.0,0.0,0.0,0.0); - - /* - float proj2 = 1.0; //projectors ... this basically defines a limit; - float thresh = proj2 * width + overlap.x; //(projectors - overlap.x) * width; - float blnPwr = (xy_t.x > thresh) ? BlendPower[1] : BlendPower[0]; - float slc = (xy_t.x > thresh) ? SomeLuminanceControl[1] : SomeLuminanceControl[0]; - float _g = (xy_t.x > thresh) ? GammaCorrection[1] : GammaCorrection[0]; - vec3 gamma = vec3(_g, _g, _g); - */ - - int b = int( xy_t.x / width ); - float blnPwr = BlendPower[b]; - float slc = SomeLuminanceControl[b] + 0.5; - vec3 gamma = vec3(GammaCorrection[b], GammaCorrection[b], GammaCorrection[b]); - //slc += 0.5; - - vec4 sebImage = - (blankout.x + overlap.x > xy.x) ? - (blankout.x > xy.x) ? - blank //leftBlankout - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //leftBottomBlankOut - : texture2DRect(Tex0, xy_t) * //leftBottomBlend - drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * - drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //leftTopBlankout - : texture2DRect(Tex0, xy_t) * //LeftTopBlend - drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * - drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) - : texture2DRect(Tex0, xy_t) * //leftBlankout - drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma)// + vec4(0.5, 0, 0.5, 0) // debug: magenta - : (width - blankout.y - overlap.y < xy.x) ? - (width - blankout.y < xy.x) ? - blank //rightBlankout - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //rightBottomBlankout - : texture2DRect(Tex0, xy_t) * //rightBottomBlend - drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) * - drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //rightTopBlankout - : texture2DRect(Tex0, xy_t) * //rightTopBlend - drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) * - drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) - : texture2DRect(Tex0, xy_t) * //rightBlend - drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma)// + vec4(0, 0, 0.5, 0) // debug: blue - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //BottomBlankout - : texture2DRect(Tex0, xy_t) * //BottomBlend - drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //TopBlankout - : texture2DRect(Tex0, xy_t) * //TopBlend - drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) - : texture2DRect(Tex0, xy_t);// + vec4(0, 0.5, 0.5, 0); // debug: teal - - // if(xy_t.x < thresh) sebImage.rgb += vec3(0, 1.0, 0); // debug - - return sebImage; - } - - vec4 drawSolidEdges(vec4 overlap, vec4 blankout, vec4 color) - { - vec2 xy = gl_TexCoord[0].xy; - vec2 xy_t = xy + texCoordOffset.xy; - vec4 blank = vec4(0.0,0.0,0.0,0.0); - vec4 edgeImage = - (blankout.x + overlap.x > xy.x) ? - (blankout.x > xy.x) ? - blank //leftBlankout - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //leftBottomBlankout - : color //leftBottomColor - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //leftTop - : color //leftTopColor - : color //leftColor - : (width - blankout.y - overlap.y < xy.x) ? - (width - blankout.y < xy.x) ? - blank //rightBlankout - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //rightBottomBlankout - : color //rightBottomColor - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //rightTopBlankout - : color //rightToColor - : color //rightColor - : (blankout.z + overlap.z > xy.y) ? - (blankout.z > xy.y) ? - blank //BottomBlankout - : color //BottomColor - : (height - blankout.w - overlap.w < xy.y) ? - (height - blankout.w < xy.y) ? - blank //TopBlankout - : color //TopColor - : texture2DRect(Tex0, xy_t); - return edgeImage; - } - - void main (void) - { - vec4 overlap = vec4 (OverlapLeft, OverlapRight, OverlapBottom, OverlapTop); - vec4 blankout = vec4 (BlackOutLeft, BlackOutRight, BlackOutBottom, BlackOutTop); - gl_FragData[0] = (SolidEdgeEnable == 1.0) ? - drawSolidEdges(overlap, blankout, SolidEdgeColor) - : drawSmoothEdges(overlap, blankout, SolidEdgeColor); - } - ); - return shader; + string shader = "uniform float BlendPower["+ofToString(blends)+"]; \ + uniform float SomeLuminanceControl["+ofToString(blends)+"]; \ + uniform float GammaCorrection["+ofToString(blends)+"];"+STRINGIFY( + uniform sampler2DRect Tex0; + uniform float width; + uniform float height; + uniform float OverlapLeft; + uniform float OverlapRight; + uniform float OverlapTop; + uniform float OverlapBottom; + uniform float BlackOutLeft; + uniform float BlackOutRight; + uniform float BlackOutTop; + uniform float BlackOutBottom; + uniform float SolidEdgeEnable; + uniform vec4 SolidEdgeColor; + uniform vec2 texCoordOffset; + uniform float projectors; + uniform float threshold; + + vec4 drawSmoothEdge(float loc, float extend, float blePow, float lumCon, vec3 gamma) + { + vec4 edge; + float curve; + + curve = loc / extend; + curve = (curve < 0.5) ? + lumCon * pow(2.0 * curve, blePow) + : + 1.0 - (1.0 - lumCon) * pow(2.0 * (1.0 - curve), blePow); + + edge = vec4(pow(curve, 1.0 / gamma.r), + pow(curve, 1.0 / gamma.g), + pow(curve, 1.0 / gamma.b), + 1.0); + + return edge; + } + + vec4 drawSmoothEdges(in vec4 overlap, in vec4 blankout, in vec4 color) + { + vec2 xy = gl_TexCoord[0].xy; + vec2 xy_t = xy + texCoordOffset.xy; + vec4 blank = vec4(0.0,0.0,0.0,0.0); + + /* + float proj2 = 1.0; //projectors ... this basically defines a limit; + float thresh = proj2 * width + overlap.x; //(projectors - overlap.x) * width; + float blnPwr = (xy_t.x > thresh) ? BlendPower[1] : BlendPower[0]; + float slc = (xy_t.x > thresh) ? SomeLuminanceControl[1] : SomeLuminanceControl[0]; + float _g = (xy_t.x > thresh) ? GammaCorrection[1] : GammaCorrection[0]; + vec3 gamma = vec3(_g, _g, _g); + */ + + int b = int( xy_t.x / width ); + float blnPwr = BlendPower[b]; + float slc = SomeLuminanceControl[b] + 0.5; + vec3 gamma = vec3(GammaCorrection[b], GammaCorrection[b], GammaCorrection[b]); + //slc += 0.5; + + vec4 sebImage = + (blankout.x + overlap.x > xy.x) ? + (blankout.x > xy.x) ? + blank //leftBlankout + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //leftBottomBlankOut + : texture2DRect(Tex0, xy_t) * //leftBottomBlend + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //leftTopBlankout + : texture2DRect(Tex0, xy_t) * //LeftTopBlend + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) + : texture2DRect(Tex0, xy_t) * //leftBlankout + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma)// + vec4(0.5, 0, 0.5, 0) // debug: magenta + : (width - blankout.y - overlap.y < xy.x) ? + (width - blankout.y < xy.x) ? + blank //rightBlankout + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //rightBottomBlankout + : texture2DRect(Tex0, xy_t) * //rightBottomBlend + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) * + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //rightTopBlankout + : texture2DRect(Tex0, xy_t) * //rightTopBlend + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) * + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) + : texture2DRect(Tex0, xy_t) * //rightBlend + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma)// + vec4(0, 0, 0.5, 0) // debug: blue + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //BottomBlankout + : texture2DRect(Tex0, xy_t) * //BottomBlend + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma) + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //TopBlankout + : texture2DRect(Tex0, xy_t) * //TopBlend + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) + : texture2DRect(Tex0, xy_t);// + vec4(0, 0.5, 0.5, 0); // debug: teal + + // if(xy_t.x < thresh) sebImage.rgb += vec3(0, 1.0, 0); // debug + + return sebImage; + } + + vec4 drawSolidEdges(vec4 overlap, vec4 blankout, vec4 color) + { + vec2 xy = gl_TexCoord[0].xy; + vec2 xy_t = xy + texCoordOffset.xy; + vec4 blank = vec4(0.0,0.0,0.0,0.0); + vec4 edgeImage = + (blankout.x + overlap.x > xy.x) ? + (blankout.x > xy.x) ? + blank //leftBlankout + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //leftBottomBlankout + : color //leftBottomColor + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //leftTop + : color //leftTopColor + : color //leftColor + : (width - blankout.y - overlap.y < xy.x) ? + (width - blankout.y < xy.x) ? + blank //rightBlankout + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //rightBottomBlankout + : color //rightBottomColor + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //rightTopBlankout + : color //rightToColor + : color //rightColor + : (blankout.z + overlap.z > xy.y) ? + (blankout.z > xy.y) ? + blank //BottomBlankout + : color //BottomColor + : (height - blankout.w - overlap.w < xy.y) ? + (height - blankout.w < xy.y) ? + blank //TopBlankout + : color //TopColor + : texture2DRect(Tex0, xy_t); + return edgeImage; + } + + void main (void) + { + vec4 overlap = vec4 (OverlapLeft, OverlapRight, OverlapBottom, OverlapTop); + vec4 blankout = vec4 (BlackOutLeft, BlackOutRight, BlackOutBottom, BlackOutTop); + gl_FragData[0] = (SolidEdgeEnable == 1.0) ? + drawSolidEdges(overlap, blankout, SolidEdgeColor) + : drawSmoothEdges(overlap, blankout, SolidEdgeColor); + } + ); + return shader; } From 2df1cde7f3b09c1e1408422ca6bde5dfefdc0d9f Mon Sep 17 00:00:00 2001 From: javl Date: Tue, 23 Feb 2016 15:59:52 +0100 Subject: [PATCH 6/9] Fix example 3 addons.make --- examples/03_guiControls/addons.make | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/03_guiControls/addons.make b/examples/03_guiControls/addons.make index 6e8b79b..13e17c3 100644 --- a/examples/03_guiControls/addons.make +++ b/examples/03_guiControls/addons.make @@ -1,5 +1,4 @@ ofxProjectorBlend ofxSimpleGuiToo -ofxSimpleButton ofxXmlSettings ofxMSAInteractiveObject From 196e6f5df0185b42ad8093d4aedd0d387f17b659 Mon Sep 17 00:00:00 2001 From: guoguo <243505075@qq.com> Date: Tue, 5 Nov 2019 12:10:26 +0800 Subject: [PATCH 7/9] fix bug: ofAppGlutWindow error! --- examples/01_twoScreens/src/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/01_twoScreens/src/main.cpp b/examples/01_twoScreens/src/main.cpp index 2363a78..a217c16 100644 --- a/examples/01_twoScreens/src/main.cpp +++ b/examples/01_twoScreens/src/main.cpp @@ -1,12 +1,9 @@ #include "ofMain.h" #include "ofApp.h" -#include "ofAppGlutWindow.h" //======================================================================== int main( ){ - - ofAppGlutWindow window; - ofSetupOpenGL(&window, 1280, 480, OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(1280, 480, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN From 8b011a93bc2798655da2d2aa74d1b75c8c610edf Mon Sep 17 00:00:00 2001 From: guoguo <243505075@qq.com> Date: Tue, 5 Nov 2019 12:13:06 +0800 Subject: [PATCH 8/9] Add ofxProjectBlend2: Can blend pixel on left,right,top,bottom at the same time --- src/ofxProjectorBlend2.cpp | 421 +++++++++++++++++++++++++++++++++++++ src/ofxProjectorBlend2.h | 86 ++++++++ 2 files changed, 507 insertions(+) create mode 100644 src/ofxProjectorBlend2.cpp create mode 100644 src/ofxProjectorBlend2.h diff --git a/src/ofxProjectorBlend2.cpp b/src/ofxProjectorBlend2.cpp new file mode 100644 index 0000000..d2e83b8 --- /dev/null +++ b/src/ofxProjectorBlend2.cpp @@ -0,0 +1,421 @@ +#include "ofxProjectorBlend2.h" + +string fragmentShader2 = "#extension GL_ARB_texture_rectangle : enable\n \ + \ + uniform sampler2DRect Tex0;\ + \ + uniform float width;\ + uniform float height;\ + \ + uniform float OverlapLeft;\ + uniform float OverlapRight; \ + uniform float OverlapTop;\ + uniform float OverlapBottom;\ + \ + uniform float BlackOutLeft;\ + uniform float BlackOutRight; \ + uniform float BlackOutTop;\ + uniform float BlackOutBottom;\ + \ + uniform float BlendPower;\ + uniform float SomeLuminanceControl;\ + uniform vec3 GammaCorrection;\ + \ + uniform float BlendPower2;\ + uniform float SomeLuminanceControl2;\ + uniform vec3 GammaCorrection2;\ + \ + uniform float SolidEdgeEnable;\ + uniform vec4 SolidEdgeColor;\ + uniform vec2 texCoordOffset;\ + \ + uniform float projectors;\ + uniform float threshold;\ + \ + vec4 drawSmoothEdge(float loc, float extend, float blePow, float lumCon, vec3 gamma)\ + {\ + vec4 edge;\ + float curve;\ + \ + curve = loc / extend;\ + curve = (curve < 0.5) ? \ + lumCon * pow(2.0 * curve, blePow) \ + : \ + 1.0 - (1.0 - lumCon) * pow(2.0 * (1.0 - curve), blePow);\ + \ + edge = vec4(pow(curve, 1.0 / gamma.r), \ + pow(curve, 1.0 / gamma.g),\ + pow(curve, 1.0 / gamma.b),\ + 1.0);\ + \ + return edge;\ + }\ + \ + vec4 drawSmoothEdges(in vec4 overlap, in vec4 blankout, in vec4 color)\ + {\ + vec2 xy = gl_TexCoord[0].xy;\ + vec2 xy_t = xy + texCoordOffset.xy;\ + vec4 blank = vec4(0.0,0.0,0.0,0.0); \ + \ + float proj2 = 1.0;\ + float thresh = proj2 * width + overlap.x;\ + float blnPwr = (xy_t.x > thresh) ? BlendPower: BlendPower2;\ + float slc = (xy_t.x > thresh) ? SomeLuminanceControl: SomeLuminanceControl2;\ + vec3 gamma = (xy_t.x > thresh) ? GammaCorrection: GammaCorrection2;\ + slc += 0.5;\ + \ + vec4 sebImage = \ + (blankout.x + overlap.x > xy.x) ? \ + (blankout.x > xy.x) ? \ + blank\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) * \ + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * \ + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma)\ + : (height - blankout.w - overlap.w < xy.y) ? \ + (height - blankout.w < xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma) * \ + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) \ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(xy.x - blankout.x, overlap.x, blnPwr, slc, gamma)\ + : (width - blankout.y - overlap.y < xy.x) ? \ + (width - blankout.y < xy.x) ? \ + blank\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) *\ + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma)\ + : (height - blankout.w - overlap.w < xy.y) ?\ + (height - blankout.w < xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma) * \ + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma)\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(width - blankout.y - xy.x, overlap.y, blnPwr, slc, gamma)\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(xy.y - blankout.z, overlap.z, blnPwr, slc, gamma)\ + : (height - blankout.w - overlap.w < xy.y) ?\ + (height - blankout.w < xy.y) ? \ + blank\ + : texture2DRect(Tex0, xy_t) *\ + drawSmoothEdge(height - blankout.w - xy.y, overlap.w, blnPwr, slc, gamma) \ + : texture2DRect(Tex0, xy_t);\ + \ + return sebImage;\ + }\ + \ + vec4 drawSolidEdges(vec4 overlap, vec4 blankout, vec4 color)\ + { \ + \ + vec2 xy = gl_TexCoord[0].xy;\ + vec2 xy_t = xy + texCoordOffset.xy;\ + vec4 blank = vec4(0.0,0.0,0.0,0.0); \ + vec4 edgeImage =\ + (blankout.x + overlap.x > xy.x) ?\ + (blankout.x > xy.x) ?\ + blank\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ?\ + blank\ + : color\ + : (height - blankout.w - overlap.w < xy.y) ?\ + (height - blankout.w < xy.y) ?\ + blank\ + : color\ + : color\ + : (width - blankout.y - overlap.y < xy.x) ?\ + (width - blankout.y < xy.x) ?\ + blank\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ?\ + blank\ + : color\ + : (height - blankout.w - overlap.w < xy.y) ?\ + (height - blankout.w < xy.y) ? \ + blank\ + : color\ + : color\ + : (blankout.z + overlap.z > xy.y) ?\ + (blankout.z > xy.y) ? \ + blank\ + : color\ + : (height - blankout.w - overlap.w < xy.y) ?\ + (height - blankout.w < xy.y) ? \ + blank\ + : color\ + : texture2DRect(Tex0, xy_t); \ + return edgeImage;\ + }\ + \ + void main (void)\ + {\ + vec4 overlap = vec4 (OverlapLeft, OverlapRight, OverlapBottom, OverlapTop);\ + vec4 blankout = vec4 (BlackOutLeft, BlackOutRight, BlackOutBottom, BlackOutTop);\ + gl_FragData[0] = (SolidEdgeEnable == 1.0) ?\ + drawSolidEdges(overlap, blankout, SolidEdgeColor)\ + : drawSmoothEdges(overlap, blankout, SolidEdgeColor);\ + }"; + +ofxProjectorBlend2::ofxProjectorBlend2() +{ + showBlend = true; + + gammaR = gammaR2 = 0.5; + gammaG = gammaG2 = 0.5; + gammaB = gammaB2 = 0.5; + blendPower = blendPower2 = 1; + luminance = luminance2 = 0; + threshold = 0; + shaderLocation = "SmoothEdgeBlend"; + + horNumProjectors = 0; + verNumProjectors = 0; +} + + +ofxProjectorBlend2::~ofxProjectorBlend2() +{ +} + +void ofxProjectorBlend2::setShaderLocation(string _shaderLocation) { + shaderLocation = _shaderLocation; + //blendShader.load(shaderLocation); + + bool res = true; + res &= blendShader.setupShaderFromSource(GL_FRAGMENT_SHADER, fragmentShader2); + res &= blendShader.linkProgram(); + + if (!res) + { + ofLogError() << "shader setup failed" << endl; + } +} + +void ofxProjectorBlend2::setup(int _resolutionWidth, int _resolutionHeight, + int _horNumProjectors, int _horPixelOverlap, int _verNumPorjectors, int _verPixelOverlap) +{ + horNumProjectors = _horNumProjectors; + horPixelOverlap = _horPixelOverlap; + + verNumProjectors = _verNumPorjectors; + verPixelOverlap = _verPixelOverlap; + + totalProjectors = horNumProjectors * verNumProjectors; + + singleChannelWidth = _resolutionWidth; + singleChannelHeight = _resolutionHeight; + + ofLog(OF_LOG_NOTICE, "ofxProjectorBlend: res: %d x %d * %d x %d, horOverlap: %d, verOverlap: %d \n", + (int)singleChannelWidth, horNumProjectors, (int)singleChannelHeight,verNumProjectors, (int)horPixelOverlap, (int)verPixelOverlap); + + + if (horNumProjectors <= 0 || verNumProjectors <= 0) + { + ofLog(OF_LOG_ERROR, "Cannot initialize with " + ofToString(this->horNumProjectors) + "*" + ofToString(verNumProjectors) + " projectors."); + return; + } + + fullTextureWidth = singleChannelWidth * horNumProjectors - (horNumProjectors - 1)* horPixelOverlap; + fullTextureHeight = singleChannelHeight * verNumProjectors - (verNumProjectors - 1)* verPixelOverlap; + + displayWidth = singleChannelWidth * horNumProjectors; + displayHeight = singleChannelHeight * verNumProjectors; + + + ofLog(OF_LOG_NOTICE, "canvas res: %d x %d", (int)fullTextureWidth, (int)fullTextureHeight); + + overLapFlags.resize(horNumProjectors * verNumProjectors); + for (int i = 0; i < overLapFlags.size(); i++) + { + overLapFlags[i].isLeftOverLap = false; + overLapFlags[i].isRightOverLap = false; + overLapFlags[i].isTopOverLap = false; + overLapFlags[i].isBottomOverLap = false; + } + + fullTexture.allocate(fullTextureWidth, fullTextureHeight, GL_RGB, 4); + //blendShader.load(shaderLocation); + blendShader.setupShaderFromSource(GL_FRAGMENT_SHADER, fragmentShader2); + blendShader.linkProgram(); +} + +void ofxProjectorBlend2::begin() { + fullTexture.begin(); + + ofPushStyle(); + ofClear(0, 0, 0, 0); +} + +void ofxProjectorBlend2::end() { + fullTexture.end(); + + ofPopStyle(); +} + +float ofxProjectorBlend2::getDisplayWidth() { + return displayWidth; +} + +float ofxProjectorBlend2::getDisplayHeight() { + return displayHeight; +} + +void ofxProjectorBlend2::setWindowToDisplaySize() { + ofSetWindowShape(getDisplayWidth(), getDisplayHeight()); +} + +void ofxProjectorBlend2::setHorPixelOverlap(float layoutlength) +{ + horPixelOverlap = layoutlength; + + fullTextureWidth = singleChannelWidth * horNumProjectors - (horNumProjectors - 1)* horPixelOverlap; + + fullTexture.allocate(fullTextureWidth, fullTextureHeight, GL_RGB, 4); +} + +void ofxProjectorBlend2::setVerPixelOverlap(float layoutlength) +{ + verPixelOverlap = layoutlength; + + fullTextureHeight = singleChannelHeight * verNumProjectors - (verNumProjectors - 1)* verPixelOverlap; + + fullTexture.allocate(fullTextureWidth, fullTextureHeight, GL_RGB, 4); +} + +void ofxProjectorBlend2::setLeftOverLapFlag(int _index, bool _flag) +{ + if (_index >= 0 && _index < overLapFlags.size()) + { + overLapFlags[_index].isLeftOverLap = _flag; + } +} + +void ofxProjectorBlend2::setRightOverLapFlag(int _index, bool _flag) +{ + if (_index >= 0 && _index < overLapFlags.size()) + { + overLapFlags[_index].isRightOverLap = _flag; + } +} + +void ofxProjectorBlend2::setTopOverLapFlag(int _index, bool _flag) +{ + if (_index >= 0 && _index < overLapFlags.size()) + { + overLapFlags[_index].isTopOverLap = _flag; + } +} + +void ofxProjectorBlend2::setBottomOverLapFlag(int _index, bool _flag) +{ + if (_index >= 0 && _index < overLapFlags.size()) + { + overLapFlags[_index].isBottomOverLap = _flag; + } +} + +float ofxProjectorBlend2::getCanvasWidth() +{ + return fullTextureWidth; +} + +float ofxProjectorBlend2::getCanvasHeight() +{ + return fullTextureHeight; +} + +void ofxProjectorBlend2::updateShaderUniforms() { + + blendShader.setUniform1f("OverlapTop", 0.0f); + blendShader.setUniform1f("OverlapLeft", 0.0f); + blendShader.setUniform1f("OverlapBottom", 0.0f); + blendShader.setUniform1f("OverlapRight", 0.0f); + + blendShader.setUniform1f("BlendPower", blendPower); + blendShader.setUniform1f("SomeLuminanceControl", luminance); + blendShader.setUniform3f("GammaCorrection", gammaR, gammaG, gammaB); + + blendShader.setUniform1f("BlendPower2", blendPower2); + blendShader.setUniform1f("SomeLuminanceControl2", luminance2); + blendShader.setUniform3f("GammaCorrection2", gammaR2, gammaG2, gammaB2); + + blendShader.setUniform1f("projectors", totalProjectors); + blendShader.setUniform1f("threshold", threshold); +} + +void ofxProjectorBlend2::draw(float x, float y) { + + glPushMatrix(); + glTranslatef(x, y, 0); + if (showBlend) + { + + blendShader.begin(); + blendShader.setUniform1f("width", singleChannelWidth); + blendShader.setUniform1f("height", singleChannelHeight); + + updateShaderUniforms(); + + blendShader.setUniformTexture("Tex0", fullTexture.getTexture(), 0); + + ofVec2f offset(0, 0); + glPushMatrix(); + + // loop through each projector and glTranslatef() to its position and draw. + for (int i = 0; i < totalProjectors; i++) + { + glPushMatrix(); + int horIndex = i % horNumProjectors; + int verIndex = i / horNumProjectors; + + //ÎÆÀíÆ«ÒÆ + offset.x = (singleChannelWidth - horPixelOverlap) * horIndex; + offset.y = (singleChannelHeight - verPixelOverlap) * verIndex; + + //»æÖÆÆ«ÒÆ + glTranslatef(singleChannelWidth * horIndex, singleChannelHeight * verIndex, 0); + + blendShader.setUniform2f("texCoordOffset", offset.x, offset.y); + + blendShader.setUniform1f("OverlapTop", overLapFlags[i].isBottomOverLap ? verPixelOverlap : 0.0f); + blendShader.setUniform1f("OverlapLeft", overLapFlags[i].isLeftOverLap ? horPixelOverlap : 0.0f); + blendShader.setUniform1f("OverlapBottom", overLapFlags[i].isTopOverLap ? verPixelOverlap : 0.0f); + blendShader.setUniform1f("OverlapRight", overLapFlags[i].isRightOverLap ? horPixelOverlap : 0.0f); + + glBegin(GL_QUADS); + glTexCoord2f(0, 0); glVertex2f(0, 0); + glTexCoord2f(singleChannelWidth, 0); glVertex2f(singleChannelWidth, 0); + glTexCoord2f(singleChannelWidth, singleChannelHeight); glVertex2f(singleChannelWidth, singleChannelHeight); + glTexCoord2f(0, singleChannelHeight); glVertex2f(0, singleChannelHeight); + glEnd(); + glPopMatrix(); + } + glPopMatrix(); + + blendShader.end(); + } + else + { + fullTexture.draw(0, 0, displayWidth, displayHeight); + } + + //Ïû³ý¾â³Ý + ofPushStyle(); + ofNoFill(); + ofSetColor(0, 0, 0); + ofDrawRectangle(1, 1, displayWidth - 1, displayHeight - 1); + ofSetColor(255, 255, 255); + ofPopStyle(); + + glPopMatrix(); +} diff --git a/src/ofxProjectorBlend2.h b/src/ofxProjectorBlend2.h new file mode 100644 index 0000000..cf99f92 --- /dev/null +++ b/src/ofxProjectorBlend2.h @@ -0,0 +1,86 @@ +#pragma once +#include "ofMain.h" + +struct overLapData +{ + bool isLeftOverLap; + bool isRightOverLap; + bool isTopOverLap; + bool isBottomOverLap; +}; + +class ofxProjectorBlend2 +{ +public: + ofxProjectorBlend2(); + ~ofxProjectorBlend2(); + + + void setup(int _resolutionWidth, int _resolutionHeight, + int _horNumProjectors, int _horPixelOverlap,int _verNumPorjectors,int _verPixelOverlap); + + void begin(); + void end(); + void draw(float x = 0, float y = 0); + + + float getCanvasWidth(); + float getCanvasHeight(); + ofFbo & getFullTexture() { return fullTexture; } + void setShaderLocation(string shaderLocation); + + float getDisplayWidth(); + float getDisplayHeight(); + + void setWindowToDisplaySize(); + void setHorPixelOverlap(float layoutlength); + void setVerPixelOverlap(float layoutlength); + + void setLeftOverLapFlag(int _index, bool _flag); + void setRightOverLapFlag(int _index, bool _flag); + void setTopOverLapFlag(int _index, bool _flag); + void setBottomOverLapFlag(int _index, bool _flag); + + + + bool showBlend; + + float blendPower; + float gammaR; + float gammaG; + float gammaB; + float luminance; + float blendPower2; + float gammaR2; + float gammaG2; + float gammaB2; + float luminance2; + float threshold; + +private: + + string shaderLocation; + + float fullTextureWidth; + float fullTextureHeight; + float singleChannelWidth; + float singleChannelHeight; + + float displayWidth; + float displayHeight; + + //float pixelOverlap; + float horPixelOverlap; + float verPixelOverlap; + + //int numProjectors; + int horNumProjectors; + int verNumProjectors; + int totalProjectors; + vector overLapFlags; + + ofShader blendShader; + ofFbo fullTexture; + void updateShaderUniforms(); +}; + From eec521c51fc8b554b630bc442f00a932394892c0 Mon Sep 17 00:00:00 2001 From: guoguo <243505075@qq.com> Date: Tue, 5 Nov 2019 14:22:02 +0800 Subject: [PATCH 9/9] Add example 2x2 --- examples/2x2/src/main.cpp | 13 ++++ examples/2x2/src/ofApp.cpp | 152 +++++++++++++++++++++++++++++++++++++ examples/2x2/src/ofApp.h | 26 +++++++ 3 files changed, 191 insertions(+) create mode 100644 examples/2x2/src/main.cpp create mode 100644 examples/2x2/src/ofApp.cpp create mode 100644 examples/2x2/src/ofApp.h diff --git a/examples/2x2/src/main.cpp b/examples/2x2/src/main.cpp new file mode 100644 index 0000000..e57370b --- /dev/null +++ b/examples/2x2/src/main.cpp @@ -0,0 +1,13 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main( ){ + ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context + + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp(new ofApp()); + +} diff --git a/examples/2x2/src/ofApp.cpp b/examples/2x2/src/ofApp.cpp new file mode 100644 index 0000000..fb1f299 --- /dev/null +++ b/examples/2x2/src/ofApp.cpp @@ -0,0 +1,152 @@ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup(){ + int singleW = 640; + int singleH = 480; + int horNums = 2; + int verNums = 2; + int horOverLap = singleW * 0.2f; + int verOverLap = singleH * 0.2f; + blender.setup(singleW, singleH, horNums, horOverLap, verNums, verOverLap); + blender.setWindowToDisplaySize(); + + for (int i = 0;i < blender.getProjectorsNums();i++) + { + int xIndex = i % 2; + int yIndex = i / 2; + blender.setLeftOverLapFlag(i,true); + blender.setRightOverLapFlag(i, true); + blender.setTopOverLapFlag(i, true); + blender.setBottomOverLapFlag(i, true); + + + if (xIndex == 0) + { + blender.setLeftOverLapFlag(i, false); + } + else if (xIndex == horNums-1) + { + blender.setRightOverLapFlag(i, false); + } + + if (yIndex == 0) + { + blender.setTopOverLapFlag(i, false); + } + else if (yIndex == verNums-1) + { + blender.setBottomOverLapFlag(i, false); + } + } +} + +//-------------------------------------------------------------- +void ofApp::update(){ + blender.begin(); + ofPushStyle(); + //light gray backaground + ofSetColor(100, 100, 100); + ofRect(0, 0, blender.getCanvasWidth(), blender.getCanvasHeight()); + + //thick grid lines for blending + ofSetColor(255, 255, 255); + ofSetLineWidth(3); + + //vertical line + for (int i = 0; i <= blender.getCanvasWidth(); i += 40) { + ofLine(i, 0, i, blender.getCanvasHeight()); + } + + //horizontal lines + for (int j = 0; j <= blender.getCanvasHeight(); j += 40) { + ofLine(0, j, blender.getCanvasWidth(), j); + } + ofPopStyle(); + blender.end(); +} + +//-------------------------------------------------------------- +void ofApp::draw(){ + blender.draw(); +} + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key){ + //hit spacebar to toggle the blending strip + if (key == ' ') { + //toggling this variable effects whether the blend strip is shown + blender.showBlend = !blender.showBlend; + } + + // more info here on what these variables do + // http://local.wasp.uwa.edu.au/~pbourke/texture_colour/edgeblend/ + + else if (key == 'q') { + blender.luminance -= .05; + blender.luminance2 -= .05; + } + else if (key == 'w') { + blender.luminance += .05; + blender.luminance2 += .05; + } + else if (key == 'e') { + blender.blendPower -= .05; + blender.blendPower2 -= .05; + } + else if (key == 'r') { + blender.blendPower += .05; + blender.blendPower2 += .05; + } + +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/examples/2x2/src/ofApp.h b/examples/2x2/src/ofApp.h new file mode 100644 index 0000000..6c72399 --- /dev/null +++ b/examples/2x2/src/ofApp.h @@ -0,0 +1,26 @@ +#pragma once + +#include "ofMain.h" +#include "ofxProjectorBlend2.h" + +class ofApp : public ofBaseApp{ + + public: + void setup(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + + ofxProjectorBlend2 blender; +};