Skip to content

Commit c76f9da

Browse files
committed
[General] Full source code
0 parents  commit c76f9da

File tree

1,794 files changed

+297610
-0
lines changed

Some content is hidden

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

1,794 files changed

+297610
-0
lines changed

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Executable
2+
bin
3+
4+
# Build
5+
_build_
6+
7+
# Premake
8+
lib
9+
*.make
10+
11+
# JetBrains
12+
.idea
13+
14+
# C++ objects and libs
15+
*.slo
16+
*.lo
17+
*.o
18+
*.a
19+
*.la
20+
*.lai
21+
*.so
22+
*.so.*
23+
*.dll
24+
*.dylib
25+
26+
# Qt-es
27+
object_script.*.Release
28+
object_script.*.Debug
29+
*_plugin_import.cpp
30+
/.qmake.cache
31+
/.qmake.stash
32+
*.pro.user
33+
*.pro.user.*
34+
*.qbs.user
35+
*.qbs.user.*
36+
*.moc
37+
moc_*.cpp
38+
moc_*.h
39+
qrc_*.cpp
40+
ui_*.h
41+
*.qmlc
42+
*.jsc
43+
Makefile*
44+
*build-*
45+
*.qm
46+
*.prl
47+
48+
# Qt unit tests
49+
target_wrapper.*
50+
51+
# QtCreator
52+
*.autosave
53+
54+
# QtCreator Qml
55+
*.qmlproject.user
56+
*.qmlproject.user.*
57+
58+
# QtCreator CMake
59+
CMakeLists.txt.user*
60+
61+
# QtCreator 4.8< compilation database
62+
compile_commands.json
63+
64+
# QtCreator local machine specific files for imported projects
65+
*creator.user*
66+
*_qmlcache.qrc
67+
68+
# QMake stash
69+
.qmake.stash

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Soft Trace
2+
3+
OpenGL application displaying a textured heightmap.
4+
An `nPoints` vertices mesh is generated at runtime, along with its tangents and UVs.
5+
The information is fed into a basic graphics pipeline (vert + frag) that displaces the vertices
6+
and subsequently Blinn-Phong shades the resulting fragments. Three terrain textures are mixed according to height.
7+
The scene is illuminated by a single directional light.
8+
9+
## Project Structure
10+
11+
```plaintext
12+
heightmap/
13+
├── src/ # Source code, including shaders
14+
├── external/ # Bundled libraries' source code (GLFW, GLEW, GLM)
15+
├── assets/ # Static assets (.bmp files)
16+
├── _build_/ # Generated build files
17+
├── lib/ # Generated lib files
18+
├── bin/ # Generated executable files
19+
├── premake5.lua # Premake 5 config
20+
├── premake5 # Premake 5 executable (Linux)
21+
├── premake5.exe # Premake 5 executable (Windows)
22+
└── README.md # Project README
23+
```
24+
25+
## Environment - Linux
26+
27+
The following packages are required
28+
29+
```
30+
libxcursor-dev
31+
libx11-dev
32+
libxrandr-dev
33+
libxinerama-dev
34+
libxi-dev
35+
```
36+
37+
## Build
38+
39+
```bash
40+
./premake5 gmake2
41+
make
42+
```
43+
44+
## Run
45+
46+
```bash
47+
bin/main-debug-<arch>-<compiler>
48+
```
49+
50+
Example:
51+
52+
```shell
53+
bin/main-debug-x64-gcc
54+
```
55+
56+
## Technologies
57+
58+
* **Premake**: `5`
59+
* **C++**: `>= C++17`
60+
* **OpenGL**: `>= 4.2`
61+
* **GLFW**: `3.4.0`
62+
* **GLEW**: `1.13.0`
63+
* **GLM**: `0.9.7.1`
64+
65+
## Showcase

external/glew-1.13.0/LICENSE.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
The OpenGL Extension Wrangler Library
2+
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
3+
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
4+
Copyright (C) 2002, Lev Povalahev
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* The name of the author may be used to endorse or promote products
16+
derived from this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28+
THE POSSIBILITY OF SUCH DAMAGE.
29+
30+
31+
Mesa 3-D graphics library
32+
Version: 7.0
33+
34+
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
35+
36+
Permission is hereby granted, free of charge, to any person obtaining a
37+
copy of this software and associated documentation files (the "Software"),
38+
to deal in the Software without restriction, including without limitation
39+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
40+
and/or sell copies of the Software, and to permit persons to whom the
41+
Software is furnished to do so, subject to the following conditions:
42+
43+
The above copyright notice and this permission notice shall be included
44+
in all copies or substantial portions of the Software.
45+
46+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
47+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
49+
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
50+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
51+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52+
53+
54+
Copyright (c) 2007 The Khronos Group Inc.
55+
56+
Permission is hereby granted, free of charge, to any person obtaining a
57+
copy of this software and/or associated documentation files (the
58+
"Materials"), to deal in the Materials without restriction, including
59+
without limitation the rights to use, copy, modify, merge, publish,
60+
distribute, sublicense, and/or sell copies of the Materials, and to
61+
permit persons to whom the Materials are furnished to do so, subject to
62+
the following conditions:
63+
64+
The above copyright notice and this permission notice shall be included
65+
in all copies or substantial portions of the Materials.
66+
67+
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
68+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
70+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
71+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
72+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
73+
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

