English 中文(简体)
我如何使用衍生工具,从而利用我界定的建筑的彩色价值?
原标题:How do I use DrawPrimitiveUP so it uses the color value from my defined struct?
  • 时间:2010-06-20 18:11:39
  •  标签:
  • c++
  • directx

我需要用提纲提炼线,我需要使用我确定的结构的彩色价值。

守则的重要要点:

struct PointVertexColor
{
 float x, y, z;   // Position
 DWORD color;   //Colour
};

#define D3DFVF_PointVertexColor ( D3DFVF_XYZ | D3DFVF_DIFFUSE ) 

PointVertexColor myLines[1024];

device->DrawPrimitiveUP( D3DPT_LINELIST, myLinesCount, myLines, sizeof( PointVertexColor ) );

我有一套灯光灯,光灯也使灯光化,而且灯光亮。

问题在于,如果我制造材料,它就使用材料颜色,而不是我数据结构的材料。 我如何确定它如何使用DWORD彩色,然后将其重新用于以后的代码?

最佳回答

如果你知道,问题就很明显——你可以同时使用外衣和照明。 解决办法是,对法典的这一部分进行可调和,然后在以后再行。

希望能帮助同一问题的人。

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签