Skip to content

Commit e8de525

Browse files
committed
Librarish pass: LICENSE, CHANGELOG, CONTRIBUTING, .editorconfig, .gitignore + README badges
- LICENSE: MIT, with vendor subdir attribution (Apache 2.0 for Vulkan-Headers, MIT for VMA, zlib/libpng for GLFW). - CHANGELOG.md: Keep a Changelog format; v0.1.0 + v0.2.0 entries. - CONTRIBUTING.md: 17-rule short form, commit style, branch workflow. - .editorconfig: 4-space indent, LF line endings, CRLF for .bat. - .gitignore: build artefacts, IDEs, CMake, OS cruft; keeps example/deps/libglfw3.a tracked. - README.md: added Platforms / C++17 / Vulkan 1.3 / Changelog badges; rewrote License section with vendor attribution; added Contributing + Changelog sections. - Removed empty core/ at repo root (reorg leftover).
1 parent 020bf87 commit e8de525

6 files changed

Lines changed: 244 additions & 1 deletion

File tree

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.{bat,cmd}]
12+
end_of_line = crlf
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[Makefile]
18+
indent_style = tab

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Build artefacts
2+
*.o
3+
*.obj
4+
*.exe
5+
*.exp
6+
*.lib
7+
*.pdb
8+
*.ilk
9+
*.dll
10+
*.so
11+
*.so.*
12+
*.dylib
13+
*.a
14+
!example/deps/libglfw3.a
15+
16+
# Shader cache / compiled SPIR-V (regenerated by build scripts)
17+
*.spv
18+
19+
# Editor / IDE
20+
.vscode/
21+
.vs/
22+
.idea/
23+
*.swp
24+
*.swo
25+
*~
26+
27+
# CMake (not used by VCK itself, but users may add)
28+
build/
29+
build-*/
30+
cmake-build-*/
31+
CMakeCache.txt
32+
CMakeFiles/
33+
cmake_install.cmake
34+
35+
# OS
36+
.DS_Store
37+
Thumbs.db
38+
39+
# Vendored GLFW binaries per platform (only libglfw3.a is tracked; see LICENSE)
40+
41+
# Wiki clone (if users clone it alongside)
42+
VCK.wiki/
43+
44+
# Local configs
45+
*.local

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
All notable changes to VCK are documented here. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
4+
5+
## [Unreleased]
6+
7+
## [0.2.0] - 2026-04-23
8+
9+
### Added
10+
- **Cross-platform support** (Windows / Linux / macOS) via `VCK::Window` + `VCKCrossplatform` facade over GLFW. `VCK_PLATFORM_WINDOWS/LINUX/MACOS` macros gate platform includes.
11+
- **`example/build.sh`** — Linux + macOS builder with the same `[1]-[9] / [A] / [0]` menu as `build.bat`; auto-detects OS, uses `pkg-config` for Vulkan + GLFW.
12+
- **Live resize as first-class**`VCK::HandleLiveResize(window, dev, sc, fb, pipe[, depth])` handles any OS resize (720p ↔ 4K) in one call per frame. Timeline-aware overloads in `layers/execution/` emit a `DebugTimeline` CPU span (rule 12).
13+
- **Anti-aliasing framework**`VCK::AATechnique` enum (`Auto, Off, MSAA, MSAA_A2C, SampleRate, FXAA, SMAA_1x, SMAA_T2x, TAA, TAAU`). `cfg.aa.technique = AATechnique::Auto` runs a 5-step decision tree at `VulkanSwapchain::Initialize`. Sample-based techniques implemented pipeline-side; post-process names returned via `swapchain.GetAATechnique()` for renderer to implement (rules 15/16).
14+
- **`VCK::VCKLog`** structured logger — `Info` (debug-gated) / `Notice` / `Warn` / `Error`. Console-spam dedup of identical consecutive `(tag, body)` lines. Classify helper parses legacy `LogVk("[Tag] body")` into the new levels.
15+
- **`cfg.debug`** flag (default `false`) — `VulkanContext::Initialize` wires it into `VCKLog::SetDebug()`.
16+
- **`cfg.pipeline.alphaToCoverage`** — flips `alphaToCoverageEnable` in pipeline multisample state.
17+
- **`cfg.pipeline.sampleRateShading` + `minSampleShading`** — enables per-sample shading.
18+
- **Repo reorganisation**: `layers/{core,expansion,execution,vmm}/` + `vendor/{vulkan_headers,glfw,vma}/`. `VCK.h` at root is the single source of truth for API documentation.
19+
- **Wiki**`Hello-VCK.md` (per-line walkthrough targeting 1-hour onboarding budget), `_Sidebar.md` (navigation).
20+
- **`LICENSE`**, **`CHANGELOG.md`**, **`CONTRIBUTING.md`**, **`.editorconfig`**, **`.gitignore`** at repo root.
21+
22+
### Changed
23+
- **`VK_CHECK`** now routes failures directly to `VCKLog::Error(…)` instead of the debug-gated `LogVk(…)` — fail loud regardless of `cfg.debug` (rule 14 fix).
24+
- **`VulkanContext::Initialize`** takes `VCK::Window&` (was `HWND` on Windows only); raw-handle overload preserved as escape hatch (rule 9).
25+
- **`<windows.h>` / `<vulkan_win32.h>`** guarded behind `VCK_PLATFORM_WINDOWS` in `VulkanHelpers.h` and `VCK.h` — no more platform leakage in the public surface.
26+
- **`docs/Design.md`** rule 4 allow-list updated to include `VulkanSwapchain::Recreate` and `HandleLiveResize` `vkDeviceWaitIdle` calls.
27+
- **Examples 1-9** ported to `VCK::Window` + `VCK::HandleLiveResize` — dropped raw `GLFWwindow*`, `HWND`, `g_Resized`, `g_Minimized`, `OnFramebufferResize`.
28+
29+
### Removed
30+
- `core/VulkanHelpers.cpp` (empty shell).
31+
- `core/` at repo root (moved to `layers/core/`).
32+
- `VMM/` at repo root (moved to `layers/vmm/`).
33+
- `BuildRequiredExtensions` helper in `VulkanContext.cpp` (dead code from pre-crossplatform era, no matching header decl).
34+
35+
## [0.1.0] - 2026-04-22
36+
37+
### Added
38+
- Initial VCK release.
39+
- `core/` (9 primitive classes + `VulkanHelpers`), `VCKExpansion` ([1]-[12] rendering building blocks), execution layer ([13]-[22] frame scheduling), `VMM/` (three-layer memory manager).
40+
- 17 design rules documented in `docs/Design.md`.
41+
- 9 example applications (`HelloExample`, `ModelExample`, `VMMExample`, `FrameSchedulerExample`, `TripleBufferExample`, `LockstepExample`, `SubmissionBatchingExample`, `JobGraphExample`, `DebugTimelineExample`).
42+
- `example/build.bat` Windows MinGW builder with `[1]-[9] / [A] / [0]` menu.
43+
- GitHub Actions CI (`.github/workflows/build.yml`) running `build.bat [A]` on Windows.
44+
45+
[Unreleased]: https://github.com/vKexterPLv/VCK/compare/v0.2.0...HEAD
46+
[0.2.0]: https://github.com/vKexterPLv/VCK/releases/tag/v0.2.0
47+
[0.1.0]: https://github.com/vKexterPLv/VCK/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Contributing to VCK
2+
3+
Thanks for wanting to contribute. VCK is small on purpose — no scene graph, no
4+
ECS, no material system — so most contributions fall into one of:
5+
6+
1. **Bug fix** in the core primitives, expansion layer, execution layer, or
7+
examples. Smallest-possible diff preferred.
8+
2. **New example** in `example/<Name>Example/` demonstrating a Vulkan feature
9+
with the same `main.cpp + App.{h,cpp}` pattern as the existing 9.
10+
3. **Docs / wiki polish** — the wiki is the 1-hour-onboarding surface; the
11+
`docs/` folder is where the source lives (wiki is mirrored from it).
12+
4. **Cross-platform fix** for Windows / Linux / macOS compile or runtime issues.
13+
14+
## Before you open a PR
15+
16+
- Read [`docs/Design.md`](docs/Design.md) — the 17 design rules are the
17+
architectural contract. PRs that violate a rule get a rework request unless
18+
the rule itself is being changed in the same PR.
19+
- Read [`VCK.h`](VCK.h) — the header block is the single source of truth for
20+
the API surface, class index, config, and quick-start. If you add a public
21+
class or config knob, update `VCK.h`.
22+
- Run `example/build.bat [A]` (Windows, MinGW) or `example/build.sh` (Linux /
23+
macOS) and confirm all 9 examples still compile.
24+
25+
## Design rules, in one line
26+
27+
1. Explicit over magic (Init/Shutdown pairs, no singletons).
28+
2. Core owns resources; expansion/execution borrow raw pointers.
29+
3. Strict lifecycle order (Context → Device → Swapchain → Command → Sync → …).
30+
4. No hidden synchronisation (documented `vkDeviceWaitIdle` allow-list in `docs/Design.md`).
31+
5. Memory is frame-scoped or persistent; no dangling state.
32+
6. No hidden behaviour; user-visible picks log as `VCKLog::Notice`.
33+
7. User owns the frame loop unless they opt into `FrameScheduler`.
34+
8. Explicit synchronisation model; no implicit ordering.
35+
9. Escape hatches everywhere — every wrapper exposes `Get<VkHandle>()`.
36+
10. Zero hidden GPU state.
37+
11. Deterministic frame behaviour under Pipelined / Lockstep; `AsyncMax` is documented nondeterminism.
38+
12. Explicit recreation events (logged + `DebugTimeline` spans).
39+
13. Debuggability is a core feature, not optional.
40+
14. Fail fast, fail loud (`VK_CHECK` routes to `VCKLog::Error`).
41+
15. Minimal core surface.
42+
16. No engine assumptions (no scene graph, no materials, no assets).
43+
17. The frame is the unit of truth.
44+
45+
## Branching
46+
47+
- `master` — stable; only merge via PR with a green CI.
48+
- `VCK` — current integration branch for v0.2 line.
49+
- Feature branches — `feature/<name>` or `fix/<issue>`.
50+
51+
## Commit style
52+
53+
- First line: ≤ 72 chars, imperative mood ("Add AA auto-detector", not "Added AA auto-detector").
54+
- Body (optional): wrap at 72 cols, explain *why* more than *what*.
55+
- No `--amend` on pushed commits; no `--no-verify`.
56+
57+
## Code style
58+
59+
- C++17. Follow the surrounding style of the file you're editing.
60+
- Include order: local (`"../../VCK.h"`) → third-party (`<vulkan/vulkan.h>`) → std (`<vector>`).
61+
- Prefer minimal comments; `VCK.h` header documents the API, not per-class
62+
headers.
63+
- `snake_case` for local variables, `camelCase` for functions/methods,
64+
`PascalCase` for types, `m_Member` for class members.
65+
66+
## Testing
67+
68+
VCK currently has no unit tests. CI on Windows runs `build.bat [A]` which
69+
compiles all 9 examples. Runtime validation is manual:
70+
71+
- Run an example, resize the window (including 720p ↔ 4K), confirm no
72+
stutter.
73+
- Run with `cfg.debug = true` and verify the `[Context]` / `[Device]` /
74+
`[Swapchain]` init chatter is visible.
75+
76+
## License
77+
78+
By contributing, you agree your work is licensed under the repo's MIT license
79+
(see [`LICENSE`](LICENSE)).

