docs: update README and AGENTS.md to match current project
Updated project description from 'cube timer' to 'OpenGL 3D renderer with multiple scenes'. Added usage section with CLI flags and key bindings. Listed both available scenes. Updated AGENTS.md to include the sphere scene in static libraries and source layout. Normalized run command to ./build/cuber for cross-platform consistency.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
`cuber` is a simple cube timer application.
|
`cuber` is an OpenGL 3D renderer with multiple scenes.
|
||||||
|
|
||||||
## Build System
|
## Build System
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
```sh
|
```sh
|
||||||
cmake -S . -B build -GNinja
|
cmake -S . -B build -GNinja
|
||||||
ninja -C build
|
ninja -C build
|
||||||
.\build\cuber.exe
|
./build/cuber
|
||||||
```
|
```
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
@@ -36,7 +36,8 @@ The project is split into static libraries:
|
|||||||
|
|
||||||
- **`cbt_opengl`** — OpenGL abstraction and window management (window, context, buffer, texture, vao, shader, descriptor)
|
- **`cbt_opengl`** — OpenGL abstraction and window management (window, context, buffer, texture, vao, shader, descriptor)
|
||||||
- **`cbt_scene`** — Base scene class
|
- **`cbt_scene`** — Base scene class
|
||||||
- **`scenes_cube`** — Cube scene implementation
|
- **`scenes_cube`** — Spinning cube scene implementation
|
||||||
|
- **`scenes_sphere`** — Cube-to-sphere mapped mesh with diffuse lighting
|
||||||
|
|
||||||
### CMake Module Path
|
### CMake Module Path
|
||||||
|
|
||||||
@@ -120,6 +121,8 @@ cuber/
|
|||||||
scenes/ # Application scenes
|
scenes/ # Application scenes
|
||||||
cube.hpp # Spinning cube scene
|
cube.hpp # Spinning cube scene
|
||||||
cube.cpp # Cube scene implementation
|
cube.cpp # Cube scene implementation
|
||||||
|
sphere.hpp # Cube-to-sphere mapped mesh
|
||||||
|
sphere.cpp # Sphere scene implementation
|
||||||
deps/ # Custom Find*.cmake scripts
|
deps/ # Custom Find*.cmake scripts
|
||||||
Findfmt.cmake # fmt library
|
Findfmt.cmake # fmt library
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,30 +1,49 @@
|
|||||||
# cuber
|
# cuber
|
||||||
|
|
||||||
`cuber` is a simple cube timer.
|
`cuber` is an OpenGL 3D renderer with multiple scenes.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- CMake 3.21+
|
- CMake 3.21+
|
||||||
- Ninja
|
- Ninja
|
||||||
- C++23 compiler
|
- C++23 compiler
|
||||||
|
|
||||||
## Development
|
All dependencies (fmt, GLFW, GLAD, asio, GLM, stb) are fetched
|
||||||
|
automatically via CMake FetchContent.
|
||||||
**Configure**:
|
|
||||||
|
## Development
|
||||||
```sh
|
|
||||||
cmake -S . -B build -GNinja
|
**Configure**:
|
||||||
```
|
|
||||||
|
```sh
|
||||||
**Build**:
|
cmake -S . -B build -GNinja
|
||||||
|
```
|
||||||
```sh
|
|
||||||
ninja -C build
|
**Build**:
|
||||||
```
|
|
||||||
|
```sh
|
||||||
**Run**:
|
ninja -C build
|
||||||
|
```
|
||||||
```bash
|
|
||||||
./build/cuber.exe
|
**Run**:
|
||||||
```
|
|
||||||
|
```sh
|
||||||
|
./build/cuber
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
--duration <seconds> Auto-terminate after N seconds (for testing/CI)
|
||||||
|
--scene <cube|sphere> Select initial scene (default: cube)
|
||||||
|
--screenshot Render one frame, save screenshot, and exit
|
||||||
|
S key Take screenshot (saved as screenshot.png)
|
||||||
|
1/2 key Switch between cube/sphere scene
|
||||||
|
Q key Quit
|
||||||
|
```
|
||||||
|
|
||||||
|
## Scenes
|
||||||
|
|
||||||
|
- **cube** — spinning colored cube with per-face colors
|
||||||
|
- **sphere** — cube-to-sphere mapped mesh with per-face colors and
|
||||||
|
diffuse lighting
|
||||||
|
|||||||
Reference in New Issue
Block a user