• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSQuickDrawView opacity troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSQuickDrawView opacity troubles


  • Subject: Re: NSQuickDrawView opacity troubles
  • From: Scott Thompson <email@hidden>
  • Date: Mon, 5 Apr 2004 21:42:47 -0500

Is there a more efficient way to draw a GWorld into a view other than NSQuickDrawView?

You can create a CGBitmapImageRef that shares memory with the GWorld and then you can use CGDrawImage to blit the image into the CG context of the view. You may be able to do a similar technique with NSImage but I've never gotten the colors to map out quite right

The absolute most efficient way, however, would be to use an OpenGL view (maybe NSOpenGLView) and use some fancy QuickTime techniques to map the GWorld memory into an OpenGL texture. Then draw the bitmap using a polygon with the created texture. The advantage is that (depending on how you set up the OpenGL texture) the video card can directly pull the pixels it needs out of memory and you end up unloading a lot of the blitting overhead onto the Graphics Coprocessor.

There was a WWDC session on the technique in 2003 and the code for that technique is given at:

<http://developer.apple.com/samplecode/OpenGL_Image/OpenGL_Image.html>


Scott
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSQuickDrawView opacity troubles (From: Chris Silverberg <email@hidden>)

  • Prev by Date: Re: Outputing rotated text
  • Next by Date: memory leaks, many of them
  • Previous by thread: NSQuickDrawView opacity troubles
  • Next by thread: NSQuickDrawView opacity troubles (solved)
  • Index(es):
    • Date
    • Thread