|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to `vita_gl_helpers` will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [0.2.0] - 2026-05-02 |
| 9 | + |
| 10 | +### Added |
| 11 | + |
| 12 | +#### RAII Resource Management |
| 13 | +- **`Handle<T>` generic wrapper** - Automatic GPU resource cleanup via `Drop` trait |
| 14 | +- **`Buffer`** - RAII buffer type with `Buffer::new()` and `Buffer::new_batch()` |
| 15 | +- **`Shader`** - RAII shader type with `Shader::compile(source, ShaderType)` |
| 16 | +- **`Program`** - RAII program type with `Program::link(&vert, &frag)` |
| 17 | +- **`Texture`** - RAII texture type with `Texture::new()` and `Texture::new_batch()` |
| 18 | + |
| 19 | +#### Builder Pattern Initialization |
| 20 | +- **`VitaGlBuilder`** - Fluent API for vitaGL configuration |
| 21 | + - `.resolution(width, height)` - Set display resolution |
| 22 | + - `.msaa(samples)` - Set MSAA level |
| 23 | + - `.ram_threshold(bytes)` - Set RAM threshold |
| 24 | + - `.shader_optimization(level)` - Set shader compiler optimization |
| 25 | + - `.fast_math(enabled)` / `.fast_precision(enabled)` / `.fast_int(enabled)` |
| 26 | + - `.build()` - Initialize and return `VitaGlContext` |
| 27 | +- **`VitaGlContext`** - Represents initialized graphics context |
| 28 | + - `.swap_buffers()` - Swap front/back buffers |
| 29 | + - `.resolution()` / `.width()` / `.height()` - Query display info |
| 30 | + - `.aspect_ratio()` - Get aspect ratio |
| 31 | + |
| 32 | +#### New Features |
| 33 | +- **`Sampler2D`** uniform type for texture binding |
| 34 | +- **`BoundTexture::set_linear_filtering()`** and `set_nearest_filtering()` helpers |
| 35 | +- **`BoundTexture::set_wrap()`** helper for texture wrapping |
| 36 | +- **`Texture::bind_to_unit()`** for easy texture unit binding |
| 37 | +- **`AttributeFormat` constants** - `FLOAT1`, `FLOAT2`, `FLOAT3`, `FLOAT4`, `UBYTE4_NORM`, `USHORT2_NORM` |
| 38 | +- **`GlError::is_error()`** and `GlError::description()` methods |
| 39 | +- **`check_error()`** - Returns `Result<(), GlError>` for `?` operator |
| 40 | +- **`assert_no_error()`** - Panics on GL error (debugging) |
| 41 | +- **`debug_check_error()`** - Conditional error checking with `debug-gl` feature |
| 42 | +- **`draw_arrays_instanced()`** function |
| 43 | +- **Additional draw modes** - `LineStrip`, `LineLoop`, `TriangleStrip`, `TriangleFan` |
| 44 | +- **`ElementsBufIdU16` / `ElementsBufIdU32`** - Draw with raw buffer IDs |
| 45 | + |
| 46 | +#### Documentation |
| 47 | +- Comprehensive module-level documentation with examples |
| 48 | +- Doc comments on all public types, traits, and functions |
| 49 | +- Code examples in doc comments |
| 50 | +- Migration guide from v0.1 |
| 51 | + |
| 52 | +#### Infrastructure |
| 53 | +- **GitHub Actions CI** - Check, test, fmt, clippy, docs |
| 54 | +- **Feature flags** - `debug-gl`, `logging` |
| 55 | +- **Prelude module** - `use vita_gl_helpers::prelude::*` |
| 56 | +- **PRD and ARD documents** - Project roadmap in `docs/` |
| 57 | + |
| 58 | +### Changed |
| 59 | +- **Rust edition** - 2024 → 2021 for stability |
| 60 | +- **Cargo.toml** - Added metadata (authors, description, repository, license, keywords, categories) |
| 61 | +- **`Program::use_program()`** - New preferred name (alias `use_me()` retained) |
| 62 | +- **`attribute_table!` macro** - Now supports trailing commas |
| 63 | +- **`uniform_table!` macro** - Now supports trailing commas |
| 64 | + |
| 65 | +### Deprecated |
| 66 | +- `load_shader()` → Use `Shader::compile()` instead |
| 67 | +- `link_program()` → Use `Program::link()` instead |
| 68 | +- `initialise_default()` / `initialise_extended()` → Use `VitaGlBuilder` |
| 69 | +- `RuntimeShaderCompilerSettings` → Use `VitaGlBuilder` |
| 70 | +- `VglInitSettings` → Use `VitaGlBuilder` |
| 71 | +- `GenDelBuffersExt` trait → Buffers auto-delete on drop |
| 72 | +- `GenDelTexturesExt` trait → Textures auto-delete on drop |
| 73 | +- `LegacyShader` / `LegacyProgram` → Use RAII types |
| 74 | + |
| 75 | +### Fixed |
| 76 | +- **Memory leaks** - All GPU resources now auto-cleanup via RAII |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## [0.1.0] - Initial Release |
| 81 | + |
| 82 | +### Added |
| 83 | +- Basic vitaGL initialization helpers |
| 84 | +- Buffer management with `GenDelBuffersExt` trait |
| 85 | +- Shader compilation via `load_shader()` |
| 86 | +- Program linking via `link_program()` |
| 87 | +- Texture management with `GenDelTexturesExt` trait |
| 88 | +- Vertex attribute configuration with `attribute_table!` macro |
| 89 | +- Uniform management with `uniform_table!` macro |
| 90 | +- Draw call helpers (arrays, elements, instanced) |
| 91 | +- GL error handling utilities |
| 92 | +- Example: triangle rendering |
| 93 | +- Example: instanced colorful grid |
0 commit comments