how to make a rect.
if u just need a colored 2d rectangle:
with two triangles, made of transformed vertices which include data for a diffuse color
with two triangles, made of transformed vertices which include data for a diffuse color
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.
How much do you know about DX?
That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.
How much do you know about DX?
That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.
Try to make use of the d3ddevice->clear() parameters and see if it fits your needs, but using vertices would be the way to go...
cant i use
HRESULT ColorFill(
IDirect3DSurface9 * pSurface,
CONST RECT * pRect,
D3DCOLOR color
);
HRESULT ColorFill(
IDirect3DSurface9 * pSurface,
CONST RECT * pRect,
D3DCOLOR color
);
ok i tried using colorfill and it didnt work right.
so, how would i make a box using vertices?
see, i am tring to make a progressbar.
so, how would i make a box using vertices?
see, i am tring to make a progressbar.
Quote:Original post by kingnosis
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.
How much do you know about DX?
That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.
Actually, a triangle strip is pretty much pointless for one quad.
Quote:Original post by DaveQuote:Original post by kingnosis
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.
How much do you know about DX?
That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.
Actually, a triangle strip is pretty much pointless for one quad.
ok, so how would i do it?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement