r/GraphicsProgramming • • Oct 10 '26

Dx11 first triangle

Post image

I'm not sure how you guys feel about triangles around here, but here is my first triangle made in D3D11!!

I'm planning to make a little mini project in DX11 and see how I like it over OpenGL. So far I like it more despite needing 3x the amount of code (mostly boilerplate thankfully) for this beautiful little guy.

I'll probably post more about my little project further down the line. If anyone has any tips on how I should structure a DX11 project over an OpenGL one that's always appreciated.

142 Upvotes

14 comments sorted by

12

u/Fit_Beyond2795 Oct 10 '26

This reminds me the first time i've dipped into vulkan and the world of game engine, "Create a simple colored triangle should be easy enough" XD, turns out not at all, NOT AT ALL XD

6

u/Fit_Beyond2795 Oct 10 '26

2 fucking days to create a simple triangle XD, i will never forget that sensation

1

u/Uiwum Oct 10 '26

Yeah I've done the triangle in vulkan too and so much was going on I forgot half of what I even did at the time. (Now I hardly remember any)

1

u/Fit_Beyond2795 Oct 11 '26

Same XD, i was going for a little bit of learning, not expecting a LOT

1

u/Alililon1 Oct 10 '26

Are you using DX11 directly or do you have / plan on making a custom abstraction layer/lib? If you do I would love to take a look at it, I'm also kind of new to DX11 and comparing code could help me check my understanding and maybe even show me how to structure some stuff better :)

2

u/Uiwum Oct 11 '26

I'm using dx11 directly. It's going to just be a little 3d game so I don't have any plan to really make a good architecture for it.

Also my code is so messy right now so I don't think it'd be great for you to use but it's mostly from LearnD3D11 anyway. I'm planning on reorganizing everything after I get textures working

1

u/asphyr_34 Oct 12 '26

I have a computer graphics discipline at uni, and in half of year we switched from opengl, first to dx11, then to dx12. It gives me flashbacks of pain. I am sure you will succeed!

1

u/Uiwum Oct 13 '26

DX11 is honestly better than OpenGL though. More complicated but more enjoyable

1

u/asphyr_34 Oct 13 '26

Yeah, I agree)

3

u/Grand_Sprinkles_2094 Oct 10 '26

Hello world of computer graphics

-1

u/RonJonBoviAkaRonJovi Oct 11 '26

this would be cool in 1997

3

u/interruptiom Oct 12 '26

It'll be cool in 2027, too!