Skip to content

Commit fa82708

Browse files
committed
ofxGPULightmapper | develop - example-basic
1 parent b918bed commit fa82708

File tree

10 files changed

+474
-0
lines changed

10 files changed

+474
-0
lines changed

example-basic/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Attempt to load a config.make file.
2+
# If none is found, project defaults in config.project.make will be used.
3+
ifneq ($(wildcard config.make),)
4+
include config.make
5+
endif
6+
7+
# make sure the the OF_ROOT location is defined
8+
ifndef OF_ROOT
9+
OF_ROOT=$(realpath ../../..)
10+
endif
11+
12+
# call the project makefile!
13+
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk

example-basic/Project.xcconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2+
//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3+
OF_PATH = ../../..
4+
5+
//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6+
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7+
8+
//ICONS - NEW IN 0072
9+
ICON_NAME_DEBUG = icon-debug.icns
10+
ICON_NAME_RELEASE = icon.icns
11+
ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12+
13+
//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14+
//ICON_FILE_PATH = bin/data/
15+
16+
OTHER_CFLAGS = $(OF_CORE_CFLAGS)
17+
OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS)
18+
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)

example-basic/addons.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ofxGPULightmapper

example-basic/bin/data/.gitkeep

Whitespace-only changes.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
ply
2+
format ascii 1.0
3+
comment Created by Blender 2.83.0 - www.blender.org, source file: 'basic_form.blend'
4+
element vertex 96
5+
property float x
6+
property float y
7+
property float z
8+
property float nx
9+
property float ny
10+
property float nz
11+
property float s
12+
property float t
13+
element face 32
14+
property list uchar uint vertex_indices
15+
end_header
16+
-0.174381 0.948414 0.000000 -0.968974 -0.140986 0.203010 0.865674 0.278114
17+
-0.215241 0.587141 -0.445926 -0.968974 -0.140986 0.203010 0.995734 0.015200
18+
-0.121816 0.587141 0.000000 -0.968974 -0.140986 0.203010 0.995734 0.278114
19+
-0.113105 1.174282 -0.552342 0.000000 -0.178339 -0.983969 0.300915 0.852877
20+
0.215241 0.587141 -0.445926 0.000000 -0.178339 -0.983969 0.563828 0.722817
21+
-0.215241 0.587141 -0.445926 0.000000 -0.178339 -0.983969 0.563828 0.852877
22+
0.174381 0.948414 0.000000 0.968974 -0.140986 -0.203010 0.849543 0.865674
23+
0.215241 0.587141 0.445926 0.968974 -0.140986 -0.203010 0.586629 0.995734
24+
0.121816 0.587141 0.000000 0.968974 -0.140986 -0.203010 0.849543 0.995734
25+
0.328597 1.319314 0.703160 0.000000 -0.331467 0.943467 0.300915 0.710020
26+
-0.215241 0.587141 0.445926 0.000000 -0.331467 0.943467 0.563828 0.579960
27+
0.215241 0.587141 0.445926 0.000000 -0.331467 0.943467 0.563828 0.710020
28+
0.174381 0.225868 0.000000 0.000000 -0.922229 -0.386644 0.722817 0.849543
29+
-0.131789 0.000000 0.538743 0.000000 -0.922229 -0.386644 0.852877 0.586629
30+
-0.174381 0.225868 0.000000 0.000000 -0.922229 -0.386644 0.852877 0.849543
31+
-0.174381 0.948414 0.000000 0.000000 0.884495 -0.466550 0.579960 0.849543
32+
0.328597 1.319314 0.703160 0.000000 0.884495 -0.466550 0.710020 0.586629
33+
0.174381 0.948414 0.000000 0.000000 0.884495 -0.466550 0.710020 0.849543
34+
-0.113105 1.174282 -0.552342 0.000000 0.925600 0.378503 0.278114 0.865674
35+
0.174381 0.948414 0.000000 0.000000 0.925600 0.378503 0.015200 0.995734
36+
0.113105 1.174282 -0.552342 0.000000 0.925600 0.378503 0.278114 0.995734
37+
0.383739 0.000000 -0.775719 0.000000 -0.960127 0.279563 0.015200 0.849543
38+
-0.174381 0.225868 0.000000 0.000000 -0.960127 0.279563 0.278114 0.586629
39+
-0.383739 0.000000 -0.775719 0.000000 -0.960127 0.279563 0.278114 0.849543
40+
0.215241 0.587141 -0.445926 0.968974 -0.140986 0.203010 0.841942 0.861408
41+
0.174381 0.948414 0.000000 0.968974 -0.140986 0.203010 0.579029 0.991469
42+
0.121816 0.587141 0.000000 0.968974 -0.140986 0.203010 0.579029 0.861408
43+
-0.215241 0.587141 0.445926 -0.968974 -0.140986 -0.203010 0.861408 0.270514
44+
-0.174381 0.948414 0.000000 -0.968974 -0.140986 -0.203010 0.991469 0.007600
45+
-0.121816 0.587141 0.000000 -0.968974 -0.140986 -0.203010 0.861408 0.007600
46+
-0.215241 0.587141 0.445926 -0.990288 -0.137489 0.020647 0.849543 0.278114
47+
-0.174381 0.225868 0.000000 -0.990288 -0.137489 0.020647 0.586629 0.278114
48+
-0.131789 0.000000 0.538743 -0.990288 -0.137489 0.020647 0.849543 0.015200
49+
0.215241 0.587141 -0.445926 0.964118 0.156048 0.214768 0.563828 0.563828
50+
0.174381 0.225868 0.000000 0.964118 0.156048 0.214768 0.300915 0.563828
51+
0.383739 0.000000 -0.775719 0.964118 0.156048 0.214768 0.563828 0.300915
52+
0.215241 0.587141 0.445926 0.000000 0.156143 0.987734 0.300915 0.995734
53+
-0.131789 0.000000 0.538743 0.000000 0.156143 0.987734 0.563828 0.865674
54+
0.131789 0.000000 0.538743 0.000000 0.156143 0.987734 0.563828 0.995734
55+
0.174381 0.225868 0.000000 0.990288 -0.137489 0.020647 0.841942 0.007600
56+
0.215241 0.587141 0.445926 0.990288 -0.137489 0.020647 0.579029 0.007600
57+
0.131789 0.000000 0.538743 0.990288 -0.137489 0.020647 0.579029 0.270514
58+
-0.215241 0.587141 -0.445926 0.000000 0.489726 -0.871876 0.007600 0.841942
59+
0.383739 0.000000 -0.775719 0.000000 0.489726 -0.871876 0.270514 0.579029
60+
-0.383739 0.000000 -0.775719 0.000000 0.489726 -0.871876 0.007600 0.579029
61+
-0.174381 0.225868 0.000000 -0.964118 0.156048 0.214768 0.556228 0.293315
62+
-0.215241 0.587141 -0.445926 -0.964118 0.156048 0.214768 0.293315 0.293315
63+
-0.383739 0.000000 -0.775719 -0.964118 0.156048 0.214768 0.293315 0.556228
64+
-0.174381 0.948414 0.000000 -0.985588 0.163769 -0.042369 0.278114 0.563828
65+
-0.113105 1.174282 -0.552342 -0.985588 0.163769 -0.042369 0.278114 0.300915
66+
-0.215241 0.587141 -0.445926 -0.985588 0.163769 -0.042369 0.015200 0.563828
67+
-0.113105 1.174282 -0.552342 -0.000000 -0.178339 -0.983969 0.293315 0.991469
68+
0.113105 1.174282 -0.552342 -0.000000 -0.178339 -0.983969 0.293315 0.861408
69+
0.215241 0.587141 -0.445926 -0.000000 -0.178339 -0.983969 0.556228 0.861408
70+
0.174381 0.948414 0.000000 0.981685 -0.093709 -0.165873 0.015200 0.278114
71+
0.328597 1.319314 0.703160 0.981685 -0.093709 -0.165873 0.278114 0.015200
72+
0.215241 0.587141 0.445926 0.981685 -0.093709 -0.165873 0.278114 0.278114
73+
0.328597 1.319314 0.703160 0.000000 -0.331467 0.943467 0.300915 0.278114
74+
-0.328597 1.319314 0.703160 0.000000 -0.331467 0.943467 0.563828 0.278114
75+
-0.215241 0.587141 0.445926 0.000000 -0.331467 0.943467 0.563828 0.015200
76+
0.174381 0.225868 0.000000 0.000000 -0.922229 -0.386644 0.718551 0.841942
77+
0.131789 0.000000 0.538743 0.000000 -0.922229 -0.386644 0.718551 0.579029
78+
-0.131789 0.000000 0.538743 0.000000 -0.922229 -0.386644 0.848612 0.579029
79+
-0.174381 0.948414 0.000000 0.000000 0.884495 -0.466550 0.293315 0.270514
80+
-0.328597 1.319314 0.703160 0.000000 0.884495 -0.466550 0.293315 0.007600
81+
0.328597 1.319314 0.703160 0.000000 0.884495 -0.466550 0.556228 0.007600
82+
-0.113105 1.174282 -0.552342 0.000000 0.925600 0.378503 0.270514 0.861408
83+
-0.174381 0.948414 0.000000 0.000000 0.925600 0.378503 0.007600 0.861408
84+
0.174381 0.948414 0.000000 0.000000 0.925600 0.378503 0.007600 0.991469
85+
0.383739 0.000000 -0.775719 0.000000 -0.960127 0.279563 0.575694 0.841942
86+
0.174381 0.225868 0.000000 0.000000 -0.960127 0.279563 0.575694 0.579029
87+
-0.174381 0.225868 0.000000 0.000000 -0.960127 0.279563 0.705755 0.579029
88+
0.215241 0.587141 -0.445926 0.985588 0.163769 -0.042369 0.270514 0.293315
89+
0.113105 1.174282 -0.552342 0.985588 0.163769 -0.042369 0.007600 0.556228
90+
0.174381 0.948414 0.000000 0.985588 0.163769 -0.042369 0.007600 0.293315
91+
-0.215241 0.587141 0.445926 -0.981685 -0.093709 -0.165873 0.007600 0.007600
92+
-0.328597 1.319314 0.703160 -0.981685 -0.093709 -0.165873 0.007600 0.270514
93+
-0.174381 0.948414 0.000000 -0.981685 -0.093709 -0.165873 0.270514 0.007600
94+
-0.215241 0.587141 0.445926 -0.968974 0.140986 -0.203010 0.710020 0.300915
95+
-0.121816 0.587141 0.000000 -0.968974 0.140986 -0.203010 0.710020 0.563828
96+
-0.174381 0.225868 0.000000 -0.968974 0.140986 -0.203010 0.579960 0.563828
97+
0.215241 0.587141 -0.445926 0.968974 0.140986 0.203010 0.852877 0.300915
98+
0.121816 0.587141 0.000000 0.968974 0.140986 0.203010 0.852877 0.563828
99+
0.174381 0.225868 0.000000 0.968974 0.140986 0.203010 0.722817 0.563828
100+
0.215241 0.587141 0.445926 -0.000000 0.156143 0.987734 0.293315 0.848612
101+
-0.215241 0.587141 0.445926 -0.000000 0.156143 0.987734 0.293315 0.718551
102+
-0.131789 0.000000 0.538743 -0.000000 0.156143 0.987734 0.556228 0.718551
103+
0.174381 0.225868 0.000000 0.968974 0.140986 -0.203010 0.848612 0.293315
104+
0.121816 0.587141 0.000000 0.968974 0.140986 -0.203010 0.718551 0.293315
105+
0.215241 0.587141 0.445926 0.968974 0.140986 -0.203010 0.718551 0.556228
106+
-0.215241 0.587141 -0.445926 0.000000 0.489726 -0.871876 0.293315 0.705755
107+
0.215241 0.587141 -0.445926 0.000000 0.489726 -0.871876 0.293315 0.575694
108+
0.383739 0.000000 -0.775719 0.000000 0.489726 -0.871876 0.556228 0.575694
109+
-0.174381 0.225868 0.000000 -0.968974 0.140986 0.203010 0.705755 0.293315
110+
-0.121816 0.587141 0.000000 -0.968974 0.140986 0.203010 0.575694 0.293315
111+
-0.215241 0.587141 -0.445926 -0.968974 0.140986 0.203010 0.575694 0.556228
112+
3 0 1 2
113+
3 3 4 5
114+
3 6 7 8
115+
3 9 10 11
116+
3 12 13 14
117+
3 15 16 17
118+
3 18 19 20
119+
3 21 22 23
120+
3 24 25 26
121+
3 27 28 29
122+
3 30 31 32
123+
3 33 34 35
124+
3 36 37 38
125+
3 39 40 41
126+
3 42 43 44
127+
3 45 46 47
128+
3 48 49 50
129+
3 51 52 53
130+
3 54 55 56
131+
3 57 58 59
132+
3 60 61 62
133+
3 63 64 65
134+
3 66 67 68
135+
3 69 70 71
136+
3 72 73 74
137+
3 75 76 77
138+
3 78 79 80
139+
3 81 82 83
140+
3 84 85 86
141+
3 87 88 89
142+
3 90 91 92
143+
3 93 94 95

