Commit 2aff0cea authored by Shu's avatar Shu 🍠
Browse files

Initial commit

Restart from Atomic
parents
# Images
*.bmp filter=lfs diff=lfs merge=lfs -text
*.dds filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.JPG filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.PNG filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.BMP filter=lfs diff=lfs merge=lfs -text
.vscode
build
docs
include
external
content/**/.*
\ No newline at end of file
{
"version": "0.2.0",
"configurations": [
{
"name": "Run (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/univerxel",
"args": [],
"preLaunchTask": "Build info",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Activer l'impression en mode Pretty pour gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Run (gdb debug)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/univerxel",
"args": [],
"preLaunchTask": "Build debug",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Activer l'impression en mode Pretty pour gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
\ No newline at end of file
{
"version": "2.0.0",
"tasks": [
{
"label": "clear",
"type": "shell",
"command": "rm -r ${workspaceRoot}/build && mkdir ${workspaceRoot}/build"
},
{
"label": "cmake",
"type": "shell",
"command": "cmake",
"args": [".."],
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "cmake info",
"type": "shell",
"command": "cmake",
"args": ["-DCMAKE_BUILD_TYPE=RelWithDebInfo", ".."],
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "cmake debug",
"type": "shell",
"command": "cmake",
"args": ["-DCMAKE_BUILD_TYPE=Debug", ".."],
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "make",
"type": "shell",
"command": "make",
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "exec",
"type": "shell",
"command": "./atomic",
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "exec memcheck",
"type": "shell",
"command": "valgrind --leak-check=full --show-leak-kinds=all --fair-sched=yes ./atomic",
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "exec helgrind",
"type": "shell",
"command": "valgrind --tool=helgrind --fair-sched=yes ./atomic",
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "exec callgrind",
"type": "shell",
"command": "valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --fair-sched=yes ./atomic",
"options": {
"cwd": "${workspaceRoot}/build"
}
},
{
"label": "Build",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["cmake", "make"]
},
{
"label": "Build info",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["cmake info", "make"]
},
{
"label": "Build debug",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["cmake debug", "make"]
},
{
"label": "Rebuild",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["clear", "Build"]
},
{
"label": "Run",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["Build", "exec"]
},
{
"label": "Run valgrind",
"group": "build",
"dependsOrder": "sequence",
"dependsOn": ["Build debug", "exec memcheck"]
}
]
}
\ No newline at end of file
cmake_minimum_required(VERSION 3.0)
project (univerxel VERSION 0.0.1)
cmake_policy(SET CMP0072 NEW)
find_package(OpenGL REQUIRED)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif(CCACHE_FOUND)
set(ALL_LIBS
${OPENGL_LIBRARY}
glfw
GLEW
pthread
)
add_definitions(
-DTW_STATIC
-DTW_NO_LIB_PRAGMA
-DTW_NO_DIRECT3D
-DGLEW_STATIC
-D_CRT_SECURE_NO_WARNINGS
-mavx2 #-mavx512f
-mfma
)
file(GLOB_RECURSE SOURCES "src/*.cpp")
file(GLOB IMGUI "include/imgui-1.76/*.cpp")
file(GLOB FASTNOISE "include/FastNoiseSIMD/*.cpp")
add_executable(univerxel ${SOURCES} ${IMGUI} ${FASTNOISE})
target_compile_features(univerxel PUBLIC cxx_std_17)
target_link_libraries(univerxel ${ALL_LIBS})
target_include_directories(univerxel PRIVATE "include/imgui-1.76/" "include/FastNoiseSIMD/")
file(COPY content/shaders DESTINATION ${CMAKE_BINARY_DIR}/content)
file(COPY content/textures DESTINATION ${CMAKE_BINARY_DIR}/content)
# Docs
add_custom_target(docs
COMMAND doxygen ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Build doc."
)
\ No newline at end of file
This diff is collapsed.
Copyright 2020 Maelys Bois
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
# Univerxel <!-- omit in toc -->
Work in progress galaxy down to atom (mostly centimeter) Voxel game
## Table of Contents <!-- omit in toc -->
- [About The Project](#about-the-project)
- [Built With](#built-with)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [RoadMap](#roadmap)
- [License](#license)
- [Contact](#contact)
<!-- ABOUT THE PROJECT -->
## About The Project
Experimental project using OpenGL.
### Built With
* C++
* OpenGL
* ImGui
* FasNoiseSIMD
* Love and insomnia
<!-- GETTING STARTED -->
## Getting Started
To get a local copy up and running, follow these simple steps.
### Prerequisites
* C++17
* CMake
* OpenGL
* GLFw
* Glew
### Installation
1. Clone the project repo
```sh
git clone https://git.wadza.fr/me/univerxel.git
```
2. Create build folder and move
```sh
mkdir build && cd build
```
3. Build CMake
```sh
cmake ..
```
4. Build Make
```sh
make
```
<!-- USAGE EXAMPLES -->
## Usage
```sh
./univerxel
```
Profit !
<!-- ROADMAP -->
## RoadMap
See [Features](TODO.md)
<!-- LICENSE -->
## License
Distributed under the MIT License. See (LICENSE)[LICENSE] for more information.
<!-- CONTACT -->
## Contact
Maelys Bois - [/me](https://git.wadza.fr/me) - me@wadza.fr
Project Link: [https://git.wadza.fr/me/atomic](https://git.wadza.fr/me/atomic)
# Features
## Data
- [ ] Hashed Octree
- [ ] Serialize
- [ ] Generate noise
- [ ] Edition
- [ ] Planet
## Rendering
- [x] Render triangle
- [ ] Avoid texture noise
- [ ] Skybox
- [ ] Better cheap planar
- [ ] Cascaded shadow maps
## Contouring
- [ ] Box contouring
- [ ] LOD
- [ ] Dual MC
- [ ] Collision
- [ ] Render with glBufferSubData
- [ ] Frustum Culling
- [ ] Occlusion Culling
\ No newline at end of file
#version 330 core
// Ouput data
layout(location = 0) out vec4 color;
void main(){
color = vec4(1, 0, 0, 0);
}
\ No newline at end of file
#version 330 core
layout(location = 0) in vec3 Position_modelspace;
uniform mat4 MVP;
void main(){
gl_Position = MVP * vec4(Position_modelspace,1);
}
#version 330 core
// Ouput data
layout(location = 0) out vec4 color;
uniform sampler2D Texture;
in vec2 UV;
void main(){
color = texture(Texture, UV);
}
\ No newline at end of file
#version 330 core
// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 Position_modelspace;
// Output data ; will be interpolated for each fragment.
out vec2 UV;
void main(){
gl_Position = vec4(Position_modelspace,1);
UV = (Position_modelspace.xy+vec2(1,1))/2.0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment