Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/angrycarrot789/r3modeller
A (WIP) 3d modelling program, using OpenGL, C# and WPF/MVVM
https://github.com/angrycarrot789/r3modeller
3d c-sharp modelling mvvm wpf
Last synced: about 1 month ago
JSON representation
A (WIP) 3d modelling program, using OpenGL, C# and WPF/MVVM
- Host: GitHub
- URL: https://github.com/angrycarrot789/r3modeller
- Owner: AngryCarrot789
- License: mit
- Created: 2023-07-18T21:18:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-31T16:40:56.000Z (over 1 year ago)
- Last Synced: 2024-11-12T01:35:34.424Z (3 months ago)
- Topics: 3d, c-sharp, modelling, mvvm, wpf
- Language: C#
- Homepage:
- Size: 1.43 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# R3Modeller
A (WIP) 3d modelling program, using OpenGL, C# and WPF/MVVMNot planning on competing with blender/C4d or anything lol... this is just a learning tool. I know so little about writing a performant OpenGL
app and mesh loading/generation, so I hope to learn that by writing a 3D modelling programI copied a bunch of boilerplate code from my other project, FramePFX, but I'm not even using 1% of it, which is why the project is so big. Most of the rendering code is in MainWindow.xaml.cs and SceneObject (I kinda just splattered a bunch of code everywhere for ease lol)
## Preview
This is what i've done so far. You can orbit by holding ALT and the left mouse button and moving your mouse
![](R3Modeller_2023-07-25_09.35.42.png)## OpenGL -> WPF
`glReadBuffer` and `glReadPixels` are used to write the backbuffer's pixels into a WriteableBitmap's BackBuffer.This does mean that rendering is done on the WPF/Main thread. I hope to soon figure out a way to implement higher level double buffering (using two WriteableBitmaps). I could just Lock the bitmaps and only unlock when a render is complete, but there's a problem with WPF in that when you move or resize (can't remember which once specifically, probably both) a window, DUCE will block and wait for the WriteableBitmap's Unlock function to be called, meaning Lock() and Unlock() need to be called in a somewhat short succession to prevent the entire app freezing forever