XNU programming.

Discussion in 'Mac Programming' started by mif, Feb 25, 2011.

  1. mif macrumors regular

    Joined:
    Feb 16, 2010
    Location:
    home
    #1
    Are there any hardcore programmers?

    void *CGDisplayBaseAddress(CGDirectDisplayID display)

    is deprecated since Snow Leo and may vanish completely in the future. No replacement from Apple. I need it. Same thing with CGDisplayBitsPerPixel() and CGDisplayBytesPerRow().

    Is it possible to get it another way (IOKit). I don't have any experince with kernel services.

    -IOFBGetFramebufferOffsetForAperture?
    -IOFBGetFramebufferInformationForAperture?

    I can't get these working properly.
     
  2. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    Start looking at CGWindowListCreateImageFromArray and related functions. Giving apps direct access to a framebuffer is a major, major pain for the graphics subsystem. I would assume this isn't a deprecated interface, but deprecated functionality.
     
  3. mif thread starter macrumors regular

    Joined:
    Feb 16, 2010
    Location:
    home
    #3
    Pity. Gone are the "good" old days. Direct access to hardware. Crashes.

    Still it would be nice to have total control. Draw one pixel at time or copy bytes from buffer to screen. No GPU unless needed.
     
  4. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    And who do you think moves the information from the CPU's memory bus to video memory? With huge overhead because video memory is likely organised different from main memory?
     
  5. subsonix macrumors 68040

    Joined:
    Feb 2, 2008
    #5
    Basically you have to go back in time and use computers of the past to enjoy unprotected mode and memory mapped io in all it's glory (and pain). :p
     
  6. mif thread starter macrumors regular

    Joined:
    Feb 16, 2010
    Location:
    home
    #6
    Let me guess. GPU? :D

    PowerMac was terrible is this regard. Altivec did not help that much. When i moved to Mac Pro and used SSE, it was tolerable, over 100 fps at 2560 X 1600 32-bit. AVX can move 256 bit chunks, even better.

    Reading from VRAM is much slower than writing. In PowerPC it was somewhat different.

    Well. In ray-tracing it does not matter so much unless i find better algorithm for polygon sorting than spatial subdivision. No real time here unless only hundreds of polygons.
     
  7. mif, Feb 25, 2011
    Last edited: Feb 25, 2011

    mif thread starter macrumors regular

    Joined:
    Feb 16, 2010
    Location:
    home
    #7

Share This Page