Skip to content

Commit 8276a28

Browse files
authored
Merge pull request #43 from weigert/versioned
Versioned
2 parents c2b0d8c + 1aaea69 commit 8276a28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+744
-1591
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
main
22
imgui.ini
3-
*.dSYM
3+
*.dSYM
4+
.idea
5+
**/tmp
6+
tmp

Makefile

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# TinyEngine Build Recipe
22
# Author: Nicholas McDonald
3-
# Version 1.0
3+
# Version 1.7
44
# Tested on GNU/Linux
55

66
# Install Location Configuration
7-
LIBPATH = /usr/local/lib
8-
INCPATH = /usr/local/include
7+
LIBPATH = $(HOME)/.local/lib
8+
INCPATH = $(HOME)/.local/include
99

1010
# Compilation Settings
1111
CC = g++ -std=c++17
@@ -33,18 +33,18 @@ all: setup helpers install
3333
.PHONY: setup
3434
setup:
3535
@echo "Copying Core Header Files ...";
36-
@if [ ! -d "$(INCPATH)" ]; then mkdir $(INCPATH); fi;
37-
@if [ ! -d "$(INCPATH)/TinyEngine" ]; then mkdir $(INCPATH)/TinyEngine; fi;
38-
@cp TinyEngine.h $(INCPATH)/TinyEngine/TinyEngine
39-
@cp include/audio.h $(INCPATH)/TinyEngine/Audio
40-
@cp include/event.h $(INCPATH)/TinyEngine/Event
41-
@cp include/view.h $(INCPATH)/TinyEngine/View
42-
@cp include/utility/buffer.cpp $(INCPATH)/TinyEngine/Buffer
43-
@cp include/utility/instance.cpp $(INCPATH)/TinyEngine/Instance
44-
@cp include/utility/model.cpp $(INCPATH)/TinyEngine/Model
45-
@cp include/utility/shader.cpp $(INCPATH)/TinyEngine/Shader
46-
@cp include/utility/texture.cpp $(INCPATH)/TinyEngine/Texture
47-
@cp include/utility/target.cpp $(INCPATH)/TinyEngine/Target
36+
@if [ ! -d $(INCPATH) ]; then mkdir $(INCPATH); fi;
37+
@if [ ! -d $(INCPATH)/TinyEngine ]; then mkdir $(INCPATH)/TinyEngine; fi;
38+
@cp TinyEngine.hpp $(INCPATH)/TinyEngine/TinyEngine
39+
@cp include/audio.hpp $(INCPATH)/TinyEngine/Audio
40+
@cp include/event.hpp $(INCPATH)/TinyEngine/Event
41+
@cp include/view.hpp $(INCPATH)/TinyEngine/View
42+
@cp include/utility/buffer.hpp $(INCPATH)/TinyEngine/Buffer
43+
@cp include/utility/instance.hpp $(INCPATH)/TinyEngine/Instance
44+
@cp include/utility/model.hpp $(INCPATH)/TinyEngine/Model
45+
@cp include/utility/shader.hpp $(INCPATH)/TinyEngine/Shader
46+
@cp include/utility/texture.hpp $(INCPATH)/TinyEngine/Texture
47+
@cp include/utility/target.hpp $(INCPATH)/TinyEngine/Target
4848
@cp include/imgui/imgui.h $(INCPATH)/TinyEngine/imgui
4949
@cp include/imgui/imgui_impl_opengl3.h $(INCPATH)/TinyEngine/imgui_impl_opengl3
5050
@cp include/imgui/imgui_impl_sdl.h $(INCPATH)/TinyEngine/imgui_impl_sdl
@@ -66,7 +66,7 @@ install:
6666
@echo "Generating Static Library Archive ...";
6767
@ar cr tmp/libTinyEngine.a tmp/TinyEngine.o tmp/imgui.o tmp/imgui_demo.o tmp/imgui_draw.o tmp/imgui_widgets.o tmp/imgui_impl_opengl3.o tmp/imgui_impl_sdl.o
6868
@echo "Placing Compiled TinyEngine Library ...";
69-
@if [ ! -d "$(LIBPATH)" ]; then mkdir $(LIBPATH); fi;
69+
@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi;
7070
@cp tmp/libTinyEngine.a $(LIBPATH)/libTinyEngine.a
7171
@rm -rf tmp
7272
@echo "Done";
@@ -75,14 +75,14 @@ install:
7575
# TinyEngine Helpers #
7676
######################
7777

78-
HELPERS = camera color helper image object timer parse log
78+
HELPERS = camera color math image object timer parse log
7979

8080
.PHONY: helpers
8181
helpers:
8282
@echo "Copying Helper Header Files ...";
8383
@if [ ! -d "$(INCPATH)" ]; then mkdir $(INCPATH); fi;
8484
@if [ ! -d "$(INCPATH)/TinyEngine" ]; then mkdir $(INCPATH)/TinyEngine; fi;
85-
@$(foreach var,$(HELPERS), cp include/helpers/$(var).h $(INCPATH)/TinyEngine/$(var);)
85+
@$(foreach var,$(HELPERS), cp include/helpers/$(var).hpp $(INCPATH)/TinyEngine/$(var);)
8686
@echo "Done";
8787

