Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kokinomura committed Mar 18, 2014
1 parent 8e0f32d commit 8f94ff6
Show file tree
Hide file tree
Showing 18 changed files with 1,445 additions and 10 deletions.
110 changes: 100 additions & 10 deletions .gitignore
@@ -1,13 +1,103 @@
# Compiled Object files
*.slo
*.lo
#########################
# openFrameworks patterns
#########################

# build files
openFrameworks.a
openFrameworksDebug.a
openFrameworksUniversal.a
libs/openFrameworksCompiled/lib/*/*
!libs/openFrameworksCompiled/lib/*/.gitkeep

# rule to avoid non-official addons going into git
# see addons/.gitignore
addons/*

# rule to avoid non-official apps going into git
# see apps/.gitignore
apps/*

# also, see examples/.gitignore

#########################
# general
#########################

[Bb]uild/
[Oo]bj/
*.o
[Dd]ebug*/
[Rr]elease*/
*.mode*
*.app/
*.pyc
.svn/
*.log
*.cpp.eep
*.cpp.elf
*.cpp.hex

#########################
# IDE
#########################

# XCode
*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3
*.mode2v3
# XCode 4
xcuserdata
*.xcworkspace

# Code::Blocks
*.depend
*.layout

# Visual Studio
*.sdf
*.opensdf
*.suo
*.pdb
*.ilk
*.aps
ipch/

# Eclipse
.metadata
local.properties
.externalToolBuilders

#########################
# operating system
#########################

# Linux
*~
# KDE
.directory
.AppleDouble

# OSX
.DS_Store
*.swp
*~.nib
# Thumbnails
._*

# Windows
# Windows image file caches
Thumbs.db
# Folder config file
Desktop.ini

# Android
.csettings
/libs/openFrameworksCompiled/project/android/paths.make

# Compiled Dynamic libraries
*.so
*.dylib
#########################
# miscellaneous
#########################

# Compiled Static libraries
*.lai
*.la
*.a
.mailmap
2 changes: 2 additions & 0 deletions README.md
@@ -1,2 +1,4 @@
ofxSimpleEffects
================

Under construction
585 changes: 585 additions & 0 deletions example-Glow/Glow.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Debug"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Release">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "Glow.app"
BlueprintName = "Glow"
ReferencedContainer = "container:Glow.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Release">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
13 changes: 13 additions & 0 deletions example-Glow/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=../../..
endif

# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
17 changes: 17 additions & 0 deletions example-Glow/Project.xcconfig
@@ -0,0 +1,17 @@
//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
OF_PATH = ../../..

//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"

//ICONS - NEW IN 0072
ICON_NAME_DEBUG = icon-debug.icns
ICON_NAME_RELEASE = icon.icns
ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/

//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
//ICON_FILE_PATH = bin/data/

OTHER_LDFLAGS = $(OF_CORE_LIBS)
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
28 changes: 28 additions & 0 deletions example-Glow/bin/data/shaderX.frag
@@ -0,0 +1,28 @@
#version 120

uniform sampler2DRect tex0;
uniform float glowAmount;
uniform int blurSize;

void main()
{
float x = gl_TexCoord[0].x;
float y = gl_TexCoord[0].y;

vec4 vsum = vec4(0, 0, 0, 0);

if (blurSize > 0) {
float sum = 0;
for (int i=-blurSize; i<blurSize; i+=int(blurSize/20)+1) {
float scale = smoothstep(1, 0, abs(i)/blurSize);
vsum += texture2DRect(tex0, vec2(x+i, y)) * scale;
sum += scale;
}
vsum /= sum;
vsum *= glowAmount;
} else {
vsum = texture2DRect(tex0, vec2(x, y));
vsum *= max(glowAmount, 1);
}
gl_FragColor = vsum;
}
18 changes: 18 additions & 0 deletions example-Glow/bin/data/shaderX.vert
@@ -0,0 +1,18 @@
#version 120

//varying vec4 globalColor;

// the time value is passed into the shader by the OF app.
uniform float time;

void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();

// in OpenGL 2.0 we must get the global color using the gl_Color command,
// and store it in a globalColor (varying) that is passed to our frag shader.
// please note that the frag shader also has a globalColor (varying),
// and this is the standard way of passing data from the vertex shader to the frag shader.
//globalColor = gl_Color;
}

0 comments on commit 8f94ff6

Please sign in to comment.