Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
42c9492
Basic Object3D hierarchy
mrsillydog Nov 19, 2019
fe8820f
Improved 3DObject class structure
Nov 19, 2019
587f799
Updated Object3D and Prism
mrsillydog Dec 20, 2019
5bb298e
Fixing tests that broke with Mac-Linux merge
Dec 31, 2019
5207349
Minor fixes on MacOS
mrsillydog Dec 31, 2019
69be769
Cube improvements - data in place.
mrsillydog Mar 20, 2020
ff7a7e5
Minor fixes
mrsillydog Mar 20, 2020
226bed3
Updates w/ gcc 9.3
mrsillydog Mar 24, 2020
27b8e67
Cube drawing, once.
mrsillydog Mar 26, 2020
922d654
All known Cube functionality complete!
mrsillydog Mar 29, 2020
445ad24
Cuboid working, cylinder not working
mrsillydog Mar 30, 2020
377b8cb
Basic versions of all 3D Objects complete.
mrsillydog Apr 2, 2020
70917d1
Rotation around arbitrary point, mutators update
mrsillydog Apr 9, 2020
c0fe673
Forgot Cone and Pyramid. Now added.
mrsillydog Apr 9, 2020
d106b23
Coloring changes; edges and edgeless objects fix
mrsillydog Apr 15, 2020
72585d6
Added color and edge color change capabilities
mrsillydog Apr 16, 2020
8f051eb
Improved rotation capabilities with getCenter_
mrsillydog Apr 16, 2020
591d606
Clean up previous commit.
mrsillydog Apr 17, 2020
1f8496c
Removed outlineFirstIndex instance var. Added docs
mrsillydog Apr 20, 2020
7d2b67a
Huge changes to 2D stuff. Some bugs in CCPolygon
mrsillydog Apr 24, 2020
8fbc727
ConcavePolygon stuff fixed! And lines tested!
mrsillydog Apr 26, 2020
6b0c7c0
testSolarSystem
mrsillydog May 4, 2020
3508865
Arrow update. testClock and testPanorama added.
mrsillydog May 6, 2020
6ec6f1d
testPhilosophers fixed + test3DPhilosophers added
mrsillydog May 7, 2020
e79f956
Meals added to both types of philosophers
mrsillydog May 7, 2020
d908817
Pyramid advantages example + Triangle improved
mrsillydog May 7, 2020
e3e0c60
Final project presentation examples
mrsillydog Jun 1, 2020
fd01ac9
Philosophers, Sorting, ColorGLfloat
mrsillydog Jun 2, 2020
9fca832
Sorting tests visually improved
mrsillydog Jun 2, 2020
d57077a
Basic image working, .bmp format only
mrsillydog Jun 4, 2020
996a17b
All formats support w/ stb. Inconsistent rendering
mrsillydog Jun 5, 2020
9f824a3
Small change, make non-texture colors work again
mrsillydog Jun 5, 2020
e92aef9
Many fixes. Image yet inconsistent. Shaders unused
mrsillydog Jun 10, 2020
a461f65
Fix previous tests for new perspective projection
mrsillydog Jun 12, 2020
a82056a
Fixing new tests for 3D
mrsillydog Jun 12, 2020
c2a9538
Updated to OpenGL3.3. Image fixed? Text not.
mrsillydog Jun 19, 2020
a170ea3
Text working. Potentially can be optimized further
mrsillydog Jun 22, 2020
acad628
Text optimized, legend readded to testPhilosophers
mrsillydog Jun 24, 2020
a92e729
Removed old outline implementation. Updated docs
mrsillydog Jun 24, 2020
520005b
Shaders now don't require filepath. New text bug
mrsillydog Jun 24, 2020
4d5f36b
Unicode is broken. Committing to test versions
mrsillydog Jun 26, 2020
42b017b
Outline functionality added to Shape
mrsillydog Jun 30, 2020
ec4e612
All characters of Text rendering, finally.
mrsillydog Jul 1, 2020
81936a2
Transparency sorting added. Not perfect, but good
mrsillydog Jul 2, 2020
2091b9e
Initial Background added, image alpha improved.
mrsillydog Jul 6, 2020
9577f9d
Basic framebuffer created (needs anti-aliasing)
mrsillydog Jul 10, 2020
01b29d4
Small change to when screenshot occurs
mrsillydog Jul 13, 2020
bd1844f
Multisample framebuffer render w/ intermediate FBO
mrsillydog Jul 13, 2020
1cf4f54
Add files via upload
zcdev6 Jul 14, 2020
b6b53a9
Update install-cygwin.sh
zcdev6 Jul 14, 2020
021630a
Add files via upload
zcdev6 Jul 14, 2020
115e9cf
Add files via upload
zcdev6 Jul 14, 2020
2cb78b3
Add files via upload
zcdev6 Jul 14, 2020
6d594fe
Add files via upload
zcdev6 Jul 14, 2020
acf2aa8
Add files via upload
zcdev6 Jul 14, 2020
23530d7
Add files via upload
zcdev6 Jul 14, 2020
381410b
Add files via upload
zcdev6 Jul 14, 2020
8e98b00
Add files via upload
zcdev6 Jul 14, 2020
000abca
Add files via upload
zcdev6 Jul 14, 2020
f7cad54
Add files via upload
zcdev6 Jul 27, 2020
54e3650
Add files via upload
zcdev6 Jul 27, 2020
a797e18
Delete LifeFarm.cpp
zcdev6 Jul 27, 2020
ae1ba0a
Delete LifeFarm.h
zcdev6 Jul 27, 2020
9c363bc
Delete Fork.h
zcdev6 Jul 27, 2020
6f62a3a
Delete Philosopher.cpp
zcdev6 Jul 27, 2020
b7985b0
Delete philEnums.h
zcdev6 Jul 27, 2020
45ae4df
Delete Philosopher.h
zcdev6 Jul 27, 2020
94c4a77
Delete Table.cpp
zcdev6 Jul 27, 2020
fc0e37f
Delete Table.h
zcdev6 Jul 27, 2020
49e3c24
Remove directory with excess files
Jul 27, 2020
73e7f3d
Add files via upload
zcdev6 Jul 27, 2020
3675288
Add updated examples
zcdev6 Jul 27, 2020
377475a
Add updated examples
zcdev6 Jul 27, 2020
f35ffd8
Create readme.md
zcdev6 Jul 27, 2020
a3689d1
Add updated tests
zcdev6 Jul 27, 2020
a413f79
Add updated tests
zcdev6 Jul 27, 2020
51f6f19
Delete readme.md
zcdev6 Jul 27, 2020
31403ab
Add files via upload
zcdev6 Jul 27, 2020
0cf5886
Add files via upload
zcdev6 Jul 28, 2020
d40ea78
Update Makefiles for Mac + SPIA TSGL library files
mrsillydog Jul 29, 2020
5dc109e
Merge branch 'cleanup' into temp
mrsillydog Jul 29, 2020
74aa4f4
Merge pull request #35 from Calvin-CS/temp
mrsillydog Jul 29, 2020
16895b0
Fixed SPIA tests added; more fixes/changes needed
mrsillydog Jul 29, 2020
6a3584a
Tiny commit: fixing miscopy
mrsillydog Jul 29, 2020
6348dcb
Optimizations; testGetPixels still slow
mrsillydog Aug 3, 2020
32a4577
Line updated w/ endpoint constructors, tests fixed
mrsillydog Aug 4, 2020
ea2f332
Test fixes, including Spectrogram + ProgressBar
mrsillydog Aug 6, 2020
83e5024
Arrow endpoints functionality added
mrsillydog Aug 7, 2020
4e13495
Accessor updates; Line, and mutexes
mrsillydog Aug 10, 2020
04ebf63
Besides memory issues, ProducerConsumer complete
mrsillydog Aug 11, 2020
79bd2d8
custom getColors() added for relevant classes
mrsillydog Aug 11, 2020
68f0993
Initial commit RW - only committing to bug hunt
mrsillydog Aug 12, 2020
d02e37f
ReaderWriter complete. Canvas mutexes improved
mrsillydog Aug 12, 2020
3c7087b
drawPixels back to texture-based; prep for CartCan
mrsillydog Aug 14, 2020
830b728
CartesianCanvas significant features complete
mrsillydog Aug 24, 2020
f90e17f
Mandelbrot + Voronoi fixed. Zoom() all that's left
mrsillydog Aug 28, 2020
0193597
Zoom fixed, more or less. Tests fixed
mrsillydog Aug 31, 2020
49c70c5
Small fixes; screenshot() bug fixed
mrsillydog Sep 2, 2020
7ff924e
Removed TextureHandler dependencies
mrsillydog Sep 2, 2020
88e3b03
Camera added; for OO stuff at least. Background?
mrsillydog Sep 3, 2020
6ea06fb
Camera functionality extended for Background
mrsillydog Sep 4, 2020
e7ce653
Incorporated in ZC's updated tests
mrsillydog Sep 5, 2020
a56fe03
Updates to Pandemic to allow for proper closing
mrsillydog Sep 24, 2020
19adede
Removed freeglut dependency
mrsillydog Sep 25, 2020
1c63310
Mac Retina display fixes
mrsillydog Sep 28, 2020
3c4cfa0
Retina display performance improvements
mrsillydog Sep 28, 2020
51db9ef
Final small fixes
mrsillydog Sep 29, 2020
3968f50
Merge branch 'master' into cleanup
mrsillydog Sep 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
188 changes: 85 additions & 103 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Master Makefile for TSGL

