【发布时间】:2023-03-14 08:33:02
【问题描述】:
在 XNA 中,你可以这样做
texture = new Texture2D( GraphicsDevice, width, height ) ;
我猜在 MSFT 的深处,这相当于 C++ 代码:
D3DXCreateTexture( GraphicsDevice, width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture ) ;
在 XNA 中,有一个漂亮的函数可以让您设置已创建纹理的像素值:
texture.SetData<Color>( new Color[]{ pixel, values, pixel, values ) ;
现在我非常肯定必须有一个 C++ DirectX 等价物。有人知道是什么吗?
【问题讨论】: