Advertisement

directx9 triangle

Started by September 16, 2022 01:12 AM
4 comments, last by pbivens67 2 years, 2 months ago

are there any good tutorials for manipulating triangles, I am trying get the colors to fade from one point to the next on a triangle

http://www.nemaloknig.net/read-49452/?page=6

ignore the shader parts.

you can also ignore the vertex buffer parts, and use drawprimitiveup instead

DrawPrimitiveUP(D3DPT_TRIANGLELIST

make the array with xyz,1,rgba color with the help D3DCOLOR_ARGB, u, v for each edges

SetFVF(D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1);

simply draw them with DrawPrimitiveUP(D3DPT_TRIANGLELIST

Advertisement

is this code applicable

DrawPrimitiveUP(D3DPT_TRIANGLELIST,1,0,0);

do you understand what a pointer is

it is a variable that holds a memory value that points to a variable

This topic is closed to new replies.

Advertisement