Question

I've heard about various methods of rendering to a Window, but these all involve using some thing such as GDI+, DirectX, OpenGL, or something else.

How do these libraries work, and how do they get pixels into a Window? Just out of curiosity, how hard is it to raw access a Window's image data?

Thanks.

Was it helpful?

Solution

That's a pretty broad question.

The various Windows subsystems that draw images interface with the video drivers. Or use so combination of working with GDI+ and interfacing with the video drivers. How the drivers work is going to depend on the video card manufacturer.

I don't know what you mean by "raw access a Window's image data." You can capture a window's image into a bitmap, massage it, and write it back to the window's DC. But getting to the actual bits that Windows uses to render the bitmap would require digging into undocumented data structures. You'd have to know how to follow a window handle down to the low-level data structures that are maintained inside the GDI subsystem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top