• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shader-slang / slang-rhi / 19445294570

17 Nov 2025 09:33PM UTC coverage: 31.358% (-1.2%) from 32.512%
19445294570

push

github

web-flow
Feature/example triangle (#578)

* Add files via upload

Update Example-Triangle

* Add example for triangle rendering

Add example-triangle to render a simple triangle

Modified files:
- `CMakeLists.txt`: Added `example-triangle` target to build system.
- `example-triangle.cpp`:  Introduced new source file for the triangle example.

Summary:
- Added a new example, `example-triangle`, to demonstrate rendering a simple triangle using Slang and the RHI framework.
- Updated `CMakeLists.txt` to include the new example in the build process when `SLANG_RHI_BUILD_EXAMPLES` is enabled.
- Implemented `ExampleTriangle` class:
  - Defined vertex structure and data for a triangle with RGB colors.
  - Set up a rendering pipeline with vertex and fragment shaders.
  - Created dynamic rendering logic with a cycling background color.
- Included inline shader source code for vertex and fragment processing.
- Ensured proper lifecycle management with `init`, `draw`, `update`, and `shutdown` methods.

* Update example-triangle.cpp

* fix Clang-Format in example-triangle.cpp (solving pre-commit issue format)

---------

Co-authored-by: Simon Kallweit <64953474+skallweitNV@users.noreply.github.com>

4129 of 17164 branches covered (24.06%)

Branch coverage included in aggregate %.

14398 of 41919 relevant lines covered (34.35%)

85.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

27.27
/src/command-list.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc