开发者

IDirect3DTexture9::SetData?

In XNA, you can do

texture = new Texture2D( GraphicsDevice, width, height ) ;

I'm guessing somewhere deep down in the MSFT bowels, this is equivalent to C++ code:

D3DXCreateTexture( GraphicsDevice, width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture ) ;

In XNA there's this nifty function that 开发者_C百科lets you set the pixel values of a texture you've created:

texture.SetData<Color>( new Color[]{ pixel, values, pixel, values ) ; 

Now I'm pretty sure there's got to be a C++ DirectX equivalent. Anyone know what it is?


I found it.. IDirect3DTexture9::LockRect()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