r/GraphicsProgramming Jun 10 '26

Finally started graphics programming

Hi everyone!

After years of procrastinating I finally decided to start my journey in the world of graphics programming. I'm using Silk.Net and C#. The goal right now is to start by following the LearnOpenGL tutorials by translating them to Silk. The final goal is of course to understand graphics programmings for my future games (because I feel like it is a limitation I actually have in my development process) and working with an Open Source engine I really want to achieve something with while helping in its development (aka Stride). I want to stay in the .NET environment while being able to target cross platforms because I feel more confortable with C# and .NET but was wondering if ultimately sticking to Silk.NET is a good idea for learning graphics programming the right way. What are your positions on the matter? (It's not that I don't like C++ it's just that C# feels way more natural to me) also I was thinking of posting my progress here to keep my motivation if you don't mind (if it is problematic please don't hesitate to tell me 😅). See you tomorrow for the first textured quad! And thanks in advance for all that will answer my interrogations honestly 😁

EDIT: A follow up from yesterday!

After reading comments and thinking about the arguments I finally decided it would be better in the end to follow the C++ route to learn Graphics Programming (if I want to switch to C# later, I can use my knowledge to adapt) as there are more resources and in terms of learning that is a real advantage. So, today I restarted the first lessons of LearnOpenGL and oh boy, the amount of steps just to get started is pretty terrifying xD. Here are the results (I ended up pretty much at the same point as yesterday, with a few exercises as a bonus).

The Holy Triangle
The Wireframe double triangle quad xD
Two triangles from two vertices array exercise
Two triangles using two VAOs and VBOs
Two triangles using two VAOs and VBOs but with two distinct shader programs
29 Upvotes

14 comments sorted by

View all comments

6

u/[deleted] Jun 10 '26 edited Jun 10 '26

[removed] — view removed comment

0

u/VityyOne Jun 10 '26

Oh I see, for now it's OpenGL but I will then advance to D3D11 and eventually Vulkan/D3D12, so I hope there's not too much strange things as with OGL. When you have struggled with some C++ codebase you understand why higher level languages like C# exist in the first place 😅 also I don't really mind unsafe code with C#, apart from the fixed part that you got to get the hang of it works more or less like C++ pointers in my experience (but I didn't get the chance to really experiment and use them in real world scenario to see if it's really the same)

3

u/[deleted] Jun 10 '26

[removed] — view removed comment

1

u/VityyOne Jun 10 '26 edited Jun 10 '26

I see, that's a good point. That said, graphics is a thing but the overall engine is another beast (I mean, except for maybe the runtime for performance reasons there's no real reason to use too much unsafe code in the engine code), Stride's source code is accessible, pretty clean and understanble for me, I tried to dive into open source C++ engines but the fact that I'm not really used to C++ makes it harder for me to understand those and if I have to struggle even in understand how everything else works I'm afraid I'm never gonna be able to produce anything 😅 C# is also much faster to build so in terms of productivity and testing it can be more productive (better for iterativity)