[Hdrflow-svn] SF.net SVN: hdrflow: [299] trunk/app/HDRFlow
Status: Pre-Alpha
Brought to you by:
glslang
From: <gl...@us...> - 2007-09-12 16:53:01
|
Revision: 299 http://hdrflow.svn.sourceforge.net/hdrflow/?rev=299&view=rev Author: glslang Date: 2007-09-12 09:52:46 -0700 (Wed, 12 Sep 2007) Log Message: ----------- + interface changes to better reflect architecture. initial playback hook-ups code Modified Paths: -------------- trunk/app/HDRFlow/Bucket.hpp trunk/app/HDRFlow/Cache.cpp trunk/app/HDRFlow/Cache.hpp trunk/app/HDRFlow/CustomOpenGLView.h trunk/app/HDRFlow/CustomOpenGLView.m trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib trunk/app/HDRFlow/English.lproj/MainMenu.nib/keyedobjects.nib trunk/app/HDRFlow/HDRFlow.xcodeproj/project.pbxproj trunk/app/HDRFlow/HDRFlowController.h trunk/app/HDRFlow/HDRFlowController.mm trunk/app/HDRFlow/PlugInsPreferencesController.h trunk/app/HDRFlow/PlugInsPreferencesController.mm trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.h trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.mm trunk/app/HDRFlow/PreferencesController.h trunk/app/HDRFlow/PreferencesController.m trunk/app/HDRFlow/ScriptEditorController.h trunk/app/HDRFlow/ScriptEditorController.mm trunk/app/HDRFlow/ScriptEngine.cpp trunk/app/HDRFlow/ScriptEngine.hpp trunk/app/HDRFlow/Scripts/bootstrap.py trunk/app/HDRFlow/ToolbarHolder.h trunk/app/HDRFlow/ToolbarHolder.m trunk/app/HDRFlow/Viewer.cpp trunk/app/HDRFlow/Viewer.hpp trunk/app/HDRFlow/ViewportOpenGLView.h trunk/app/HDRFlow/main.m Added Paths: ----------- trunk/app/HDRFlow/Bucket.cpp trunk/app/HDRFlow/Images/HDRFlow.tif trunk/app/HDRFlow/Track.cpp trunk/app/HDRFlow/Track.hpp trunk/app/HDRFlow/ViewportOpenGLView.mm Removed Paths: ------------- trunk/app/HDRFlow/ViewportOpenGLView.m Added: trunk/app/HDRFlow/Bucket.cpp =================================================================== --- trunk/app/HDRFlow/Bucket.cpp (rev 0) +++ trunk/app/HDRFlow/Bucket.cpp 2007-09-12 16:52:46 UTC (rev 299) @@ -0,0 +1,46 @@ + +// HDRFlow - A image processing application + +// Copyright (c) 2007 Goncalo N. M. de Carvalho +// Released under the GPL. +// For more information, see http://www.hdrflow.com. + +#include "Bucket.hpp" + +namespace hdrflow { + +namespace +{ + il::image_type_ptr frame_image( ml::frame_type_ptr frame ) + { + if( frame ) + return frame->get_image( ); + + return il::image_type_ptr( ); + } +} + +il::image_type_ptr Bucket::get_image( ) const +{ + return frame_image( frame_ ); +} + +int Bucket::frame_width( ) const +{ + il::image_type_ptr im = frame_image( frame_ ); + if( im ) + return im->width( ); + + return 0; +} + +int Bucket::frame_height( ) const +{ + il::image_type_ptr im = frame_image( frame_ ); + if( im ) + return im->height( ); + + return 0; +} + +} Property changes on: trunk/app/HDRFlow/Bucket.cpp ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/app/HDRFlow/Bucket.hpp =================================================================== --- trunk/app/HDRFlow/Bucket.hpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Bucket.hpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,13 +3,14 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #ifndef BUCKET_INC_ #define BUCKET_INC_ #include <HDRFlow/openlibraries.hpp> +namespace il = olib::openimagelib::il; namespace ml = olib::openmedialib::ml; namespace hdrflow { @@ -32,8 +33,11 @@ void set_frame( ml::frame_type_ptr frame ) { frame_ = frame; } - bool is_loaded( ) { return frame_ != 0; } + il::image_type_ptr get_image( ) const; + int frame_width( ) const; + int frame_height( ) const; + private: int position_; ml::frame_type_ptr frame_; Modified: trunk/app/HDRFlow/Cache.cpp =================================================================== --- trunk/app/HDRFlow/Cache.cpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Cache.cpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #include "Cache.hpp" @@ -14,14 +14,17 @@ bool Cache::connect( const pl::string& media, bool fill ) { - pl::string in( media + "/sequence: " ); + clear( ); + + pl::string in( media + "/sequence:" ); input_ = ml::create_input( in ); if( input_ == 0 ) return false; if( fill ) { - for( int i = 0; i < buckets_.size( ); ++i ) + int siz( std::min( size_, input_->get_frames( ) ) ); + for( int i = 0; i < siz; ++i ) { input_->seek( i, false ); buckets_.push_back( BucketPtr( new Bucket( i, input_->fetch( ) ) ) ); @@ -31,6 +34,16 @@ return true; } +void Cache::disconnect( ) +{ + clear( ); +} + +void Cache::clear( ) +{ + buckets_.clear( ); +} + BucketPtr Cache::reserve_bucket( int position ) { const_iterator b = find_bucket( position ); @@ -57,9 +70,24 @@ { if( input_ ) return input_->get_frames( ); - + return 0; } +Cache::const_iterator Cache::find_bucket( int position ) const +{ + for( const_iterator I = buckets_.begin( ); I != buckets_.end( ); ++I ) + { + if( ( *I )->position( ) == position ) + return I; + } + + return buckets_.end( ); +} +Cache::const_iterator Cache::acquire_bucket( ) +{ + return buckets_.end( ); } + +} Modified: trunk/app/HDRFlow/Cache.hpp =================================================================== --- trunk/app/HDRFlow/Cache.hpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Cache.hpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #ifndef CACHE_INC_ #define CACHE_INC_ @@ -30,7 +30,7 @@ public: explicit Cache( int n ) - : buckets_( n ) + : size_( n ) { } bool connect( const pl::string& media, bool fill = true ); @@ -50,6 +50,7 @@ private: container buckets_; ml::input_type_ptr input_; + const int size_; }; typedef boost::shared_ptr<Cache> CachePtr; Modified: trunk/app/HDRFlow/CustomOpenGLView.h =================================================================== --- trunk/app/HDRFlow/CustomOpenGLView.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/CustomOpenGLView.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/CustomOpenGLView.m =================================================================== --- trunk/app/HDRFlow/CustomOpenGLView.m 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/CustomOpenGLView.m 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <OpenGL/OpenGL.h> #import <OpenGL/gl.h> Modified: trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib =================================================================== --- trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib 2007-09-12 16:52:46 UTC (rev 299) @@ -7,17 +7,17 @@ <key>IBEditorPositions</key> <dict> <key>266</key> - <string>567 402 306 396 0 0 1440 878 </string> + <string>487 333 306 396 0 0 1280 778 </string> <key>29</key> - <string>2 829 338 44 0 0 1440 878 </string> + <string>2 730 338 44 0 0 1280 778 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> <key>IBOpenObjects</key> <array> + <integer>266</integer> <integer>21</integer> <integer>29</integer> - <integer>266</integer> </array> <key>IBSystem Version</key> <string>8R2218</string> Modified: trunk/app/HDRFlow/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/app/HDRFlow/HDRFlow.xcodeproj/project.pbxproj =================================================================== --- trunk/app/HDRFlow/HDRFlow.xcodeproj/project.pbxproj 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/HDRFlow.xcodeproj/project.pbxproj 2007-09-12 16:52:46 UTC (rev 299) @@ -11,11 +11,15 @@ 670E3BEC0C73AE93001D542B /* minusbutton.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 670E3BEA0C73AE93001D542B /* minusbutton.tiff */; }; 670E3BED0C73AE93001D542B /* plusbutton.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 670E3BEB0C73AE93001D542B /* plusbutton.tiff */; }; 671E22A30C4166E400CA1860 /* ScriptEditorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 671E22A20C4166E400CA1860 /* ScriptEditorController.mm */; }; + 672C0AAE0C95590300BA76DB /* Bucket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 672C0AAD0C95590300BA76DB /* Bucket.cpp */; }; 673D04500C522C980096513A /* PreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 673D044F0C522C980096513A /* PreferencesController.m */; }; 674E44640C3F854A0036A908 /* ScriptEditor.nib in Resources */ = {isa = PBXBuildFile; fileRef = 674E44620C3F854A0036A908 /* ScriptEditor.nib */; }; 676191BF0C6643B20076713C /* Cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 676191BE0C6643B20076713C /* Cache.cpp */; }; 6768C7300C8079370055FC2F /* hdrflow.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6768C72F0C8079370055FC2F /* hdrflow.icns */; }; 677740360C5C0184005FF29D /* PlugInsPreferencesOutlineViewNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 677740350C5C0184005FF29D /* PlugInsPreferencesOutlineViewNode.mm */; }; + 678014890C946B4200D49569 /* Track.hpp in Resources */ = {isa = PBXBuildFile; fileRef = 678014880C946B4200D49569 /* Track.hpp */; }; + 678014AB0C946D3E00D49569 /* Track.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 678014AA0C946D3E00D49569 /* Track.cpp */; }; + 6780153F0C9485DC00D49569 /* ViewportOpenGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6780153E0C9485DC00D49569 /* ViewportOpenGLView.mm */; }; 678A4AA70C2B18B50011E9F7 /* CustomOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 678A4AA60C2B18B50011E9F7 /* CustomOpenGLView.m */; }; 67A8A6EA0C41836600DB3F1B /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67A8A6E90C41836600DB3F1B /* Python.framework */; }; 67A8A73E0C4183C500DB3F1B /* ScriptEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67A8A73D0C4183C500DB3F1B /* ScriptEngine.cpp */; }; @@ -27,8 +31,8 @@ 67C8D8B80C4AD8340006B871 /* bootstrap.py in Resources */ = {isa = PBXBuildFile; fileRef = 67C8D8B70C4AD8340006B871 /* bootstrap.py */; }; 67CF88AA0C53D62E005B6662 /* AdvancedPreferences.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 67CF88A90C53D62E005B6662 /* AdvancedPreferences.tiff */; }; 67CF88AC0C53EFB8005B6662 /* PlugInsPreferences.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 67CF88AB0C53EFB8005B6662 /* PlugInsPreferences.tiff */; }; - 67DC61B90C2EAC94005CFE6E /* ViewportOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 67DC61B80C2EAC94005CFE6E /* ViewportOpenGLView.m */; }; 67DC62180C2EC0D9005CFE6E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67DC62170C2EC0D9005CFE6E /* OpenGL.framework */; }; + 67E0C6970C96B8FE00852E53 /* HDRFlow.tif in Resources */ = {isa = PBXBuildFile; fileRef = 67E0C6960C96B8FE00852E53 /* HDRFlow.tif */; }; 67F7A3EE0C52A21600172987 /* GeneralPreferences.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 67F7A3ED0C52A21600172987 /* GeneralPreferences.tiff */; }; 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; @@ -50,6 +54,7 @@ 670E3BEB0C73AE93001D542B /* plusbutton.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = plusbutton.tiff; path = Images/plusbutton.tiff; sourceTree = "<group>"; }; 671E22910C41652E00CA1860 /* ScriptEditorController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScriptEditorController.h; sourceTree = "<group>"; }; 671E22A20C4166E400CA1860 /* ScriptEditorController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ScriptEditorController.mm; sourceTree = "<group>"; }; + 672C0AAD0C95590300BA76DB /* Bucket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Bucket.cpp; sourceTree = "<group>"; }; 673D04450C522A610096513A /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PreferencesController.h; sourceTree = "<group>"; }; 673D044F0C522C980096513A /* PreferencesController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PreferencesController.m; sourceTree = "<group>"; }; 674E44630C3F854A0036A908 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/ScriptEditor.nib; sourceTree = "<group>"; }; @@ -59,6 +64,9 @@ 6768C72F0C8079370055FC2F /* hdrflow.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = hdrflow.icns; path = Images/hdrflow.icns; sourceTree = "<group>"; }; 6777402D0C5C0022005FF29D /* PlugInsPreferencesOutlineViewNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlugInsPreferencesOutlineViewNode.h; sourceTree = "<group>"; }; 677740350C5C0184005FF29D /* PlugInsPreferencesOutlineViewNode.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PlugInsPreferencesOutlineViewNode.mm; sourceTree = "<group>"; }; + 678014880C946B4200D49569 /* Track.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Track.hpp; sourceTree = "<group>"; }; + 678014AA0C946D3E00D49569 /* Track.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Track.cpp; sourceTree = "<group>"; }; + 6780153E0C9485DC00D49569 /* ViewportOpenGLView.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewportOpenGLView.mm; sourceTree = "<group>"; }; 678A4AA60C2B18B50011E9F7 /* CustomOpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CustomOpenGLView.m; sourceTree = "<group>"; }; 67A8A6E40C4181C600DB3F1B /* ScriptEngine.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = ScriptEngine.hpp; sourceTree = "<group>"; }; 67A8A6E90C41836600DB3F1B /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = /System/Library/Frameworks/Python.framework; sourceTree = "<absolute>"; }; @@ -76,8 +84,8 @@ 67CF88A90C53D62E005B6662 /* AdvancedPreferences.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AdvancedPreferences.tiff; path = Images/AdvancedPreferences.tiff; sourceTree = "<group>"; }; 67CF88AB0C53EFB8005B6662 /* PlugInsPreferences.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = PlugInsPreferences.tiff; path = Images/PlugInsPreferences.tiff; sourceTree = "<group>"; }; 67DC61B10C2EAB5E005CFE6E /* ViewportOpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewportOpenGLView.h; sourceTree = "<group>"; }; - 67DC61B80C2EAC94005CFE6E /* ViewportOpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewportOpenGLView.m; sourceTree = "<group>"; }; 67DC62170C2EC0D9005CFE6E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; + 67E0C6960C96B8FE00852E53 /* HDRFlow.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = HDRFlow.tif; path = Images/HDRFlow.tif; sourceTree = "<group>"; }; 67F6CCF70C285D6C00098F90 /* CustomOpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CustomOpenGLView.h; sourceTree = "<group>"; }; 67F7A3ED0C52A21600172987 /* GeneralPreferences.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = GeneralPreferences.tiff; path = Images/GeneralPreferences.tiff; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; @@ -102,13 +110,16 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + 678014AA0C946D3E00D49569 /* Track.cpp */, + 678014880C946B4200D49569 /* Track.hpp */, 676191A40C6642CC0076713C /* Bucket.hpp */, + 672C0AAD0C95590300BA76DB /* Bucket.cpp */, 676191810C663D100076713C /* Cache.hpp */, 676191BE0C6643B20076713C /* Cache.cpp */, 67F6CCF70C285D6C00098F90 /* CustomOpenGLView.h */, 678A4AA60C2B18B50011E9F7 /* CustomOpenGLView.m */, 67DC61B10C2EAB5E005CFE6E /* ViewportOpenGLView.h */, - 67DC61B80C2EAC94005CFE6E /* ViewportOpenGLView.m */, + 6780153E0C9485DC00D49569 /* ViewportOpenGLView.mm */, 67BD59C70C36BE3600F0F7DF /* HDRFlowController.h */, 67C0BED80C5BCD4600E0E258 /* HDRFlowController.mm */, 67C0BEF40C5BED2C00E0E258 /* PlugInsPreferencesController.h */, @@ -213,6 +224,7 @@ 67F7A3EC0C52A1F900172987 /* Images */ = { isa = PBXGroup; children = ( + 67E0C6960C96B8FE00852E53 /* HDRFlow.tif */, 6768C72F0C8079370055FC2F /* hdrflow.icns */, 670E3BEA0C73AE93001D542B /* minusbutton.tiff */, 670E3BEB0C73AE93001D542B /* plusbutton.tiff */, @@ -275,6 +287,8 @@ 670E3BEC0C73AE93001D542B /* minusbutton.tiff in Resources */, 670E3BED0C73AE93001D542B /* plusbutton.tiff in Resources */, 6768C7300C8079370055FC2F /* hdrflow.icns in Resources */, + 678014890C946B4200D49569 /* Track.hpp in Resources */, + 67E0C6970C96B8FE00852E53 /* HDRFlow.tif in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -287,7 +301,6 @@ files = ( 8D11072D0486CEB800E47090 /* main.m in Sources */, 678A4AA70C2B18B50011E9F7 /* CustomOpenGLView.m in Sources */, - 67DC61B90C2EAC94005CFE6E /* ViewportOpenGLView.m in Sources */, 671E22A30C4166E400CA1860 /* ScriptEditorController.mm in Sources */, 67A8A73E0C4183C500DB3F1B /* ScriptEngine.cpp in Sources */, 673D04500C522C980096513A /* PreferencesController.m in Sources */, @@ -297,6 +310,9 @@ 67C0BEFB0C5BED8500E0E258 /* PlugInsPreferencesController.mm in Sources */, 677740360C5C0184005FF29D /* PlugInsPreferencesOutlineViewNode.mm in Sources */, 676191BF0C6643B20076713C /* Cache.cpp in Sources */, + 678014AB0C946D3E00D49569 /* Track.cpp in Sources */, + 6780153F0C9485DC00D49569 /* ViewportOpenGLView.mm in Sources */, + 672C0AAE0C95590300BA76DB /* Bucket.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: trunk/app/HDRFlow/HDRFlowController.h =================================================================== --- trunk/app/HDRFlow/HDRFlowController.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/HDRFlowController.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/HDRFlowController.mm =================================================================== --- trunk/app/HDRFlow/HDRFlowController.mm 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/HDRFlowController.mm 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "ScriptEngine.hpp" #import "HDRFlowController.h" Added: trunk/app/HDRFlow/Images/HDRFlow.tif =================================================================== (Binary files differ) Property changes on: trunk/app/HDRFlow/Images/HDRFlow.tif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/app/HDRFlow/PlugInsPreferencesController.h =================================================================== --- trunk/app/HDRFlow/PlugInsPreferencesController.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PlugInsPreferencesController.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "PlugInsPreferencesOutlineViewNode.h" Modified: trunk/app/HDRFlow/PlugInsPreferencesController.mm =================================================================== --- trunk/app/HDRFlow/PlugInsPreferencesController.mm 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PlugInsPreferencesController.mm 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <HDRFlow/openlibraries.hpp> Modified: trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.h =================================================================== --- trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.mm =================================================================== --- trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.mm 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.mm 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "PlugInsPreferencesOutlineViewNode.h" Modified: trunk/app/HDRFlow/PreferencesController.h =================================================================== --- trunk/app/HDRFlow/PreferencesController.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PreferencesController.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/PreferencesController.m =================================================================== --- trunk/app/HDRFlow/PreferencesController.m 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/PreferencesController.m 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "PreferencesController.h" #import "ToolbarHolder.h" Modified: trunk/app/HDRFlow/ScriptEditorController.h =================================================================== --- trunk/app/HDRFlow/ScriptEditorController.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ScriptEditorController.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/ScriptEditorController.mm =================================================================== --- trunk/app/HDRFlow/ScriptEditorController.mm 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ScriptEditorController.mm 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "ScriptEditorController.h" Modified: trunk/app/HDRFlow/ScriptEngine.cpp =================================================================== --- trunk/app/HDRFlow/ScriptEngine.cpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ScriptEngine.cpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #include <HDRFlow/openlibraries.hpp> Modified: trunk/app/HDRFlow/ScriptEngine.hpp =================================================================== --- trunk/app/HDRFlow/ScriptEngine.hpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ScriptEngine.hpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #ifndef SCRIPT_ENGINE_INC_ #define SCRIPT_ENGINE_INC_ Modified: trunk/app/HDRFlow/Scripts/bootstrap.py =================================================================== --- trunk/app/HDRFlow/Scripts/bootstrap.py 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Scripts/bootstrap.py 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ # Copyright (c) 2007 Goncalo N. M. de Carvalho # Released under the GPL. -# For more information, see http://www.cryogenicgraphics.com/hdrflow. +# For more information, see http://www.hdrflow.com. import platform import sys @@ -24,8 +24,4 @@ except: sys.setdlopenflags( 257 ) -if platform.system( ) == "Darwin": - HDRFlowPlugin.init( "/Library/Frameworks/HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns" ) - HDRFlowPlugin.init( "/Library/Frameworks/HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns" ) -else: - HDRFlowPlugin.init( ) +HDRFlowPlugin.init( ) Modified: trunk/app/HDRFlow/ToolbarHolder.h =================================================================== --- trunk/app/HDRFlow/ToolbarHolder.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ToolbarHolder.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import <Cocoa/Cocoa.h> Modified: trunk/app/HDRFlow/ToolbarHolder.m =================================================================== --- trunk/app/HDRFlow/ToolbarHolder.m 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ToolbarHolder.m 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "ToolbarHolder.h" Added: trunk/app/HDRFlow/Track.cpp =================================================================== --- trunk/app/HDRFlow/Track.cpp (rev 0) +++ trunk/app/HDRFlow/Track.cpp 2007-09-12 16:52:46 UTC (rev 299) @@ -0,0 +1,23 @@ + +// HDRFlow - A image processing application + +// Copyright (c) 2007 Goncalo N. M. de Carvalho +// Released under the GPL. +// For more information, see http://www.hdrflow.com. + +#include "Track.hpp" + +namespace hdrflow { + +Track::Track( const pl::string& uri ) + : source_( new Cache( 100 ) ) +{ + source_->connect( uri ); +} + +BucketPtr Track::media( int position ) +{ + return source_->reserve_bucket( position ); +} + +} Property changes on: trunk/app/HDRFlow/Track.cpp ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/app/HDRFlow/Track.hpp =================================================================== --- trunk/app/HDRFlow/Track.hpp (rev 0) +++ trunk/app/HDRFlow/Track.hpp 2007-09-12 16:52:46 UTC (rev 299) @@ -0,0 +1,34 @@ + +// HDRFlow - A image processing application + +// Copyright (c) 2007 Goncalo N. M. de Carvalho +// Released under the GPL. +// For more information, see http://www.hdrflow.com. + +#ifndef TRACK_INC_ +#define TRACK_INC_ + +#include <HDRFlow/openlibraries.hpp> + +#include "Cache.hpp" + +namespace pl = olib::openpluginlib; + +namespace hdrflow { + +class Track +{ +public: + explicit Track( const pl::string& uri ); + + BucketPtr media( int position ); + +private: + CachePtr source_; +}; + +typedef boost::shared_ptr<Track> TrackPtr; + +} + +#endif Modified: trunk/app/HDRFlow/Viewer.cpp =================================================================== --- trunk/app/HDRFlow/Viewer.cpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Viewer.cpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,56 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. -#include <HDRFlow/openlibraries.hpp> +#include "Viewer.hpp" +namespace hdrflow { + +Viewer::Viewer( const pl::string& uri ) + : default_( new Track( uri ) ) +{ +} + +void Viewer::initialise( ) +{ + glClearColor( 0.0, 0.0, 0.0, 0.0 ); +} + +void Viewer::display( int width, int height ) +{ + glViewport( 0, 0, width, height ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); + + BucketPtr media = default_->media( 0 ); + if( !media ) return; + + il::image_type_ptr im = media->get_image( ); + if( !im ) return; + + int phy_w = im->width( ); + int phy_h = im->height( ); + + GLenum target; + float tex_w, tex_h; + if( !pl::texture_target( phy_w, phy_h, target, tex_w, tex_h ) ) + return; + + GLint internal_format; + GLenum format, type; + + if( !pl::pf_to_gl_format( im->pf( ), internal_format, format, type ) ) + { + im = il::convert( im, L"b8g8r8a8" ); + + internal_format = GL_RGBA; + format = GL_BGRA_EXT; + } + + glPixelStorei( GL_UNPACK_ALIGNMENT, 4 ); + glEnable( target ); + + +} + +} Modified: trunk/app/HDRFlow/Viewer.hpp =================================================================== --- trunk/app/HDRFlow/Viewer.hpp 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/Viewer.hpp 2007-09-12 16:52:46 UTC (rev 299) @@ -3,22 +3,25 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #ifndef VIEWER_INC_ #define VIEWER_INC_ -#include <HDRFlow/openlibraries.hpp> +#include "Track.hpp" namespace hdrflow { class Viewer { public: - explicit Viewer( ); + explicit Viewer( const pl::string& uri ); void initialise( ); - void display( il::image_type_ptr im ); + void display( int width, int height ); + +private: + TrackPtr default_; }; } Modified: trunk/app/HDRFlow/ViewportOpenGLView.h =================================================================== --- trunk/app/HDRFlow/ViewportOpenGLView.h 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ViewportOpenGLView.h 2007-09-12 16:52:46 UTC (rev 299) @@ -3,12 +3,15 @@ // Copyright (c) 2007 Goncalo N. M. de Carvalho // Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. +// For more information, see http://www.hdrflow.com. #import "CustomOpenGLView.h" +#include "Viewer.hpp" + @interface ViewportOpenGLView : CustomOpenGLView { + hdrflow::Viewer* viewer_; } + ( NSOpenGLPixelFormat* ) viewportPixelFormat; Deleted: trunk/app/HDRFlow/ViewportOpenGLView.m =================================================================== --- trunk/app/HDRFlow/ViewportOpenGLView.m 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/ViewportOpenGLView.m 2007-09-12 16:52:46 UTC (rev 299) @@ -1,145 +0,0 @@ - -// HDRFlow - A image processing application - -// Copyright (c) 2007 Goncalo N. M. de Carvalho -// Released under the GPL. -// For more information, see http://www.cryogenicgraphics.com/hdrflow. - -#import <OpenGL/OpenGL.h> -#import <OpenGL/gl.h> - -#import "ViewportOpenGLView.h" - -@implementation ViewportOpenGLView - -+ ( NSOpenGLPixelFormat* ) viewportPixelFormat -{ - NSOpenGLPixelFormatAttribute attribs[ ] = - { - NSOpenGLPFANoRecovery, - NSOpenGLPFADoubleBuffer, - NSOpenGLPFAAccelerated, - NSOpenGLPFAColorSize, 24, - NSOpenGLPFADepthSize, 16, - 0 - }; - - return [ [ [ NSOpenGLPixelFormat alloc ] initWithAttributes: attribs ] autorelease ]; -} - -- ( id ) initWithFrame: ( NSRect ) theFrame -{ - [ super initWithFrame: theFrame pixelFormat: [ ViewportOpenGLView viewportPixelFormat ] ]; - [ [ super openGLContext ] makeCurrentContext ]; - - return self; -} - -- ( void ) awakeFromNib -{ -} - -- ( void ) dealloc -{ - [ super dealloc ]; -} - -- ( void ) renewGState -{ - NSWindow* window; - [ super renewGState ]; - window = [ self window ]; - - if( [ window respondsToSelector: @selector( disableScreenUpdatesUntilFlush ) ] ) - [ window disableScreenUpdatesUntilFlush ]; -} - -- ( void ) drawRect: ( NSRect ) theRect -{ - NSRect bounds = [ self bounds ]; - - glViewport( 0, 0, NSWidth( bounds ), NSHeight( bounds ) ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); - - [ [ self openGLContext ] flushBuffer ]; -} - -- ( void ) prepareOpenGL -{ - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - - // Sync to vertical retrace - long VBL = 1; - [ [ self openGLContext ] setValues: &VBL forParameter: NSOpenGLCPSwapInterval ]; -} - -- ( void ) update -{ - [ super update ]; - if( ![ self inLiveResize ] ) - ; -} - -- ( void ) fullscreen -{ - NSOpenGLPixelFormatAttribute attribs[ ] = - { - NSOpenGLPFAFullScreen, - NSOpenGLPFAAccelerated, - NSOpenGLPFAScreenMask, - CGDisplayIDToOpenGLDisplayMask( kCGDirectMainDisplay ), - NSOpenGLPFADoubleBuffer, - NSOpenGLPFAColorSize, 24, - NSOpenGLPFADepthSize, 16, - 0 - }; - - NSOpenGLPixelFormat* pixelFormat = [ [ [ NSOpenGLPixelFormat alloc ] initWithAttributes: attribs ] autorelease ]; - NSOpenGLContext* fullScreenContext = [ [ NSOpenGLContext alloc ] initWithFormat: pixelFormat shareContext: [ self openGLContext ] ]; - - if( fullScreenContext == nil ) return; - - CGDisplayErr err = CGCaptureAllDisplays( ); - if( err != CGDisplayNoErr ) return; - - [ fullScreenContext setFullScreen ]; - [ fullScreenContext makeCurrentContext ]; - - glViewport( 0, 0, CGDisplayPixelsWide( kCGDirectMainDisplay ), CGDisplayPixelsHigh( kCGDirectMainDisplay ) ); - - BOOL stayInFullScreenMode = YES; - while( stayInFullScreenMode ) - { - NSEvent* event; - while( event = [ NSApp nextEventMatchingMask: NSAnyEventMask untilDate: [ NSDate distantPast ] inMode: NSDefaultRunLoopMode dequeue: YES ] ) - { - switch( [ event type ] ) - { - case NSKeyDown: - stayInFullScreenMode = NO; - break; - - default: - break; - } - } - - [ fullScreenContext flushBuffer ]; - } - - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glClear( GL_COLOR_BUFFER_BIT ); - [ fullScreenContext flushBuffer ]; - glClear( GL_COLOR_BUFFER_BIT ); - [ fullScreenContext flushBuffer ]; - - [ NSOpenGLContext clearCurrentContext ]; - [ fullScreenContext clearDrawable ]; - [ fullScreenContext release ]; - - CGReleaseAllDisplays( ); - - [ self setNeedsDisplay: YES ]; -} - -@end Copied: trunk/app/HDRFlow/ViewportOpenGLView.mm (from rev 297, trunk/app/HDRFlow/ViewportOpenGLView.m) =================================================================== --- trunk/app/HDRFlow/ViewportOpenGLView.mm (rev 0) +++ trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-12 16:52:46 UTC (rev 299) @@ -0,0 +1,146 @@ + +// HDRFlow - A image processing application + +// Copyright (c) 2007 Goncalo N. M. de Carvalho +// Released under the GPL. +// For more information, see http://www.hdrflow.com. + +#import "ViewportOpenGLView.h" + +@implementation ViewportOpenGLView + ++ ( NSOpenGLPixelFormat* ) viewportPixelFormat +{ + NSOpenGLPixelFormatAttribute attribs[ ] = + { + NSOpenGLPFANoRecovery, + NSOpenGLPFADoubleBuffer, + NSOpenGLPFAAccelerated, + NSOpenGLPFAColorSize, ( NSOpenGLPixelFormatAttribute ) 24, + NSOpenGLPFADepthSize, ( NSOpenGLPixelFormatAttribute ) 16, + ( NSOpenGLPixelFormatAttribute ) 0 + }; + + return [ [ [ NSOpenGLPixelFormat alloc ] initWithAttributes: attribs ] autorelease ]; +} + +- ( id ) initWithFrame: ( NSRect ) theFrame +{ + [ super initWithFrame: theFrame pixelFormat: [ ViewportOpenGLView viewportPixelFormat ] ]; + [ [ super openGLContext ] makeCurrentContext ]; + + return self; +} + +- ( void ) awakeFromNib +{ + NSBundle* bundle = [ NSBundle bundleForClass: [ self class ] ]; + NSString* logo = [ bundle pathForResource: @"HDRFlow" ofType: @"tif" ]; + + viewer_ = new hdrflow::Viewer( [ logo UTF8String ] ); +} + +- ( void ) dealloc +{ + [ super dealloc ]; + delete viewer_; +} + +- ( void ) renewGState +{ + NSWindow* window; + [ super renewGState ]; + window = [ self window ]; + + if( [ window respondsToSelector: @selector( disableScreenUpdatesUntilFlush ) ] ) + [ window disableScreenUpdatesUntilFlush ]; +} + +- ( void ) drawRect: ( NSRect ) theRect +{ + NSRect bounds = [ self bounds ]; + + viewer_->display( NSWidth( bounds ), NSHeight( bounds ) ); + + [ [ self openGLContext ] flushBuffer ]; +} + +- ( void ) prepareOpenGL +{ + viewer_->initialise( ); + + // Sync to vertical retrace + long VBL = 1; + [ [ self openGLContext ] setValues: &VBL forParameter: NSOpenGLCPSwapInterval ]; +} + +- ( void ) update +{ + [ super update ]; + if( ![ self inLiveResize ] ) + ; +} + +- ( void ) fullscreen +{ + NSOpenGLPixelFormatAttribute attribs[ ] = + { + NSOpenGLPFAFullScreen, + NSOpenGLPFAAccelerated, + NSOpenGLPFAScreenMask, + ( NSOpenGLPixelFormatAttribute ) CGDisplayIDToOpenGLDisplayMask( kCGDirectMainDisplay ), + NSOpenGLPFADoubleBuffer, + NSOpenGLPFAColorSize, ( NSOpenGLPixelFormatAttribute ) 24, + NSOpenGLPFADepthSize, ( NSOpenGLPixelFormatAttribute ) 16, + ( NSOpenGLPixelFormatAttribute ) 0 + }; + + NSOpenGLPixelFormat* pixelFormat = [ [ [ NSOpenGLPixelFormat alloc ] initWithAttributes: attribs ] autorelease ]; + NSOpenGLContext* fullScreenContext = [ [ NSOpenGLContext alloc ] initWithFormat: pixelFormat shareContext: [ self openGLContext ] ]; + + if( fullScreenContext == nil ) return; + + CGDisplayErr err = CGCaptureAllDisplays( ); + if( err != CGDisplayNoErr ) return; + + [ fullScreenContext setFullScreen ]; + [ fullScreenContext makeCurrentContext ]; + + glViewport( 0, 0, CGDisplayPixelsWide( kCGDirectMainDisplay ), CGDisplayPixelsHigh( kCGDirectMainDisplay ) ); + + BOOL stayInFullScreenMode = YES; + while( stayInFullScreenMode ) + { + NSEvent* event; + while( event = [ NSApp nextEventMatchingMask: NSAnyEventMask untilDate: [ NSDate distantPast ] inMode: NSDefaultRunLoopMode dequeue: YES ] ) + { + switch( [ event type ] ) + { + case NSKeyDown: + stayInFullScreenMode = NO; + break; + + default: + break; + } + } + + [ fullScreenContext flushBuffer ]; + } + + glClearColor( 0.0, 0.0, 0.0, 0.0 ); + glClear( GL_COLOR_BUFFER_BIT ); + [ fullScreenContext flushBuffer ]; + glClear( GL_COLOR_BUFFER_BIT ); + [ fullScreenContext flushBuffer ]; + + [ NSOpenGLContext clearCurrentContext ]; + [ fullScreenContext clearDrawable ]; + [ fullScreenContext release ]; + + CGReleaseAllDisplays( ); + + [ self setNeedsDisplay: YES ]; +} + +@end Modified: trunk/app/HDRFlow/main.m =================================================================== --- trunk/app/HDRFlow/main.m 2007-09-12 16:34:07 UTC (rev 298) +++ trunk/app/HDRFlow/main.m 2007-09-12 16:52:46 UTC (rev 299) @@ -3,7 +3,7 @@ // HDRFlow // // Created by Goncalo Carvalho on 28/05/2007. -// Copyright __MyCompanyName__ 2007. All rights reserved. +// Copyright Goncalo Carvalho 2007. All rights reserved. // #import <Cocoa/Cocoa.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |