Fix:修改.gitignore,不上传LSP语言文件
parent
dbe0bd3385
commit
e0e81e5dc6
13
.clangd
13
.clangd
|
|
@ -1,13 +0,0 @@
|
|||
CompileFlags:
|
||||
Add:
|
||||
- -std=c++20
|
||||
- -Wall
|
||||
- -I/toDataDrive/ARE/include/
|
||||
- -I/toDataDrive/ARE/lib/glad/
|
||||
- -I/toDataDrive/ARE/lib/stb/
|
||||
- -I/toDataDrive/ARE/lib/spdlog/include/
|
||||
Remove:
|
||||
|
||||
Diagnostics:
|
||||
Includes:
|
||||
AnalyzeAngledIncludes: No # 可选:不分析系统头文件以提升性能 [citation:4]
|
||||
|
|
@ -8,6 +8,12 @@ build/
|
|||
*.swo
|
||||
*~
|
||||
|
||||
# LSP files
|
||||
.clangd
|
||||
.clangd-format
|
||||
..clangd
|
||||
..clangd-format
|
||||
|
||||
# Compiled files
|
||||
*.o
|
||||
*.obj
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
# NanoEra 项目设计编码规范 (NanoEra Project Design and Coding Standards) V1.0
|
||||
## 一、模块
|
||||
1. 模块是项目的基本组成单元,每个模块应有且仅有明确的功能。
|
||||
2. 对于单个模块,其应该由以下两个部分组成:
|
||||
* 模块内容声明部分:包含模块的头文件(`.h`或`.hpp`文件),用于声明模块的接口和数据结构等。
|
||||
* 模块实现部分:包含模块的源代码文件(`.cpp`或`.c`文件),用于实现模块的功能逻辑。
|
||||
* 注:对于较为复杂的单个模块,可以使用多个头文件与源代码文件,但是必须全部组织于名为模块名称的文件夹内。
|
||||
3. 模块之间允许存在依赖关系,但应杜绝模块内容声明部分的循环依赖,以确保模块的独立性和可维护性。*特殊地,模块的实现之间允许循环依赖,如对于模块A和模块B,`B.cpp`导入了'A.h'且'A.cpp'导入了'B.h'是可以出现的,但是`A.h`与`B.h`间不允许出现任何引用关系。*
|
||||
4. **2.4节**中`extended_folders.list`里的保留文件夹名不应该作为模块名使用。
|
||||
|
||||
## 二、文件目录组织规范
|
||||
1. 项目根目录下应至少包含如下文件夹:
|
||||
* `include/`:存放头文件。
|
||||
* `src/`:存放源代码文件。
|
||||
* `lib/`:存放第三方库文件。
|
||||
* `build/`:存放编译生成的文件***(该文件夹应该由编译程序在构建项目时自动创建,并在清理构建时自动删除,而不是手动创建)***
|
||||
* `res/`:存放资源文件,如项目图标等内容。
|
||||
* `docs/`:存放项目文档。
|
||||
* `tests/`:存放测试代码。
|
||||
* `scripts/`:存放构建和部署脚本。
|
||||
* `experiments/`:用于项目测试记录留证和临时实验代码和数据归档。
|
||||
* 除此之外,项目根目录下还可以创建其他文件夹,但是必须在`git push`推送代码时注明文件夹用途。
|
||||
2. 对于头文件文件夹(`include/`文件夹)的特殊要求:
|
||||
* 原则上,项目的`include/`文件夹内不依赖任何非编译器内置库的模块和外部模块应该分别存储于`basic/`和`external/`两个子文件夹中。
|
||||
* 额外地,可以创建一些文件夹用于进行模块分类,但由于部分模块存储于文件夹中而不是单一文件中,故可在`include/`文件夹中创建`extended_folders.list`声明用于模块分类的文件夹,每行一个文件夹名称(格式如本文)。相应地,这部分保留文件夹名不应该作为模块名。
|
||||
3. 对于源代码文件夹(`src/`文件夹)的特殊要求:
|
||||
* 源代码文件应与其对应的头文件文件夹结构保持一致。
|
||||
4. `scripts/`文件夹内可以存储如下脚本文件:
|
||||
* `export_modules_requirements.sh`:基于`include/`和`src/`中的源码和`include/extended_folders.list`导出项目模块依赖关系。
|
||||
* `check_code.sh`:用于检查代码规范。
|
||||
5. 所有文件应统一采用UTF-8编码。如需多编码形式,可以在`scripts/`文件夹内创建相应的转换脚本。
|
||||
|
||||
## 三、编码规范
|
||||
1. 命名规范:
|
||||
* 文件夹、文件夹名应使用小写单词+下划线形式命名。
|
||||
* 函数名、变量名应使用小写单词+下划线形式命名。
|
||||
* 类、结构体等数据结构名应使用大驼峰命名法,数据结构成员变量及函数应后缀下划线进行标记。
|
||||
* 全局常量、宏定义、宏函数等应使用大写单词+下划线形式。
|
||||
* 全局变量应前缀`g_`并使用小写单词+下划线形式命名。
|
||||
1. 对于编码时头文件引用的要求:
|
||||
* 对于`include/`文件夹中的头文件,其应保证只引用模块接口和数据结构声明所必须的头,其余如实现时才需要的头文件应该在实现文件中引用。
|
||||
* 对于`src/`文件夹中的实现文件,其同样应保证只引用该文件所必须的头文件,同时不能引用模块头文件中已经引用过的头文件(因为模块实现文件中一定会包含模块声明的头文件,故应避免冲突include)。
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# NanoEra Project Design and Coding Standards V1.0
|
||||
## 1. Modules
|
||||
1. A module is the fundamental unit of a project. Each module should have one and only one well-defined functionality.
|
||||
2. A single module should consist of the following two parts:
|
||||
* Module Declaration: Contains the module's header files (`.h` or `.hpp`), used to declare the module's interfaces, data structures, etc.
|
||||
* Module Implementation: Contains the module's source code files (`.cpp` or `.c`), used to implement the module's functional logic.
|
||||
* Note: For more complex individual modules, multiple header files and source code files may be used, but they must all be organized within a folder named after the module.
|
||||
3. Dependencies between modules are allowed. However, circular dependencies in module declarations must be杜绝 to ensure module independence and maintainability. *Specifically, circular dependencies in module implementations are permitted. For example, it is acceptable for `B.cpp` to include `A.h` and for `A.cpp` to include `B.h`. However, any referencing relationship between `A.h` and `B.h` is prohibited.*
|
||||
4. The reserved folder names listed in `extended_folders.list` in **Section 2.4** should not be used as module names.
|
||||
|
||||
## 2. File and Directory Organization Standards
|
||||
1. The project root directory should contain at least the following folders:
|
||||
* `include/`: Stores header files.
|
||||
* `src/`: Stores source code files.
|
||||
* `lib/`: Stores third-party library files.
|
||||
* `build/`: Stores files generated during compilation. ***(This folder should be created automatically by the build program during project construction and deleted automatically during clean builds, not created manually.)***
|
||||
* `res/`: Stores resource files, such as project icons, etc.
|
||||
* `docs/`: Stores project documentation.
|
||||
* `tests/`: Stores test code.
|
||||
* `scripts/`: Stores build and deployment scripts.
|
||||
* `experiments/`: Used for archiving project test records and temporary experimental code and data.
|
||||
* In addition to these, other folders can be created in the project root directory. However, the purpose of any such folder must be documented during `git push`.
|
||||
2. Special requirements for the header file folder (`include/`):
|
||||
* In principle, modules within the project's `include/` folder that do not depend on any non-compiler-built-in libraries and external modules should be stored in the `basic/` and `external/` subfolders, respectively.
|
||||
* Additionally, folders can be created for module categorization. Since some modules are stored in folders rather than single files, an `extended_folders.list` file can be created within the `include/` folder to declare folders used for module categorization, with one folder name per line (formatted as in this document). Accordingly, these reserved folder names should not be used as module names.
|
||||
3. Special requirements for the source code folder (`src/`):
|
||||
* The structure of source code files should mirror that of their corresponding header files.
|
||||
4. The `scripts/` folder may contain the following script files:
|
||||
* `export_modules_requirements.sh`: Exports project module dependencies based on the source code in `include/` and `src/`, and `include/extended_folders.list`.
|
||||
* `check_code.sh`: Used for checking code standards compliance.
|
||||
5. All files should uniformly use UTF-8 encoding. If multiple encodings are necessary, corresponding conversion scripts can be created within the `scripts/` folder.
|
||||
|
||||
## 3. Coding Standards
|
||||
1. Naming Conventions:
|
||||
* Folder and file names should use lowercase words separated by underscores.
|
||||
* Function and variable names should use lowercase words separated by underscores.
|
||||
* Class, struct, and other data structure names should use PascalCase. Member variables and functions of data structures should be suffixed with an underscore.
|
||||
* Global constants, macro definitions, and macro functions should use uppercase words separated by underscores.
|
||||
* Global variables should be prefixed with `g_` and use lowercase words separated by underscores.
|
||||
2. Requirements for header file inclusion during coding:
|
||||
* Header files in the `include/` folder should only include headers strictly necessary for declaring module interfaces and data structures. Other headers, required only during implementation, should be included in the implementation files.
|
||||
* Implementation files in the `src/` folder should likewise only include headers strictly necessary for that specific file. They must not include headers that are already included in the module's header file (since the module's implementation file will always include the module's declaration header, this avoids conflicting includes).
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "=========================================="
|
||||
echo "Aurora Rendering Engine - System Check"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Check display server
|
||||
echo "1. Display Server:"
|
||||
if [ -n "$DISPLAY" ]; then
|
||||
echo " ✓ X11 detected: $DISPLAY"
|
||||
elif [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
echo " ✓ Wayland detected: $WAYLAND_DISPLAY"
|
||||
else
|
||||
echo " ✗ No display server detected!"
|
||||
echo " Please run this in a graphical environment"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check OpenGL
|
||||
echo "2. OpenGL Information:"
|
||||
if command -v glxinfo &> /dev/null; then
|
||||
GL_VERSION=$(glxinfo | grep "OpenGL version" | cut -d: -f2)
|
||||
GL_RENDERER=$(glxinfo | grep "OpenGL renderer" | cut -d: -f2)
|
||||
GL_VENDOR=$(glxinfo | grep "OpenGL vendor" | cut -d: -f2)
|
||||
|
||||
echo " Vendor: $GL_VENDOR"
|
||||
echo " Renderer:$GL_RENDERER"
|
||||
echo " Version: $GL_VERSION"
|
||||
|
||||
# Check version
|
||||
MAJOR=$(echo $GL_VERSION | grep -oP '\d+' | head -1)
|
||||
MINOR=$(echo $GL_VERSION | grep -oP '\d+' | head -2 | tail -1)
|
||||
|
||||
if [ "$MAJOR" -ge 4 ] && [ "$MINOR" -ge 5 ]; then
|
||||
echo " ✓ OpenGL 4.5+ supported"
|
||||
else
|
||||
echo " ✗ OpenGL 4.5+ NOT supported (found $MAJOR.$MINOR)"
|
||||
echo " This engine requires OpenGL 4.5 or higher"
|
||||
fi
|
||||
else
|
||||
echo " ✗ glxinfo not found (install mesa-utils)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check GLFW
|
||||
echo "3. GLFW Library:"
|
||||
if ldconfig -p | grep -q libglfw; then
|
||||
echo " ✓ GLFW library found"
|
||||
else
|
||||
echo " ✗ GLFW library not found"
|
||||
echo " Install: sudo apt-get install libglfw3-dev"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check GLM
|
||||
echo "4. GLM Library:"
|
||||
if [ -d "/usr/include/glm" ] || [ -d "/usr/local/include/glm" ]; then
|
||||
echo " ✓ GLM headers found"
|
||||
else
|
||||
echo " ✗ GLM headers not found"
|
||||
echo " Install: sudo apt-get install libglm-dev"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check GPU
|
||||
echo "5. GPU Information:"
|
||||
if command -v lspci &> /dev/null; then
|
||||
GPU=$(lspci | grep -i vga | cut -d: -f3)
|
||||
echo " GPU:$GPU"
|
||||
else
|
||||
echo " ✗ lspci not found"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check drivers
|
||||
echo "6. Graphics Drivers:"
|
||||
if lsmod | grep -q nvidia; then
|
||||
echo " ✓ NVIDIA driver loaded"
|
||||
if command -v nvidia-smi &> /dev/null; then
|
||||
DRIVER_VERSION=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader)
|
||||
echo " Driver version: $DRIVER_VERSION"
|
||||
fi
|
||||
elif lsmod | grep -q amdgpu; then
|
||||
echo " ✓ AMD driver (amdgpu) loaded"
|
||||
elif lsmod | grep -q i915; then
|
||||
echo " ✓ Intel driver (i915) loaded"
|
||||
else
|
||||
echo " ? Unknown driver"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "=========================================="
|
||||
echo "System check complete"
|
||||
echo "=========================================="
|
||||
|
|
@ -22,6 +22,9 @@ declare -A TYPE_EXTS
|
|||
TYPE_COLOR["C/C++"]="Cyan"
|
||||
TYPE_EXTS["C/C++"]='c cpp cc cxx h hpp hh hxx'
|
||||
|
||||
TYPE_COLOR["OpenGL Shader"]="Blue"
|
||||
TYPE_EXTS["OpenGL Shader"]='glsl frag vert comp'
|
||||
|
||||
TYPE_COLOR["C#"]="Green"
|
||||
TYPE_EXTS["C#"]='cs'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue