Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2005



Tip: Looking for answers? Try searching our database.

OSX vertical blanking outside openGL ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert G. Smith - 08 Nov 2005 23:55 GMT
I've set up a simple direct display routine using

 CGDisplayCapture()
 CGDisplayBaseAddress()
 CGDisplayBeamPosition()
which are available from OSX Core Graphics.

I've increased the speed by double buffering,
i.e. interpreting contrast values as RGB triplets
into a back buffer, then copying to the video
memory from CGDisplayBaseAddress(). The copy
is done with "memcpy()", which is ~2x faster
than copying 4-byte integers.

Although similar to double-buffering,
hardware-based page flipping (i.e. moving
the hardware display page pointer instead
of copying bytes) is potentially faster.
However I have not found any obvious way
to accomplish page flipping using Mac OSX
Core Graphics.

I imagine that many Mac video cards have the
hardware capacity for this -- which might
depend on the driver for the video card.
However I haven't found an obvious way
to do the pointer swap using Core Graphics
routines.

Does anyone know whether page flipping is
possible in Mac OSX with Core Graphics?

What would be the most likely way to
accomplish this?

Rob Smith
Michael Ash - 09 Nov 2005 00:38 GMT
> I've set up a simple direct display routine using
>
[quoted text clipped - 4 lines]
>
> I've increased the speed by double buffering,
[snip]
> Does anyone know whether page flipping is
> possible in Mac OSX with Core Graphics?
>
> What would be the most likely way to
> accomplish this?

You make a rather strange request here. You're asking about how to do
speedy graphics, but then you exclude *the* API for fast graphics. For
almost any imaginable graphics task where speed is the top priority,
OpenGL is the answer. You will get massive hardware acceleration for
almost everything. In this case, you will likely get page flipping
(although this will depend on the exact hardware/driver situation, and
probably other stuff such as how you set up your OpenGL context), and you
will also get nice things for free such as hardware DMA transfers for your
pixel data from RAM to VRAM. By excluding OpenGL, you're cutting yourself
off from the best way to make fast graphics. Is there a reason you don't
want to use it?

Signature

Michael Ash
Rogue Amoeba Software

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.