开发者

IDirect3DTexture9::SetData?

开发者 https://www.devze.com 2022-12-20 11:49 出处:网络
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:

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

精彩评论

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