Skip to content

Commit d26b9e2

Browse files
committed
Added screenhsots to README
1 parent 0b83c2c commit d26b9e2

File tree

17 files changed

+43
-24
lines changed

17 files changed

+43
-24
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
lib*/**/*.o
22
lib*/**/*.a
3+
lib*
34
.vscode/ipch
5+
README.pdf

README.md

+28-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
<h1>Flib v1.1</h1>
2-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
3-
<h2>Description</h2>
4-
1+
# Flib v1.1
52
Classes for managing windows and creating OpenGL contexts (for Windows and Linux)
63
Automatic OpenGL functions loading
74
Wrapper classes for OpenGL objects (Texture, FrameBuffer, Shader etc)
85
Template classes (Vectors, Matrices, Polar vectors, Delegates)
96

10-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
11-
<h2>Compilation</h2>
7+
## Compilation
128

139
The library requires OpenGL development library to compile
14-
On Linux systems this means you need glx development library (e.g. from `mesa-common-dev`)<br>
15-
A `makefile` is loacted in `src/`
16-
Open a terminal in `src/` and call make
10+
On Linux systems this means you need glx development library (e.g. from `mesa-common-dev`) \
11+
Executing `make` in the `src` folder compiles the library.
12+
Building only the static or dynamic linkage can be done using `make dynamic` and `make static`. \
13+
To compile the tests call `make all` in the `test` folder.
14+
15+
Requirements: The library core requires only OpenGL 3.0 to work. OpenGL 4.4 preferred for more efficient implementations. Some tests use compute shaders and therefore require OpenGL 4.3. Tested all tests on Windows and Linux X11.
1716

18-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
19-
<h2>Troubleshooting</h2>
17+
## Troubleshooting
2018

2119
When compiling on Linux systems the following errors may arise
2220

@@ -29,19 +27,14 @@ Please note that the actual command may differ on your system,
2927
refer to your distribution's forum how to install the required
3028
development libraries
3129

32-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
33-
<h2>API Documentation</h2>
30+
## API Documentation
3431

35-
The source code uses selfdocumentation in doxygen style
36-
A compiled html version can be found on my site:
37-
http://makom789.web.elte.hu/docs/index.html
38-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
39-
<h2>Automatic testing</h2>
40-
Testing done via AutoTester (https://github.com/Frontier789/AutoTester)
32+
The source code uses selfdocumentation in doxygen style, compiled html version can be found [here](http://makom789.web.elte.hu/docs/index.html)
33+
## Automatic testing
34+
Testing done via my [AutoTester](https://github.com/Frontier789/AutoTester)
4135
<p align="center"><img src="https://raw.githubusercontent.com/Frontier789/AutoTester/master/result.png"/></p>
4236

43-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
44-
<h2>Citation</h2>
37+
## Citation
4538
The following public domain libraries are used by Flib:
4639
<ol>
4740
<li>
@@ -73,4 +66,17 @@ The following public domain libraries are used by Flib:
7366
</ul>
7467
</li>
7568
</ol>
76-
<p align="center"><b>====<img src="https://rorytrotter.files.wordpress.com/2013/03/red-circle.jpg" width="17"/>====</b></p>
69+
70+
## Gallery
71+
Screenshots of demos from the `test` folder.
72+
| | |
73+
:-----:|:----:
74+
![](screenshots/frac1.png) Modulated Menger Sponge| ![](screenshots/hexgen.png) Hexagon terrain generator
75+
![](screenshots/early_water.png) First attempt on water| ![](screenshots/mandelbrot.png) Taxicab Mandelbrot set
76+
![](screenshots/brick.png) Texmapped Phong| ![](screenshots/ant.png) NN + Evolutionary algorithm
77+
![](screenshots/tetRot.png) Bloom on fractal| ![](screenshots/sand2.png) Large particle system sand
78+
![](screenshots/gui.png) Dynamic GUI test| ![](screenshots/bsp.png) Binary space Partitioning collision
79+
![](screenshots/ball.png)
80+
<center>
81+
Raytraced balls
82+
</center>

include/FRONTIER/Graphics/Mesh.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace fg
5959
/// @brief Simple class describing a face of the mesh
6060
///
6161
/////////////////////////////////////////////////////////////
62-
class Face
62+
class FRONTIER_API Face
6363
{
6464
public:
6565
std::vector<fm::Uint32> indices; ///< The indices in the face

screenshots/ant.png

14.7 KB
Loading

screenshots/ball.png

926 KB
Loading

screenshots/brick.png

209 KB
Loading

screenshots/bsp.png

139 KB
Loading

screenshots/early_water.png

451 KB
Loading

screenshots/frac1.png

408 KB
Loading

screenshots/gui.png

23.9 KB
Loading

screenshots/hexgen.png

64.7 KB
Loading

screenshots/mandelbrot.png

26.6 KB
Loading

screenshots/sand1.png

60.6 KB
Loading

screenshots/sand2.png

70 KB
Loading

screenshots/tetRot.png

91.4 KB
Loading

src/System/util.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
/// ///
1616
////////////////////////////////////////////////////////////////////////// -->
1717
#include <FRONTIER/System/util/file_content.hpp>
18+
#include <FRONTIER/System/util/API.h>
1819
#include <fstream>
1920

2021
namespace fm
2122
{
22-
fm::Result file_content(std::string file,std::string &content)
23+
fm::Result FRONTIER_API file_content(std::string file,std::string &content)
2324
{
2425
std::ifstream in(file.c_str(), std::ios::in | std::ios::binary);
2526
if (in)

test/shaderTest/shaders/frag_5.glsl

+10
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ float torus_dist(vec3 p,float R,float r)
5050
return length(q)-r;
5151
}
5252

53+
float plane_dist(vec3 p,vec3 n,vec3 q)
54+
{
55+
vec3 l = p-q;
56+
return dot(n,l);
57+
}
58+
5359
vec3 rotateX(vec3 p,float a)
5460
{
5561
return vec3(p.x,p.y * cos(a) - p.z * sin(a),
@@ -115,6 +121,8 @@ float dist_func(vec3 p)
115121
r /= 3.01 + r*0.1;
116122
}
117123

124+
d = Substract(d,plane_dist(-vec3(1.2),normalize(vec3(1)),p));
125+
118126
return d;
119127
}
120128

@@ -132,6 +140,8 @@ vec2 dist_func_mat(vec3 p)
132140
r /= 3.01 + r*0.1;
133141
}
134142

143+
dmat = SubstractMat(dmat.x,plane_dist(-vec3(1.2),normalize(vec3(1)),p),dmat.y,12.0);
144+
135145
return dmat;
136146
}
137147

0 commit comments

Comments
 (0)