Skip navigation.
Home
The QNX Community Portal

View topic - Raw Access to an area within a window

Raw Access to an area within a window

Isn't the name clear?

Raw Access to an area within a window

Postby rsl-rmc » Fri Jul 04, 2008 1:16 pm

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
rsl-rmc
New Member
 
Posts: 5
Joined: Tue Jul 01, 2008 1:10 pm

RE: Raw Access to an area within a window

Postby micro » Fri Jul 04, 2008 3:06 pm

Just create a PtRaw, you can define a draw-function for this type in which you can access every pixel.
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

RE: Raw Access to an area within a window

Postby micro » Fri Jul 04, 2008 3:07 pm

If you just want to read the current pixel, you could use the ScreenContext
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm

Postby rsl-rmc » Tue Jul 08, 2008 3:31 pm

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
rsl-rmc
New Member
 
Posts: 5
Joined: Tue Jul 01, 2008 1:10 pm

Postby wwx » Mon Oct 13, 2008 2:16 am

find the mmap() and read the direct access to Graphic memory address A0000
wwx
New Member
 
Posts: 2
Joined: Wed Oct 08, 2008 2:14 am

Postby mario » Tue Oct 14, 2008 2:25 pm

wwx wrote: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.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby mario » Tue Oct 14, 2008 3:26 pm

rsl-rmc wrote: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


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)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests