c# - IDirect3DTexture9::设置数据?

标签 c# c++ xna direct3d

在 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 等价物。有人知道这是什么吗?

最佳答案

关于c# - IDirect3DTexture9::设置数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2293923/

相关文章:

C# 非整数枚举和转换

c# - 模拟 OpenXML SDK SpreadsheetDocument

c++ - std::accumulate 使用 View std::ranges::views::values

c# - 从代码中获取 dll 引用的项目名称

c# - 在 Windows 8 Metro Windows Store 应用程序中合并声音文件音频和记录

c++ - 需要 dll 入口点问题/建议

C# 代码提供程序 : Add reference to XNA?

c# - VS2010 抛出 "Could not copy the file "obj\x86\Debug\[file].exe“因为找不到。”

c# - 在 WPF 中将 ResourceDictionary 与其他样式一起使用

C# dll 求解简单方程