LICENSE

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
MIT License
2+
3+
Copyright (c) 2025-2026 vKexterPLv and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
---
24+
25+
This repository vendors third-party sources under their own licenses:
26+
27+
- vendor/vulkan_headers/ - Apache 2.0 (Khronos Group)
28+
- vendor/vma/ (Vulkan Memory Allocator) - MIT (Advanced Micro Devices)
29+
- vendor/glfw/ (headers) - zlib/libpng (Marcus Geelnard, Camilla Lowy, GLFW team)
30+
- example/deps/libglfw3.a - zlib/libpng (pre-compiled MinGW binary, same source
31+
as vendor/glfw)
32+
33+
See each vendor subdirectory for upstream LICENSE files or
34+
https://github.com/KhronosGroup/Vulkan-Headers ,
35+
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator ,
36+
https://github.com/glfw/glfw for originals.

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ macOS, plus a frame-level execution orchestration layer on top.
88
<sub>**not** an engine · no scene graph · no material system · you own the frame</sub>
99

1010
[![Windows build](https://github.com/vKexterPLv/VCK/actions/workflows/build.yml/badge.svg?branch=VCK)](https://github.com/vKexterPLv/VCK/actions/workflows/build.yml)
11+
[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)](docs/Build.md)
12+
[![C++17](https://img.shields.io/badge/C%2B%2B-17-blue)](CONTRIBUTING.md)
13+
[![Vulkan](https://img.shields.io/badge/Vulkan-1.3-red)](https://www.vulkan.org/)
1114
[![Docs](https://img.shields.io/badge/docs-wiki-blue)](https://github.com/vKexterPLv/VCK/wiki)
1215
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
16+
[![Changelog](https://img.shields.io/badge/changelog-keep%20a%20changelog-orange)](CHANGELOG.md)
1317

1418
</div>
1519

@@ -236,6 +240,20 @@ maintainer can push them to the `*.wiki.git` repo at any time.
236240
| [`docs/Build.md`](docs/Build.md) | Windows / Linux / macOS: Vulkan SDK + GLFW + `build.bat` / `build.sh` |
237241
| [`docs/Design.md`](docs/Design.md) | design rules, status, caveats, roadmap |
238242

243+
## Contributing
244+
245+
PRs welcome. Read [`CONTRIBUTING.md`](CONTRIBUTING.md) for the 17-rule
246+
architectural contract, commit style, and branching workflow. Small,
247+
focused diffs preferred; new public API goes in [`VCK.h`](VCK.h) (the
248+
single source of truth).
249+
250+
## Changelog
251+
252+
See [`CHANGELOG.md`](CHANGELOG.md) for the per-version list of added,
253+
changed, and removed items. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
254+
239255
## License
240256

241-
See the repository for license information.
257+
[MIT](LICENSE) — vendored third-party sources in `vendor/` keep their own
258+
licenses (Apache 2.0 for Vulkan-Headers, MIT for VMA, zlib/libpng for
259+
GLFW). See the [`LICENSE`](LICENSE) file for the full list.

0 commit comments

Comments
 (0)