//  Created by Allen Ingling on Wed Mar 31 2004.
//  Copyright (c) 2004 New York University. All rights reserved.


/*
¥ Tony wants 1280 x 1024 x 100 copy rate which at 8 bits 125 is MBps and at 32 bits is 500 MBps.

¥ Blit rate for a 512x512 pixel texture using the combination of memcpy and texture range extension is about 276 MB/sec.

¥ Blit rade for a 512x512 pixel texture without using memcpy or texturerange extension is about 228 MB/sec.

¥ Blit rate for Apple's TextureRange exmample is not past about 400 MB/sec G4 1GHz with AGP readeon 9000 with client storage, texture rect, and texture range extensions.

¥ Texture range does not seem to noticeably improve the blit rates reported by the TextureRange demo.

¥ Blit rate for ccanim without memcopy is ?

¥ Blit rate for ccanim without using texture range is ?

¥ Is there any way to use 8-bit indexed mode color mode with the texture range extension ?

¥ How fast is this stuff on a G5 ?

Things to try:

¥ Don't use the texture range extension and skip memcpy.  

¥ Use 8-bit deep windows

¥ Try a G5


useful links:

The oddball buttons in QuickTime player are probably icon buttons with the "bordered" option disabled.  See the following link for an example:
http://developer.apple.com/documentation/Cocoa/Conceptual/Button/index.html?http://developer.apple.com/documentation/Cocoa/Conceptual/Button/Concepts/PushButtons.html

This explains how to configure Xcode to use a custom application icon:
http://developer.apple.com/documentation/AppleScript/Conceptual/StudioBuildingApps/chapter12/chapter_12_section_5.html

Here are notes on shared contexts.  If we can find an example it might show how to match pixel formats between OpenGL views and fullscreen windows.  Even though we
don't need to use shared contexts, that's helpful because is shows how to set the pixel format of an NSOpenGLView.
http://developer.apple.com/qa/qa2001/qa1248.html
http://developer.apple.com/samplecode/NSOpenGL_Fullscreen/NSOpenGL_Fullscreen.html


This is the root of the progress bar documentation:
http://developer.apple.com/documentation/Cocoa/Conceptual/ProgIndic/index.html

Here is information on shared contexts:
http://developer.apple.com/qa/qa2001/qa1248.html

This link gives a powerpoint presentation listing the accelerated pixel formats on OS X.  According to comments on the Apple OpenGL mailing list regarding
GL_UNPACK_CLIENT_STORAGE_APPLE only hardware accelerated formats will work with that extension.  GL_LUMINANCE looks like what to use for 8 bits.  
http://auc.uow.edu.au/conf/conf03/presentations/AUC_DV2003_Heckenberg.ppt

Here is some explantation of the GL_UNPACK_CLIENT_STORAGE_APPLE extensions
http://crystal.sourceforge.net/tikiwiki/tiki-index.php?page=MacXGL

Here is a list of attribute constants specified when creating an NSOpenGLPixelFormat:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSOpenGLPixelFormat.html#//apple_ref/doc/c_ref/NSOpenGLPixelFormat
Example which shows how to create a fullscren GL context using NSOpenGLContext class
http://developer.apple.com/samplecode/NSOpenGL_Fullscreen/NSOpenGL_Fullscreen.html
NSOpenGLConexts, which might solve the problem with contexts blocking applications out.
http://developer.apple.com/documentation/Cocoa/Conceptual/OpenGL/index.html?http://developer.apple.com/documentation/Cocoa/Conceptual/OpenGL/Tasks/Context.html
These explain synchronized buffer flips with NSOpenGL contexts.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSOpenGLContext.html#//apple_ref/doc/uid/20000463/BBCEAEIC
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSOpenGLContext.html#//apple_ref/doc/uid/20000463/CJBHEBBC

This claims that a GWorld may be used as a texture but does not say how.  See: Using OpenGL with QuickDraw and QuickTime Movie Output sections 
http://developer.apple.com/technotes/tn/tn2014.html#Section9

This is the root of the CGL manual:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/index.html?http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/chap5/chapter_5_section_1.html#//apple_ref/doc/uid/TP30000136
Here is the good tutotial on configuring CG displays:
http://developer.apple.com/technotes/tn/tn2007.html#Section3
Here is more on CG displays, importantly it reveals dictionary keys for the dipslay mode descriptor:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/chap3/chapter_3_section_7.html
Here are Quartz Services functionsl; handy CGL functions for getting display configuration information.  
http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/index.html?http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/qsref_main/function_group_3.html#//apple_ref/c/func/CGRestorePermanentDisplayConfiguration

NSOpenGLPixelBuffer: render  in them, draw from them.  What are they really ?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSOpenGLPixelBuffer.html#//apple_ref/doc/c_ref/NSOpenGLPixelBuffer

Example showing how to synch video swap with an OpenGL view  ***useful***
http://developer.apple.com/samplecode/VBL/VBL.html

Setting Quartz (Core Graphics) display modes.  
http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/index.html?http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/qsref_main/function_group_6.html#//apple_ref/c/func/CGDisplayCurrentMode

NSOpenGLConexts, which might solve the problem with contexts blocking applications out.
http://developer.apple.com/documentation/Cocoa/Conceptual/OpenGL/index.html?http://developer.apple.com/documentation/Cocoa/Conceptual/OpenGL/Tasks/Context.html

This is documentation for the NSScreen class, which gives a somewhat lame description of video configuration and capabilities
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSScreen.html#//apple_ref/doc/uid/20000333

This is the Carbon QuickDraw reference:
http://developer.apple.com/documentation/Carbon/Reference/QuickDraw_Ref/qdref_main/FunctionGroupIndex.html

This is an example which shows how to draw  to and  NSQuickDrawView:
http://developer.apple.com/samplecode/CocoaVideoFrameToGWorld/CocoaVideoFrameToGWorld.html

This is the section of the Carbon QuickDraw documentation which lists functions useful for drawing into a CGContext.
http://developer.apple.com/documentation/Carbon/Reference/QuickDraw_Ref/qdref_main/function_group_1.html
This is a technical Q&A which explains how to use QuickDraw with CGDirectDisplay
http://developer.apple.com/qa/qa2001/qa1011.html
Root of the Carbon QuickDraw reference:
http://developer.apple.com/documentation/Carbon/Reference/QuickDraw_Ref/index.html

Here is a graphing UI class
http://developer.snowmintcs.com/frameworks/sm2dgraphview/index.html

*/ 