DirectX Drawing Rectangles
Graphics cards really can only draw triangles. A rectangle is 2 triangles:
So to draw the rectangle you draw 2 triangles: ABC and ADC
-me
A B*------*|\ || \ || \ || \ || \ || \|*------*C D
So to draw the rectangle you draw 2 triangles: ABC and ADC
-me
Why is that? It seems to me that rectangles would be easier to draw than triangles, but ok.... lol.
Quote:Original post by Matthew Shockley
Why is that? It seems to me that rectangles would be easier to draw than triangles, but ok.... lol.
You can make just about everything out of triangles except for smooth curves, but how do you make a triangle out of a rectangle? You can't. But you can make rectangles out of triangles. The hardware is designed to do one thing and do it fast, that thing is triangles.
-me
Oh, I understand. Can anyone give me some source code on drawing triangles? I am very new to DirectX.
I did the tutorials but you have to pay for them on DirectXTutorials.com when they get complicated.
what? they're all free. Or many of the other sites are. You can't draw a triangle yet, those ones are definitely free.
If you're copy-pasting the code, you're doing it wrong and not learning anything.
-me
If you're copy-pasting the code, you're doing it wrong and not learning anything.
-me
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement