Hacker GitHub

← All repos

Const-me/Vrmac

View on GitHub ↗ ★ 129 C#

Vrmac Graphics, a cross-platform graphics library for .NET. Supports 3D, 2D, and accelerated video playback. Works on Windows 10 and Raspberry Pi4.

86 mentions on Hacker News by 3 people: 1 story, 85 comments · first 2020-05-18 · latest 2024-10-09

Mentions per year 86 mentions · busiest year 2021 (34)
20082026
  1. …precise memory structure of the data Here’s a C# library for Linux where I’m doing all these things https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Rea... As you see from that readme, the performance is pretty good too.
    comment by Const-me · 2024-10-09 · in My negative views on Rust (2023)
  2. …to make it. Here’s a proof of concept for ARMv7 Debian (Raspberry Pi4), on top of GLES 3.1: https://github.com/Const-me/Vrmac/?tab=readme-ov-file#2d-gra...
  3. …MKV containers, is memory-safe C# apart from very small pieces, most of them in that static class: https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Con... And these functions are only used by Mpeg4 container parser. The parser for…
  4. …functions. Here’s couple examples of relatively complicated logic which uses loops instead of LINQ: https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Aud... https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Con...
  5. …Another example, here’s a library implementing a subset of ffmpeg for ARM Linux in memory-safe C#: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
  6. …is not LEB128, it's better. BTW I once implemented my own parser in C#, see that source file: https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Con...
    comment by Const-me · 2024-05-23 · in vu128: Efficient variable-length integers
  7. Couple times in the past I have implemented GPU-targeted GUI renderers, here’s an example: https://github.com/Const-me/Vrmac?tab=readme-ov-file#vector-... https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/VAA... 2D graphics have…
    comment by Const-me · 2024-01-29 · in New Renderers for GTK
  8. …a subset of ffmpeg for Raspberry Pi4 running 32-bit Linux, with no memory allocations in runtime: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
  9. …released in 2019), and unmanaged interop support is available since the very first 1.0 version. [0] https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Lin... [1] https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Lin... [2]…
    comment by Const-me · 2023-10-26 · in Was Rust Worth It?
  10. …support C interop. For many desktop and embedded projects this is a showstopper, here’s an example https://github.com/Const-me/Vrmac/tree/master/VrmacVideo That C# code directly consumes V4L2 and ASIO Linux kernel APIs, and calls unmanaged…
    comment by generichuman · 2023-10-26 · in Was Rust Worth It?
  11. …support C interop. For many desktop and embedded projects this is a showstopper, here’s an example https://github.com/Const-me/Vrmac/tree/master/VrmacVideo That C# code directly consumes V4L2 and ASIO Linux kernel APIs, and calls unmanaged…
    comment by Const-me · 2023-10-26 · in Was Rust Worth It?
  12. …a subset of ffmpeg and libavcodec C libraries for one particular platform, Linux on Raspberry Pi4: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
    comment by Const-me · 2023-08-19 · in Stable Diffusion in C/C++
  13. …downloaded 140k times: https://github.com/Const-me/SkyFM Cross-platform graphics library for .NET: https://github.com/Const-me/Vrmac Recently, offline speech-to-text for Windows: https://github.com/Const-me/Whisper At this point, I…
  14. …created with high resolution flag. Here's my attempt at making something similar, couple years ago: https://github.com/Const-me/Vrmac
    comment by Const-me · 2023-01-24 · in Minimal Cross-Platform Graphics
  15. > For how things actually work in practice Another version of the demuxer, way simpler: https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Con... A complete mpeg4 media file, with enough features to play the content with hardware…
    comment by Const-me · 2022-11-26 · in An MP4 file first draft
  16. …doesn’t need C++ to be good enough. Here’s an example, a video player library for Raspberry Pi4: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo As written on that page, just a few things are in C++ (GLES integration, audio…
  17. …fair, in modern GL versions they fixed some of these things. In GLES 3.1 which I used a lot on Pi4 https://github.com/Const-me/Vrmac/ GPU vertex buffers and shaders worked fine, GLSL compiler in the drivers worked fine too. However, others…
  18. Here's how I did that https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/VAA... Inexact but IMO pretty good still. With some modifications, the approach can be used in GLES2.
    comment by Const-me · 2022-07-16 · in Advice for the next dozen Rust GUIs
  19. …implement an equivalent on all modern platforms which have a 3D GPU. An open-source example in C# https://github.com/Const-me/Vrmac#vector-graphics-engine That particular one requires GLES 3.1, but I’m sure (did it before) it’s also…
    comment by Const-me · 2022-07-16 · in Advice for the next dozen Rust GUIs
  20. …good hardware support. I think the right way is building on top of 3D GPU APIs, like I did there: https://github.com/const-me/Vrmac#vector-graphics-engine
    comment by Const-me · 2022-05-01 · in Ask HN: Modern Alternatives to C
  21. …line in *.csproj file. If you think GC performance is not good enough, see that proof of concept: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo/Con... That C# code implements parser for Mpeg4 format. That format is way more…
  22. …but still doable. Here’s a relevant documentation from my graphics library for Raspberry Pi4: https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/VAA... Update: if you only need to support nVidia GPUs, they have a proprietary GL…
  23. …I mentioned in my comment. I do use them when performance matters, here’s an open-source example: https://github.com/Const-me/Vrmac/blob/1.2/Vrmac/Draw/Main/I... That code is from a 2D vector graphics library, these interface methods may…
    comment by Const-me · 2021-12-27 · in Why Is C Faster Than Java (2009)
  24. …performance over prolonged use. Your requirements are probably similar to this C# queues class: https://github.com/Const-me/Vrmac/blob/master/VrmacVideo/Aud... That library decodes and plays realtime video + audio, both low latency and…
    comment by Const-me · 2021-12-23 · in My negative views on Rust
  25. …TGA, it is trivially easy to write. Example in C# for grayscale version, a single page of code: https://github.com/Const-me/Vrmac/blob/1.2/VrmacInterop/Util... BMP is more complicated, unfortunately. The header structure is more complex.…
    comment by Const-me · 2021-11-10 · in Image file formats that didn’t make it
  26. …how to bring some abstractions for graphics (2d,3d) that would fit in 99% of the scenarios. I did: https://github.com/const-me/Vrmac/
  27. …need it here. Here’s my code which offloads CPU-bound pieces of 2D rendering to other CPU cores: https://github.com/Const-me/Vrmac/tree/master/Vrmac/Draw/Tes... Multithreading helped a lot.
  28. …vector graphics libraries. I have once made my own one when I needed something similar: https://github.com/Const-me/Vrmac#vector-graphics-engine
  29. This project https://github.com/Const-me/Vrmac implements unified keyboard+mouse input API over 3 distinct lower-level APIs: Win32 messages, XCB packets, and Linux raw input. Here’s for raw input: https://github.com/Const-me/Vrmac/tree/mast…
  30. …https://github.com/Const-me/SkyFM Here's somewhat similar modern code, also multimedia related: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
    comment by Const-me · 2021-09-01 · in C# for Systems Programming
  31. …_mm_dp_ps, _mm_extract_epi32, _mm_extract_epi64, _mm_shuffle_epi32. A similar list for this project https://github.com/Const-me/Vrmac (a GPU-centric library for 3D and 2D graphics, not using any AVX): _mm_shuffle_epi8, _mm_alignr_epi8,…
    comment by Const-me · 2021-08-15 · in AVX512/VBMI2: A Programmer’s Perspective
  32. …be interested in. I wonder do they have support for that in the Linux OS kernel, through V4L2? https://github.com/Const-me/Vrmac/tree/master/VrmacVideo
  33. …has all the lower-level pieces to implement a comparable equivalent. Here’s a proof of concept: https://github.com/Const-me/Vrmac#vector-graphics-engine
    comment by Const-me · 2021-08-12 · in So you want to write a GUI framework
  34. …antialiasing That’s subjective, I think these techniques are awesome fit for 2D. See this library: https://github.com/Const-me/Vrmac#2d-graphics BTW I have recently documented my antialiasing algorithm:…
    comment by Const-me · 2021-08-11 · in So you want to write a GUI framework
  35. …3.1 GPU. Still, I might be able to back port to GLES2, the GPU side is not terribly complicated: https://github.com/Const-me/Vrmac/
  36. …higher-level libraries. They are possible to implement on top of whichever GPU API is available https://github.com/Const-me/Vrmac#vector-graphics-engine but so far nobody did it well enough. It’s very similar situation with GPU compute on…
  37. …h264 stateful video decoder is enabled in official OS images, and works great in practice on Pi4: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo VLC player shipped in these OS images uses that one as well. If it doesn’t work for…
  38. …code. If your environment is anywhere similar, and you OK with .NET 2.1.18, you can try my package: https://github.com/Const-me/Vrmac/releases/tag/1.0 Sources: https://github.com/Const-me/Vrmac/tree/master/net-core
    comment by Const-me · 2021-03-23 · in Crystal 1.0 – What to expect
  39. …examples from my open-source projects: https://github.com/Const-me/vis_avs_dx/blob/master/legal.txt https://github.com/Const-me/Vrmac/blob/master/Pre-existing%2...
  40. …than C/C++ with intrinsics. Here’s a library which implements media player component for ARM Linux: https://github.com/Const-me/Vrmac/tree/master/VrmacVideo#per... It calls native code to present decoded video frames with GLES, and decode…
    comment by Const-me · 2021-03-19 · in Building a shared vision for Async Rust
  41. …will work without virtual calls, boxing, or any other runtime overhead. Example of that approach: https://github.com/Const-me/Vrmac/blob/1.2/Vrmac/Draw/Main/I...
  42. …GPU-based splines. AFAIK the research is not there just yet.” Verifiable because version control: https://github.com/Const-me/Vrmac/blob/bbe83b9722dcb080f1aed... For text, I think bitmaps are better than splines. I can see how splines are…
    comment by Const-me · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  43. …on the GPU and instead just blits glyphs from an atlas texture rendered with Freetype on the CPU: https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/Sha... In contrast, piet-gpu (the subject of the original blog post) has high enough…
    comment by glowcoil · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  44. Good question. If you use the fillRectangle method https://github.com/Const-me/Vrmac/blob/1.2/Vrmac/Draw/iDrawC... to draw them I think you should get solid fill. That particular API doesn’t use AA for that shape. Modern GPU hardware with…
    comment by Const-me · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  45. …that, the GPU abstraction library I’ve picked recompiles the HLSL into GLSL or others on the fly: https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/Sha... https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/Sha... These shaders…
    comment by Const-me · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  46. The quality is not good, and the performance is not even mentioned. I have used different approach: https://github.com/Const-me/Vrmac#vector-graphics-engine My version is cross-platform, tested with Direct3D 12 and GLES 3.1. My version…
    comment by Const-me · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  47. …with the standards of the formats themselves. I have implemented accelerated video playback myself https://github.com/Const-me/Vrmac/tree/master/VrmacVideo and I disagree. Needed a lot of these standards, not just for containers and audio,…
  48. …C# programmer can even write code which approaches or outperforms C. My Linux video player library https://github.com/Const-me/Vrmac/tree/master/VrmacVideo#per... uses CPU on par with VLC, and 20% less RAM.
  49. …them), for smooth surfaces you want per-vertex normals. Computing them well (like I did there https://github.com/Const-me/Vrmac#3d-gpu-abstraction-layer ) is slow and complicated.
    comment by Const-me · 2021-03-04 · in It Can Happen to You
  50. I once did something similar in C++, C# and HLSL: https://github.com/Const-me/Vrmac With more focus on GPU integration, and output quality. Unfortunately, these priorities resulted in more than an order of magnitude of code complexity,…
    comment by Const-me · 2021-02-22 · in Nuklear: A cross-platform GUI library in C