How to use ID2D1Bitmap::CopyFromMemory

  • Thread starter Thread starter LordSyth
  • Start date Start date
L

LordSyth

Guest
I have been trying to learn [the basics of] Direct2D in C++, and I came across this method

CopyFromMemory

which seems like a perfect thing for me to use to modify individual pixels: I can modify the buffer and then call the method.

However, the documentation does not say what the void* parameter is supposed to take; I've tried several things, including arrays of bytes, floats, and unsigned ints. None of them did as I hoped.

After looking many things up, it seems to be related to the pixel format of the bitmap; however, I can't seem to match my array's type to the pixel format the method is expecting. My bitmap always shows up as being just black.

What kind of pointer should I pass the method so that I can do this?

Continue reading...
 
Back
Top