8888
#######################
@@ -92,16 +92,30 @@ helpers:
9292
# Compiler / Linking Configuration
9393
TINYLINK = -lpthread -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lGLEW -lboost_system -lboost_filesystem
9494

95-
EXAMPLES = 0.0_Empty 0.1_Windowless \
96-
1.0_Image 2.0_Heightmap \
97-
3.0_Automata 4.0_Julia \
98-
5.0_Particles 6.0_Tree \
99-
7.0_SDF 8.0_Raymarch \
100-
9.0_Scene 10.0_Audio \
101-
11.0_Voronoi 12.0_Diffusion 13.0_Dither \
102-
15.0_Compute 16.0_Gravity 17.0_ODE3D \
95+
EXAMPLES = \
96+
0.0_Empty \
97+
0.1_Windowless \
98+
1.0_Image \
99+
2.0_Heightmap \
100+
3.0_Automata \
101+
4.0_Julia \
102+
5.0_Particles \
103+
6.0_Tree \
104+
7.0_SDF \
105+
8.0_Raymarch \
106+
9.0_Scene \
107+
10.0_Audio \
108+
11.0_Voronoi \
109+
12.0_Diffusion \
110+
13.0_Dither \
111+
15.0_Compute \
112+
16.0_Gravity \
113+
17.0_ODE3D \
103114
18.0_SphereVoronoi \
104-
19.0_LBM2D 19.1_LBM3D 19.2_CollidingBalls \
115+
19.0_LBM2D \
116+
19.1_LBM3D \
117+
19.2_CollidingBalls \
118+
19.3_LBM3D \
105119
20.0_Cloth
106120

107121
.PHONY: examples

TinyEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define TINYENGINE_NAMESPACE
22
#define TINYENGINE_UTILITIES
3-
#include "TinyEngine.h"
3+
#include "TinyEngine.hpp"
44

55
#include "include/audio.cpp"
66
#include "include/view.cpp"

TinyEngine.h renamed to TinyEngine.hpp

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1+
#ifndef TINYENGINE
2+
#define TINYENGINE
3+
4+
/*
5+
* TinyEngine
6+
* by Nicholas McDonald
7+
* https://github.com/weigert/TinyEngine
8+
*/
9+
10+
#define TINYENGINE_VERSION "1.7"
11+
112
#include <iostream>
213
#include <functional>
314
#include <initializer_list>
415
#include <string>
516
#include <csignal>
6-
using Handle = std::function<void()>;
7-
using slist = std::initializer_list<std::string>;
17+
#include <deque>
18+
#include <boost/filesystem.hpp>
19+
#include <sstream>
820

921
#include <GL/glew.h> //Rendering Dependencies
1022
#include <SDL2/SDL.h>
@@ -14,36 +26,32 @@ using slist = std::initializer_list<std::string>;
1426
#include <glm/glm.hpp>
1527
#include "glm/gtc/matrix_transform.hpp"
1628

17-
#include <sstream> //File / Console IO
18-
#include <iostream>
19-
#include <fstream>
20-
#include <boost/filesystem/operations.hpp>
21-
#include <boost/filesystem/path.hpp>
22-
23-
#include <deque>
24-
#include <unordered_map>
25-
29+
// Include Utility Headers
2630
#ifndef TINYENGINE_UTILITIES
2731
#define TINYENGINE_UTILITIES
2832

2933
#include <TinyEngine/Buffer>
30-
#include <TinyEngine/Texture>
34+
#include <TinyEngine/Instance>
35+
#include <TinyEngine/Model>
3136
#include <TinyEngine/Shader>
3237
#include <TinyEngine/Target>
33-
#include <TinyEngine/Model>
34-
#include <TinyEngine/Instance>
38+
#include <TinyEngine/Texture>
3539

3640
#endif
3741

38-
#include <TinyEngine/timer>
42+
using slist = std::initializer_list<std::string>;
43+
using Handle = std::function<void()>;
3944

45+
// TinyEngine Namespace / Entrypoint
4046
#ifndef TINYENGINE_NAMESPACE
4147
#define TINYENGINE_NAMESPACE
4248

4349
#include <TinyEngine/Audio>
4450
#include <TinyEngine/View>
4551
#include <TinyEngine/Event>
4652

53+
#include <TinyEngine/timer>
54+
4755
namespace Tiny{
4856

4957
static View view; //Window and Interface (Requires Initialization)
@@ -180,3 +188,4 @@ void loop(F function, Args&&... args){
180188
}
181189

182190
#endif
191+
#endif

examples/.SlimeMold/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/.SlimeMold/main.cpp

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)