# *****************************************************
# Variables to control Makefile operation

AR=ar
CC=g++
RM=rm -f
Expand All @@ -6,31 +11,41 @@ PREFIX=/usr/local

SRC_PATH=src/TSGL/
TESTS_PATH=src/tests/
EXAMPLES_PATH=src/examples/
OBJ_PATH=build/
VPATH=SRC_PATH:TESTS_PATH:OBJ_PATH

HEADERS := $(wildcard src/TSGL/*.h)
SOURCES := $(wildcard src/TSGL/*.cpp)
TESTS := $(wildcard src/tests/*.cpp)
OBJS := $(patsubst src/TSGL/%.cpp,build/TSGL/%.o,${SOURCES})
TESTOBJS := $(patsubst src/tests/%.cpp,build/tests/%.o,${TESTS})
NOWARN := -Wno-unused-parameter -Wno-unused-function -Wno-narrowing
UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
OS_LFLAGS := -lpthread
OS_LDIRS := -L/opt/AMDAPP/lib/x86_64/
OS_EXTRA_LIB := -L/usr/lib
OS_GLFW := glfw
OS_GL := -lGL
OS_OMP := -fopenmp -lomp
OS_COMPILER := -std=c++0x
endif

ifeq ($(UNAME), CYGWIN_NT-10.0)
OS_LFLAGS := -lpthread
OS_LDIRS := -L/opt/AMDAPP/lib/x86_64/
OS_EXTRA_LIB := -L/usr/lib
OS_GL := -lGL
OS_OMP := -lgomp -fopenmp
OS_COMPILER := -std=gnu++11
endif

ifeq ($(UNAME), Darwin)
OS_LFLAGS := -framework Cocoa -framework OpenGl -framework IOKit -framework Corevideo
OS_LDIRS :=
OS_EXTRA_LIB :=
OS_GLFW := glfw
OS_EXTRA_LIB :=
OS_GL :=
OS_OMP := -fopenmp -lomp
OS_COMPILER := -std=c++0x
endif

CXXFLAGS=-O3 -g3 -ggdb3 \
Expand All @@ -45,11 +60,11 @@ CXXFLAGS=-O3 -g3 -ggdb3 \
-I/opt/AMDAPP/include/ \
-I/usr/include/c++/4.6/ \
-I/usr/include/c++/4.6/x86_64-linux-gnu/ \
-I/usr/lib/gcc/x86_64-linux-gnu/4.6/include/ \
-I/usr/lib/gcc/x86_64-linux-gnu/9/include/ \
-I/usr/include/freetype2 \
-I/usr/include/freetype2/freetype \
-I./ \
-std=c++0x -fopenmp \
$(OS_COMPILER) -fopenmp \
${NOWARN} -fpermissive
# -pedantic-errors

Expand All @@ -58,108 +73,114 @@ LFLAGS=-Llib/ \
${OS_EXTRA_LIB} \
-L/usr/X11/lib/ \
${OS_LDIRS} \
-ltsgl -lfreetype -lGLEW -l${OS_GLFW} \
-lX11 ${OS_GL} -lXrandr -Xpreprocessor -fopenmp -lomp -I"$(brew --prefix libomp)/include" \
-ltsgl -lfreetype -lGLEW -lglfw \
-lX11 ${OS_GL} -lXrandr -Xpreprocessor $(OS_OMP) -I"$(brew --prefix libomp)/include" \
${OS_LFLAGS}

DEPFLAGS=-MMD -MP

BINARIES= \
bin/test_specs \
bin/testAlphaRectangle \
bin/testArrows \
bin/testAura \
bin/testBallroom \
bin/testBlurImage \
bin/testCalcPi \
bin/testColorPoints \
bin/testColorWheel \
bin/testConcavePolygon \
bin/testConstructors \
bin/testConway \
bin/testCosineIntegral \
bin/testDumbSort \
bin/testFireworks \
bin/testForestFire \
bin/testFunction \
bin/testGetPixels \
bin/testGradientWheel \
bin/testGraydient \
bin/testGreyscale \
bin/testHighData \
bin/testImage \
bin/testImageCart \
bin/testInverter \
bin/testLangton \
bin/testLineChain \
bin/testLineFan \
bin/testMandelbrot \
bin/testMouse \
bin/testNewtonPendulum \
bin/testPhilosophers \
bin/testProducerConsumer \
bin/testPong \
bin/testProgressBar \
bin/testProjectiles \
bin/testReaderWriter \
bin/testRotation \
bin/testScreenshot \
bin/testSeaUrchin \
bin/testSmartSort \
bin/testSpectrogram \
bin/testSpectrum \
bin/testStar \
bin/testText \
bin/testTextCart \
bin/testTextTwo \
bin/testUnits \
bin/testVoronoi \
TESTFLAGS = -lsrc/TSGL/

# ****************************************************
# Targets needed to bring all files up to date

#Use make tsgl to make only the library files
all: dif tsgl tests docs tutorial
all: dif tsgl docs tutorial

debug: dif tsgl tests

dif: build/build

#This may change (for the Mac installer)!
#tsgl
ifeq ($(UNAME), Linux)
tsgl: lib/libtsgl.a lib/libtsgl.so
endif
ifeq ($(UNAME), CYGWIN_NT-10.0)
tsgl: lib/libtsgl.a lib/libtsgl.dll
endif
ifeq ($(UNAME), Darwin)
tsgl: lib/libtsgl.a lib/libtsgl.so
endif

tests: ${BINARIES}
# must run 'make' before 'make tests' and 'make examples'
tests: $(TESTS_PATH) lib/libtsgl.a
$(MAKE) -C $<
@touch build/build

examples: $(EXAMPLES_PATH) lib/libtsgl.a
$(MAKE) -C $<
@touch build/build

docs: docs/html/index.html

tutorial: tutorial/docs/html/index.html

cleanall: clean cleandocs
cleanall: clean cleantests cleanexamples cleandocs

clean:
$(RM) -r bin/* build/* lib/* tutorial/docs/html/* *~ *# *.tmp
$(MAKE) cleantests
$(MAKE) cleanexamples

cleantests:
(cd $(TESTS_PATH) && $(MAKE) clean)

cleanexamples:
(cd $(EXAMPLES_PATH) && $(MAKE) clean)

cleandocs:
$(RM) -r docs/html/*

# -include build/*.d

#install
ifeq ($(UNAME), Linux)
install:
test -d $(PREFIX) || mkdir $(PREFIX)
test -d $(PREFIX)/lib || mkdir $(PREFIX)
test -d $(PREFIX)/include || mkdir $(PREFIX)
install -m 0644 lib/libtsgl.a $(PREFIX)/lib
install -m 0755 lib/libtsgl.so $(PREFIX)/lib
cp -r src/TSGL $(PREFIX)/include
endif
ifeq ($(UNAME), CYGWIN_NT-10.0)
install:
test -d $(PREFIX) || mkdir $(PREFIX)
test -d $(PREFIX)/lib || mkdir $(PREFIX)
test -d $(PREFIX)/include || mkdir $(PREFIX)
install -m 0644 lib/libtsgl.a $(PREFIX)/lib
install -m 0755 lib/libtsgl.dll $(PREFIX)/lib
cp -r src/TSGL $(PREFIX)/include
endif
ifeq ($(UNAME), Darwin)
install:
test -d $(PREFIX) || mkdir $(PREFIX)
test -d $(PREFIX)/lib || mkdir $(PREFIX)
test -d $(PREFIX)/include || mkdir $(PREFIX)
install -m 0644 lib/libtsgl.a $(PREFIX)/lib
install -m 0755 lib/libtsgl.so $(PREFIX)/lib
cp -r src/TSGL $(PREFIX)/include
cp -r stb $(PREFIX)/include
endif

build/build: ${HEADERS} ${SOURCES} ${TESTS}
@echo 'Files that changed:'
@echo $(patsubst src/%,%,$?)

#lib/libtsgl.*
ifeq ($(UNAME), Linux)
lib/libtsgl.so: ${OBJS}
@echo 'Building $(patsubst lib/%,%,$@)'
$(CC) -shared -o $@ $?
@touch build/build
endif

ifeq ($(UNAME), CYGWIN_NT-10.0)
lib/libtsgl.dll: ${OBJS}
@echo 'Building $(patsubst lib/%,%,$@)'
$(CC) -shared -o $@ $? $(LFLAGS)
@touch build/build
endif
ifeq ($(UNAME), Darwin)
lib/libtsgl.so: ${OBJS}
@echo 'Building $(pathsubst lib/%,%,$@)'
Expand All @@ -173,44 +194,6 @@ lib/libtsgl.a: ${OBJS}
$(AR) -r $@ $?
@touch build/build

#List additional dependencies for test binaries
bin/testConway: build/tests/Conway/LifeFarm.o
bin/testFireworks: build/tests/Fireworks/Arc.o \
build/tests/Fireworks/Dot.o \
build/tests/Fireworks/Firework.o
bin/testInverter: build/tests/ImageInverter/ImageInverter.o
bin/testLangton: build/tests/Langton/AntFarm.o build/tests/Langton/LangtonAnt.o
bin/testMandelbrot: build/tests/Mandelbrot/Mandelbrot.o \
build/tests/Mandelbrot/GradientMandelbrot.o \
build/tests/Mandelbrot/Buddhabrot.o \
build/TSGL/VisualTaskQueue.o \
build/tests/Mandelbrot/Julia.o \
build/tests/Mandelbrot/Nova.o
bin/testPhilosophers: build/tests/DiningPhilosophers/Philosopher.o \
build/tests/DiningPhilosophers/Table.o
bin/testPong: build/tests/Pong/Pong.o build/tests/Pong/Paddle.o build/tests/Pong/Ball.o
bin/testProducerConsumer: build/tests/ProducerConsumer/Producer.o \
build/tests/ProducerConsumer/Consumer.o \
build/tests/ProducerConsumer/Thread.o \
build/tests/ProducerConsumer/PCThread.o
bin/testReaderWriter: build/tests/ReaderWriter/FLock.o \
build/tests/ReaderWriter/Lock.o \
build/tests/ReaderWriter/Reader.o \
build/tests/ReaderWriter/RLock.o \
build/tests/ReaderWriter/RWThread.o \
build/tests/ReaderWriter/Thread.o \
build/tests/ReaderWriter/WLock.o \
build/tests/ReaderWriter/Writer.o
bin/testSeaUrchin: build/tests/SeaUrchin/SeaUrchin.o
bin/testVoronoi: build/tests/Voronoi/Voronoi.o build/tests/Voronoi/ShadedVoronoi.o

#General compilation recipes for test binaries (appended to earlier dependencies)
bin/test%: build/tests/test%.o lib/libtsgl.a
mkdir -p bin
@echo 'Building $(patsubst bin/%,%,$@)'
$(CC) $^ -o $@ $(LFLAGS)
@touch build/build

build/%.o: src/%.cpp
@echo ""
@tput setaf 3;
Expand All @@ -221,7 +204,6 @@ build/%.o: src/%.cpp
$(CC) -c -fpic $(CXXFLAGS) $(DEPFLAGS) -o "$@" "$<"



#Doxygen stuff
docs/html/index.html: ${HEADERS} doxyfile
@echo ""
Expand All @@ -241,5 +223,5 @@ tutorial/docs/html/index.html: ${HEADERS} tutDoxyFile
mkdir -p tutorial/docs
doxygen tutDoxyFile

.PHONY: all debug clean tsgl tests docs tutorial dif
.PHONY: all debug clean tsgl docs tutorial dif
.SECONDARY: ${OBJS} ${TESTOBJS} $(OBJS:%.o=%.d)
Binary file added assets/pics/launch.bmp
Binary file not shown.
Binary file added assets/pics/lowDimImage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/shaders/shape.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#version 330 core
out vec4 FragColor;

in vec4 color;

void main()
{
FragColor = color;
}
15 changes: 15 additions & 0 deletions assets/shaders/shape.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec4 aColor;

out vec4 color;

uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

void main()
{
gl_Position = projection * view * model * vec4(aPos, 1.0);
color = aColor;
}
12 changes: 12 additions & 0 deletions assets/shaders/text.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#version 330 core
in vec2 TexCoords;
out vec4 FragColor;

uniform sampler2D text;
uniform vec4 textColor;

void main()
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
FragColor = textColor * sampled;
}
15 changes: 15 additions & 0 deletions assets/shaders/text.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;

out vec2 TexCoords;

uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

void main()
{
gl_Position = projection * view * model * vec4(aPos, 1.0);
TexCoords = vec2(aTexCoord.x, aTexCoord.y);
}
11 changes: 11 additions & 0 deletions assets/shaders/texture_simple.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#version 330 core
out vec4 FragColor;

in vec2 TexCoords;

uniform sampler2D texture1;

void main()
{
FragColor = texture(texture1, TexCoords);
}
15 changes: 15 additions & 0 deletions assets/shaders/texture_simple.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;

out vec2 TexCoords;

uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

void main()
{
gl_Position = projection * view * model * vec4(aPos, 1.0);
TexCoords = vec2(aTexCoord.x, aTexCoord.y);
}
Loading