Re: Accessing window back buffer without deprecated functions in Tiger
Re: Accessing window back buffer without deprecated functions in Tiger
- Subject: Re: Accessing window back buffer without deprecated functions in Tiger
- From: John Stiles <email@hidden>
- Date: Thu, 16 Mar 2006 10:03:43 -0800
I think the problem you're going to run up against is resolution-
independence. You can enable this now if you look at all the options
in Quartz Debug. This is supposed to be a feature that end-users can
enable in a future OS release. This will let the user scale up a
window's contents by an arbitrary percentage. So your "pixel" may
actually be 1.3 pixels wide on screen, and straddle four physical
pixels.
One reason for QuickDraw's deprecation was that it couldn't handle a
change like that. It was too bitmap-centric. All of the new graphics
code is vector-based, because it can scale.
To answer your question more directly, if you want to write pixels to
a window, you can use an OpenGL view and render a quad texture. This
would be about as fast as writing pixels directly, and will scale
perfectly (it's just a texture!).
On Mar 16, 2006, at 6:57 AM, Tobias Stamm wrote:
Hi all,
Since Tiger version of OS X, there are quite a few function calls
deprecated, quote: "Quickdraw has been deprecated for deployment
targets Mac OS X version 10.4 and later".
So, let's face the problem. I want to access the buffer of a
window, more exactly: The back-buffer. In earlier versions, this
was possible using GWorlds, CGrafPtrs, Ports, ... now, this is all
gone (of course it's still there, but having the newest technology,
why not using it?). I want to draw some pixels manually, so I need
the baseaddress of the buffer, width and height, bpp, ordering, ...
and of course I need to lock and unlock the buffer.
But I don't even get near a Bitmap representation of the window-
buffer (well there is the standard representation, I think it's
pdf, but this does not helps at all). I tried it using CG,
GraphicContexts, graphicPorts, using the screenContext, ... I've
never used so much // in my code. :)
The only thing that was successful was to create a Bitmap-image
drawing to the window. But this is an unnecessary third buffer
which I absolutely want to avoid.
I don't think that it is impossible, I simply don't get it. Can
anyone help me?
Requirements:
- no deprecated methods (especially no qd)
- no triple buffering
- backwards compatibility to eralier versions not necessary (this
is just for me)
Regards,
Tobias
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden