40 lines
701 B
Markdown
40 lines
701 B
Markdown
# how to build
|
|
```
|
|
g++ build.cpp -o build
|
|
./build
|
|
or
|
|
./build run
|
|
```
|
|
|
|
# Code style
|
|
|
|
## Naming Conventions:
|
|
- PascalCase:
|
|
- Functions
|
|
- Class names
|
|
- Struct names
|
|
|
|
- camelCase:
|
|
- Class attributes
|
|
- Class methods
|
|
- Struct attributes
|
|
- Variables
|
|
|
|
## Class Structure:
|
|
|
|
- Header (.h) Files:
|
|
- Declare public methods and attributes first, followed by private members.
|
|
- Implementation (.cpp) Files:
|
|
- Implement methods in the same order as declared in the corresponding header file.
|
|
|
|
## Include order
|
|
- Std
|
|
- local ( form inc dir )
|
|
- external raylib
|
|
|
|
|
|
## Generate shader .h files
|
|
```
|
|
xxd -i shaders/sun_100.fs > inc/sunShader.hpp
|
|
xxd -i shaders/sun_330.fs >> inc/sunShader.hpp
|
|
``` |