external/glew-1.13.0/README.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
GLEW - The OpenGL Extension Wrangler Library
2+
3+
http://glew.sourceforge.net/
4+
https://github.com/nigels-com/glew
5+
6+
See doc/index.html for more information.
7+
8+
If you downloaded the tarball from the GLEW website, you just need to:
9+
10+
Unix:
11+
12+
make
13+
14+
sudo -s
15+
16+
make install
17+
18+
make clean
19+
20+
Windows:
21+
22+
use the project file in build/vc12/
23+
24+
If you wish to build GLEW from scratch (update the extension data from
25+
the net or add your own extension information), you need a Unix
26+
environment (including wget, perl, and GNU make). The extension data
27+
is regenerated from the top level source directory with:
28+
29+
make extensions
30+
31+
An alternative to generating the GLEW sources from scratch is to
32+
download a pre-generated (unsupported) snapshot:
33+
34+
https://sourceforge.net/projects/glew/files/glew/snapshots/

external/glew-1.13.0/TODO.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Major:
2+
- add support for windows mini-client drivers
3+
- add windows installer (msi)
4+
- separate build of static and shared object files (for mingw and
5+
cygwin)
6+
- start designing GLEW 2.0
7+
8+
Minor:
9+
- make auto scripts work with text mode cygwin mounts
10+
- add support for all SUN, MTX, and OML extensions
11+
- make auto/Makefile more robust against auto/core/*~ mistakes
12+
- web poll on separating glew, glxew and wglew

external/glew-1.13.0/auto/blacklist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
EXT/draw_range_elements.txt
2+
EXT/static_vertex_array.txt
3+
EXT/vertex_array_set.alt.txt
4+
EXT/vertex_array_set.txt
5+
EXT/nurbs_tessellator.txt
6+
EXT/object_space_tess.txt
7+
SGI/filter4_parameters.txt
8+
SGIS/texture_color_mask.txt
9+
SGIX/dmbuffer.txt
10+
SGIX/instruments.txt
11+
SGIX/video_source.txt
12+
SGIX/hyperpipe_group.txt
13+
OES/OES_fixed_point.txt
14+
OES/OES_query_matrix.txt
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
GLX_AMD_gpu_association
2+
http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt
3+
GLX_AMD_gpu_association
4+
GLX_GPU_VENDOR_AMD 0x1F00
5+
GLX_GPU_RENDERER_STRING_AMD 0x1F01
6+
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
7+
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
8+
GLX_GPU_RAM_AMD 0x21A3
9+
GLX_GPU_CLOCK_AMD 0x21A4
10+
GLX_GPU_NUM_PIPES_AMD 0x21A5
11+
GLX_GPU_NUM_SIMD_AMD 0x21A6
12+
GLX_GPU_NUM_RB_AMD 0x21A7
13+
GLX_GPU_NUM_SPI_AMD 0x21A8
14+
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
15+
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list)
16+
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int* attribList)
17+
Bool glXDeleteAssociatedContextAMD (GLXContext ctx)
18+
unsigned int glXGetContextGPUIDAMD (GLXContext ctx)
19+
GLXContext glXGetCurrentAssociatedContextAMD (void)
20+
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int* ids)
21+
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void* data)
22+
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
GLX_ARB_get_proc_address
2+
http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.txt
3+
GLX_ARB_get_proc_address
4+
extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
GLX_ATI_pixel_format_float
2+
3+
GLX_ATI_pixel_format_float
4+
GLX_RGBA_FLOAT_ATI_BIT 0x00000100
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
GLX_ATI_render_texture
2+
3+
GLX_ATI_render_texture
4+
GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
5+
GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
6+
GLX_TEXTURE_FORMAT_ATI 0x9802
7+
GLX_TEXTURE_TARGET_ATI 0x9803
8+
GLX_MIPMAP_TEXTURE_ATI 0x9804
9+
GLX_TEXTURE_RGB_ATI 0x9805
10+
GLX_TEXTURE_RGBA_ATI 0x9806
11+
GLX_NO_TEXTURE_ATI 0x9807
12+
GLX_TEXTURE_CUBE_MAP_ATI 0x9808
13+
GLX_TEXTURE_1D_ATI 0x9809
14+
GLX_TEXTURE_2D_ATI 0x980A
15+
GLX_MIPMAP_LEVEL_ATI 0x980B
16+
GLX_CUBE_MAP_FACE_ATI 0x980C
17+
GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
18+
GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
19+
GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
20+
GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
21+
GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
22+
GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
23+
GLX_FRONT_LEFT_ATI 0x9813
24+
GLX_FRONT_RIGHT_ATI 0x9814
25+
GLX_BACK_LEFT_ATI 0x9815
26+
GLX_BACK_RIGHT_ATI 0x9816
27+
GLX_AUX0_ATI 0x9817
28+
GLX_AUX1_ATI 0x9818
29+
GLX_AUX2_ATI 0x9819
30+
GLX_AUX3_ATI 0x981A
31+
GLX_AUX4_ATI 0x981B
32+
GLX_AUX5_ATI 0x981C
33+
GLX_AUX6_ATI 0x981D
34+
GLX_AUX7_ATI 0x981E
35+
GLX_AUX8_ATI 0x981F
36+
GLX_AUX9_ATI 0x9820
37+
GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
38+
GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
39+
void glXBindTexImageATI (Display *dpy, GLXPbuffer pbuf, int buffer)
40+
void glXReleaseTexImageATI (Display *dpy, GLXPbuffer pbuf, int buffer)
41+
void glXDrawableAttribATI (Display *dpy, GLXDrawable draw, const int *attrib_list)

0 commit comments

Comments
 (0)