Raw Access to an area within a window

Hi,

how do I get raw access to a defined area within a window?
I.e. I want to access the defined area pixel-by-pixel, as if accessing memory in a display controller. Is there an easy way to do this?

Greetings,
Marc

Just create a PtRaw, you can define a draw-function for this type in which you can access every pixel.

If you just want to read the current pixel, you could use the ScreenContext

ok I phrased my question wrong … :wink:
I would like to have raw access to the display on a memory mapped basis,
i.e. I would like write to a range of addresses. Calling a set/read function for
every pixel is not really practical for performance reasons…
Is there any way to do this?

Greetings,
Marc

find the mmap() and read the direct access to Graphic memory address A0000

That’s VGA memory, that would only work if you use the vga driver.

The official way is to do it via OffscreenContext and work from there. You should not access video ram directoy. First it may interfere with Photon, second read operation will be very slow as the AGP/PCI/PCIe bus arent’ async friendly. It’s mean to work with DMA operation. It might also be non portable because of the way the video ram may be setup ( 16bit, 24 bits, 32 bits etc)