1

I've been playing around with directx for about a week now. I recently bump in to the default objects, and I played around with it. I can animate it, I can do alot with it, but I have no idea how to put vertex color(again not material). Default object is not really the right word to use so here are the list of functions that would generate these "default objects"

  • D3DXCreateBox
  • D3DXCreateSphere
  • D3DXCreateCylinder
  • D3DXCreateTeapot
  • D3DXCreatePolygon
  • D3DXCreateTorus

So can someone lay out the way on how to get the vertex buffers and then fill it with color data. I can do it with objects that I had to layout the vertex manually but not in these default mesh.

4

1 回答 1

0

尝试使用 HLSL 语言 ..

高级着色器语言。这是 DirectX 用于对渲染管道的特定部分进行编程的脚本,为图形程序员提供了在特殊效果方面的广泛灵活性。

于 2012-07-21T13:47:24.920 回答