example-basic/config.make

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
################################################################################
2+
# CONFIGURE PROJECT MAKEFILE (optional)
3+
# This file is where we make project specific configurations.
4+
################################################################################
5+
6+
################################################################################
7+
# OF ROOT
8+
# The location of your root openFrameworks installation
9+
# (default) OF_ROOT = ../../..
10+
################################################################################
11+
# OF_ROOT = ../../..
12+
13+
################################################################################
14+
# PROJECT ROOT
15+
# The location of the project - a starting place for searching for files
16+
# (default) PROJECT_ROOT = . (this directory)
17+
#
18+
################################################################################
19+
# PROJECT_ROOT = .
20+
21+
################################################################################
22+
# PROJECT SPECIFIC CHECKS
23+
# This is a project defined section to create internal makefile flags to
24+
# conditionally enable or disable the addition of various features within
25+
# this makefile. For instance, if you want to make changes based on whether
26+
# GTK is installed, one might test that here and create a variable to check.
27+
################################################################################
28+
# None
29+
30+
################################################################################
31+
# PROJECT EXTERNAL SOURCE PATHS
32+
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
33+
# Like source folders in the PROJECT_ROOT, these paths are subject to
34+
# exlclusion via the PROJECT_EXLCUSIONS list.
35+
#
36+
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
37+
#
38+
# Note: Leave a leading space when adding list items with the += operator
39+
################################################################################
40+
# PROJECT_EXTERNAL_SOURCE_PATHS =
41+
42+
################################################################################
43+
# PROJECT EXCLUSIONS
44+
# These makefiles assume that all folders in your current project directory
45+
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
46+
# to look for source code. The any folders or files that match any of the
47+
# items in the PROJECT_EXCLUSIONS list below will be ignored.
48+
#
49+
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
50+
# string unless teh user adds a wildcard (%) operator to match subdirectories.
51+
# GNU make only allows one wildcard for matching. The second wildcard (%) is
52+
# treated literally.
53+
#
54+
# (default) PROJECT_EXCLUSIONS = (blank)
55+
#
56+
# Will automatically exclude the following:
57+
#
58+
# $(PROJECT_ROOT)/bin%
59+
# $(PROJECT_ROOT)/obj%
60+
# $(PROJECT_ROOT)/%.xcodeproj
61+
#
62+
# Note: Leave a leading space when adding list items with the += operator
63+
################################################################################
64+
# PROJECT_EXCLUSIONS =
65+
66+
################################################################################
67+
# PROJECT LINKER FLAGS
68+
# These flags will be sent to the linker when compiling the executable.
69+
#
70+
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
71+
#
72+
# Note: Leave a leading space when adding list items with the += operator
73+
################################################################################
74+
75+
# Currently, shared libraries that are needed are copied to the
76+
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
77+
# add a runtime path to search for those shared libraries, since they aren't
78+
# incorporated directly into the final executable application binary.
79+
# TODO: should this be a default setting?
80+
# PROJECT_LDFLAGS=-Wl,-rpath=./libs
81+
82+
################################################################################
83+
# PROJECT DEFINES
84+
# Create a space-delimited list of DEFINES. The list will be converted into
85+
# CFLAGS with the "-D" flag later in the makefile.
86+
#
87+
# (default) PROJECT_DEFINES = (blank)
88+
#
89+
# Note: Leave a leading space when adding list items with the += operator
90+
################################################################################
91+
# PROJECT_DEFINES =
92+
93+
################################################################################
94+
# PROJECT CFLAGS
95+
# This is a list of fully qualified CFLAGS required when compiling for this
96+
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
97+
# defined in your platform specific core configuration files. These flags are
98+
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
99+
#
100+
# (default) PROJECT_CFLAGS = (blank)
101+
#
102+
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
103+
# your platform specific configuration file will be applied by default and
104+
# further flags here may not be needed.
105+
#
106+
# Note: Leave a leading space when adding list items with the += operator
107+
################################################################################
108+
# PROJECT_CFLAGS =
109+
110+
################################################################################
111+
# PROJECT OPTIMIZATION CFLAGS
112+
# These are lists of CFLAGS that are target-specific. While any flags could
113+
# be conditionally added, they are usually limited to optimization flags.
114+
# These flags are added BEFORE the PROJECT_CFLAGS.
115+
#
116+
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
117+
#
118+
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
119+
#
120+
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
121+
#
122+
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
123+
#
124+
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
125+
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
126+
# file will be applied by default and further optimization flags here may not
127+
# be needed.
128+
#
129+
# Note: Leave a leading space when adding list items with the += operator
130+
################################################################################
131+
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
132+
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
133+
134+
################################################################################
135+
# PROJECT COMPILERS
136+
# Custom compilers can be set for CC and CXX
137+
# (default) PROJECT_CXX = (blank)
138+
# (default) PROJECT_CC = (blank)
139+
# Note: Leave a leading space when adding list items with the += operator
140+
################################################################################
141+
# PROJECT_CXX =
142+
# PROJECT_CC =
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleExecutable</key>
8+
<string>${EXECUTABLE_NAME}</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>cc.openFrameworks.${EXECUTABLE_NAME}</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundlePackageType</key>
14+
<string>APPL</string>
15+
<key>CFBundleSignature</key>
16+
<string>????</string>
17+
<key>CFBundleVersion</key>
18+
<string>1.0</string>
19+
<key>CFBundleIconFile</key>
20+
<string>${ICON}</string>
21+
<key>NSCameraUsageDescription</key>
22+
<string>This app needs to access the camera</string>
23+
<key>NSMicrophoneUsageDescription</key>
24+
<string>This app needs to access the microphone</string>
25+
</dict>
26+
</plist>

example-basic/src/main.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "ofMain.h"
2+
#include "ofApp.h"
3+
4+
//========================================================================
5+
int main( ){
6+
//ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7+
ofGLFWWindowSettings settings;
8+
settings.setGLVersion(3, 2);
9+
ofCreateWindow(settings);
10+
11+
12+
// this kicks off the running of my app
13+
// can be OF_WINDOW or OF_FULLSCREEN
14+
// pass in width and height too:
15+
ofRunApp(new ofApp());
16+
17+
}

0 commit comments

Comments
 (0)