hdrflow-svn Mailing List for HDRFlow (Page 7)
Status: Pre-Alpha
Brought to you by:
glslang
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(30) |
May
(38) |
Jun
(22) |
Jul
(53) |
Aug
(66) |
Sep
(56) |
Oct
(29) |
Nov
(13) |
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(16) |
Feb
(22) |
Mar
(12) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gl...@us...> - 2007-09-23 13:00:14
|
Revision: 312
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=312&view=rev
Author: glslang
Date: 2007-09-23 06:00:10 -0700 (Sun, 23 Sep 2007)
Log Message:
-----------
+ adds proper rescaling of viewport image
Modified Paths:
--------------
trunk/app/HDRFlow/Viewer.cpp
Modified: trunk/app/HDRFlow/Viewer.cpp
===================================================================
--- trunk/app/HDRFlow/Viewer.cpp 2007-09-23 12:08:24 UTC (rev 311)
+++ trunk/app/HDRFlow/Viewer.cpp 2007-09-23 13:00:10 UTC (rev 312)
@@ -11,12 +11,63 @@
namespace
{
- void calculate_dimensions( ml::frame_type_ptr frame, int& phy_w, int& phy_h, int& req_w, int& req_h )
+ void calculate_dimensions( ml::frame_type_ptr frame, float zoom_level, int& phy_w, int& phy_h, int& req_w, int& req_h )
{
+ il::image_type_ptr im = frame->get_image( );
+
+ float ar = frame->aspect_ratio( );
+ phy_w = im->width( );
+ phy_h = im->height( );
+
+ req_h = phy_h;
+ req_w = int( req_h * ar );
+ req_h = int( zoom_level * req_h );
+ req_w = int( zoom_level * req_w );
}
- void paint_image( il::image_type_ptr im, int width, int height )
+ void calculate_geometry( int req_w, int req_h, int view_width, int view_height, float zoom_level, int& x, int& y, int& width, int& height )
{
+ float ar = float( req_w ) / float( req_h );
+ if( view_height * ar <= view_width )
+ {
+ width = int( view_height * ar );
+ height = view_height;
+ }
+ else
+ {
+ width = view_width;
+ height = int( view_width / ar );
+ }
+
+ if( width < view_width )
+ {
+ x = ( view_width - width ) / 2;
+ }
+ else
+ {
+ x = int( ( view_width - width ) / 2 );
+ if( x < 0 && width + x < view_width )
+ x = view_width - width;
+ if( x > 0 )
+ x = 0;
+ }
+
+ if( height < view_height )
+ {
+ y = ( view_height - height ) / 2;
+ }
+ else
+ {
+ y = int( ( view_height - height ) / 2 );
+ if( y < 0 && height + y < view_height )
+ y = view_width - height;
+ if( y > 0 )
+ y = 0;
+ }
+ }
+
+ void paint_image( il::image_type_ptr im, int width, int height, int x, int y, int mw, int mh )
+ {
int phy_w = im->width( );
int phy_h = im->height( );
@@ -49,8 +100,10 @@
glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, im->data( ) );
- float off_x = width * 0.5f - phy_w * 0.5f;
- float off_y = height * 0.5f - phy_h * 0.5f;
+ float off_x = x;
+ float off_y = y;
+ float req_w = mw;
+ float req_h = mh;
glMatrixMode( GL_PROJECTION );
glPushMatrix( );
@@ -61,7 +114,11 @@
glPushMatrix( );
glLoadIdentity( );
- glTranslatef( off_x, off_y, 0.0f );
+ glTranslatef( off_x, height - off_y - req_h, 0.0f );
+
+ float sw = req_w / phy_w;
+ float sh = req_h / phy_h;
+ glScalef( sw, sh, 1.0f );
if( !im->is_flipped( ) )
{
@@ -127,7 +184,15 @@
il::image_type_ptr im = media->get_image( );
if( !im ) return;
- paint_image( im, width, height );
+ int phy_w, phy_h;
+ int req_w, req_h;
+ int x, y;
+ int mw, mh;
+
+ calculate_dimensions( media->frame( ), 1.0f, phy_w, phy_h, req_w, req_h );
+ calculate_geometry( req_w, req_h, width, height, 1.0f, x, y, mw, mh );
+
+ paint_image( im, width, height, x, y, mw, mh );
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-23 12:08:32
|
Revision: 311
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=311&view=rev
Author: glslang
Date: 2007-09-23 05:08:24 -0700 (Sun, 23 Sep 2007)
Log Message:
-----------
+ clarify the terms of the license
Modified Paths:
--------------
trunk/app/HDRFlow/Bucket.cpp
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/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/ToolbarHolder.h
trunk/app/HDRFlow/ToolbarHolder.m
trunk/app/HDRFlow/Track.cpp
trunk/app/HDRFlow/Track.hpp
trunk/app/HDRFlow/Viewer.cpp
trunk/app/HDRFlow/Viewer.hpp
trunk/app/HDRFlow/ViewportOpenGLView.h
trunk/app/HDRFlow/ViewportOpenGLView.mm
Modified: trunk/app/HDRFlow/Bucket.cpp
===================================================================
--- trunk/app/HDRFlow/Bucket.cpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Bucket.cpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#include "Bucket.hpp"
Modified: trunk/app/HDRFlow/Bucket.hpp
===================================================================
--- trunk/app/HDRFlow/Bucket.hpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Bucket.hpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifndef BUCKET_INC_
Modified: trunk/app/HDRFlow/Cache.cpp
===================================================================
--- trunk/app/HDRFlow/Cache.cpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Cache.cpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#include "Cache.hpp"
Modified: trunk/app/HDRFlow/Cache.hpp
===================================================================
--- trunk/app/HDRFlow/Cache.hpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Cache.hpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifndef CACHE_INC_
Modified: trunk/app/HDRFlow/CustomOpenGLView.h
===================================================================
--- trunk/app/HDRFlow/CustomOpenGLView.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/CustomOpenGLView.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/CustomOpenGLView.m 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import <OpenGL/OpenGL.h>
Modified: trunk/app/HDRFlow/HDRFlowController.h
===================================================================
--- trunk/app/HDRFlow/HDRFlowController.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/HDRFlowController.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/HDRFlowController.mm 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "ScriptEngine.hpp"
Modified: trunk/app/HDRFlow/PlugInsPreferencesController.h
===================================================================
--- trunk/app/HDRFlow/PlugInsPreferencesController.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PlugInsPreferencesController.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "PlugInsPreferencesOutlineViewNode.h"
Modified: trunk/app/HDRFlow/PlugInsPreferencesController.mm
===================================================================
--- trunk/app/HDRFlow/PlugInsPreferencesController.mm 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PlugInsPreferencesController.mm 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PlugInsPreferencesOutlineViewNode.mm 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "PlugInsPreferencesOutlineViewNode.h"
Modified: trunk/app/HDRFlow/PreferencesController.h
===================================================================
--- trunk/app/HDRFlow/PreferencesController.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PreferencesController.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/PreferencesController.m 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "PreferencesController.h"
Modified: trunk/app/HDRFlow/ScriptEditorController.h
===================================================================
--- trunk/app/HDRFlow/ScriptEditorController.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ScriptEditorController.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ScriptEditorController.mm 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "ScriptEditorController.h"
Modified: trunk/app/HDRFlow/ScriptEngine.cpp
===================================================================
--- trunk/app/HDRFlow/ScriptEngine.cpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ScriptEngine.cpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ScriptEngine.hpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifndef SCRIPT_ENGINE_INC_
Modified: trunk/app/HDRFlow/ToolbarHolder.h
===================================================================
--- trunk/app/HDRFlow/ToolbarHolder.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ToolbarHolder.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// 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-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ToolbarHolder.m 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "ToolbarHolder.h"
Modified: trunk/app/HDRFlow/Track.cpp
===================================================================
--- trunk/app/HDRFlow/Track.cpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Track.cpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#include "Track.hpp"
Modified: trunk/app/HDRFlow/Track.hpp
===================================================================
--- trunk/app/HDRFlow/Track.hpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Track.hpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifndef TRACK_INC_
Modified: trunk/app/HDRFlow/Viewer.cpp
===================================================================
--- trunk/app/HDRFlow/Viewer.cpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Viewer.cpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#include "Viewer.hpp"
@@ -11,6 +11,10 @@
namespace
{
+ void calculate_dimensions( ml::frame_type_ptr frame, int& phy_w, int& phy_h, int& req_w, int& req_h )
+ {
+ }
+
void paint_image( il::image_type_ptr im, int width, int height )
{
int phy_w = im->width( );
Modified: trunk/app/HDRFlow/Viewer.hpp
===================================================================
--- trunk/app/HDRFlow/Viewer.hpp 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/Viewer.hpp 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifndef VIEWER_INC_
Modified: trunk/app/HDRFlow/ViewportOpenGLView.h
===================================================================
--- trunk/app/HDRFlow/ViewportOpenGLView.h 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ViewportOpenGLView.h 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "CustomOpenGLView.h"
Modified: trunk/app/HDRFlow/ViewportOpenGLView.mm
===================================================================
--- trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-22 11:27:54 UTC (rev 310)
+++ trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-23 12:08:24 UTC (rev 311)
@@ -2,7 +2,7 @@
// HDRFlow - A image processing application
// Copyright (c) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#import "ViewportOpenGLView.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-22 11:28:06
|
Revision: 310
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=310&view=rev
Author: glslang
Date: 2007-09-22 04:27:54 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
+ build fixes
Modified Paths:
--------------
trunk/lib/openlibraries/installer/openlibraries_runtime.nsi
trunk/lib/openlibraries/installer/openlibraries_sdk.nsi
trunk/lib/openlibraries/src/openassetlib/py/py.cpp
trunk/lib/openlibraries/src/openassetlib/py/py_vc8.vcproj
trunk/lib/openlibraries/src/openimagelib/py/py_vc8.vcproj
trunk/lib/openlibraries/src/openmedialib/py/py_vc8.vcproj
trunk/lib/openlibraries/src/openpluginlib/py/py_vc8.vcproj
Modified: trunk/lib/openlibraries/installer/openlibraries_runtime.nsi
===================================================================
--- trunk/lib/openlibraries/installer/openlibraries_runtime.nsi 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/installer/openlibraries_runtime.nsi 2007-09-22 11:27:54 UTC (rev 310)
@@ -101,10 +101,10 @@
; Python
SetOutPath $INSTDIR\python
- File "..\src\openpluginlib\py\Multi-threaded Release DLL\openpluginlib.pyd"
- File "..\src\openimagelib\py\Multi-threaded Release DLL\openimagelib.pyd"
- File "..\src\openmedialib\py\Multi-threaded Release DLL\openmedialib.pyd"
- File "..\src\openassetlib\py\Multi-threaded Release DLL\openassetlib.pyd"
+ File "..\src\openpluginlib\py\Multi-threaded Release DLL\HDRFlowPlugin.pyd"
+ File "..\src\openimagelib\py\Multi-threaded Release DLL\HDRFlowImage.pyd"
+ File "..\src\openmedialib\py\Multi-threaded Release DLL\HDRFlowMedia.pyd"
+ File "..\src\openassetlib\py\Multi-threaded Release DLL\HDRFlowAsset.pyd"
SetOutPath $INSTDIR\plugins\release
File "..\src\openimagelib\plugins\3D_lightmap\3D_lightmap_plugin.opl"
Modified: trunk/lib/openlibraries/installer/openlibraries_sdk.nsi
===================================================================
--- trunk/lib/openlibraries/installer/openlibraries_sdk.nsi 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/installer/openlibraries_sdk.nsi 2007-09-22 11:27:54 UTC (rev 310)
@@ -202,10 +202,10 @@
; Python
SetOutPath $INSTDIR\python
- File "..\src\openpluginlib\py\Multi-threaded Debug DLL\openpluginlib.pyd"
- File "..\src\openimagelib\py\Multi-threaded Debug DLL\openimagelib.pyd"
- File "..\src\openmedialib\py\Multi-threaded Debug DLL\openmedialib.pyd"
- File "..\src\openassetlib\py\Multi-threaded Debug DLL\openassetlib.pyd"
+ File "..\src\openpluginlib\py\Multi-threaded Debug DLL\HDRFlowPlugin.pyd"
+ File "..\src\openimagelib\py\Multi-threaded Debug DLL\HDRFlowImage.pyd"
+ File "..\src\openmedialib\py\Multi-threaded Debug DLL\HDRFlowMedia.pyd"
+ File "..\src\openassetlib\py\Multi-threaded Debug DLL\HDRFlowAsset.pyd"
SetOutPath $INSTDIR\lib
File "..\src\openpluginlib\pl\Multi-threaded Debug DLL\openpluginlib_pl-vc80-d-0_4_0.lib"
Modified: trunk/lib/openlibraries/src/openassetlib/py/py.cpp
===================================================================
--- trunk/lib/openlibraries/src/openassetlib/py/py.cpp 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/src/openassetlib/py/py.cpp 2007-09-22 11:27:54 UTC (rev 310)
@@ -9,7 +9,7 @@
namespace oal = olib::openassetlib;
-BOOST_PYTHON_MODULE( openassetlib )
+BOOST_PYTHON_MODULE( HDRFlowAsset )
{
oal::detail::py_plugin();
oal::detail::py_guid();
Modified: trunk/lib/openlibraries/src/openassetlib/py/py_vc8.vcproj
===================================================================
--- trunk/lib/openlibraries/src/openassetlib/py/py_vc8.vcproj 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/src/openassetlib/py/py_vc8.vcproj 2007-09-22 11:27:54 UTC (rev 310)
@@ -64,9 +64,10 @@
/>
<Tool
Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-gd-1_34.lib"
- OutputFile="$(OutDir)\openassetlib.pyd"
+ OutputFile="$(OutDir)\HDRFlowAsset.pyd"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib;C:\Python25\Libs;$(SolutionDir)src\openpluginlib\pl\$(ConfigurationName);$(SolutionDir)src\openassetlib\al\$(ConfigurationName);$(SolutionDir)src\openimagelib\il\$(ConfigurationName);$(SolutionDir)src\openmedialib\ml\$(ConfigurationName);$(SolutionDir)src\openobjectlib\sg\$(ConfigurationName)"
GenerateDebugInformation="true"
@@ -149,7 +150,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-1_34.lib"
- OutputFile="$(OutDir)\openassetlib.pyd"
+ OutputFile="$(OutDir)\HDRFlowAsset.pyd"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Boost\lib;C:\Python25\Libs;$(SolutionDir)src\openpluginlib\pl\$(ConfigurationName);$(SolutionDir)src\openassetlib\al\$(ConfigurationName);$(SolutionDir)src\openimagelib\il\$(ConfigurationName);$(SolutionDir)src\openmedialib\ml\$(ConfigurationName);$(SolutionDir)src\openobjectlib\sg\$(ConfigurationName)"
GenerateDebugInformation="true"
Modified: trunk/lib/openlibraries/src/openimagelib/py/py_vc8.vcproj
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/py/py_vc8.vcproj 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/src/openimagelib/py/py_vc8.vcproj 2007-09-22 11:27:54 UTC (rev 310)
@@ -66,7 +66,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-gd-1_34.lib"
- OutputFile="$(OutDir)\openimagelib.pyd"
+ OutputFile="$(OutDir)\HDRFlowImage.pyd"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\src\openpluginlib\pl\$(ConfigurationName)";C:\Python25\Libs"
GenerateDebugInformation="true"
@@ -149,7 +149,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-1_34.lib"
- OutputFile="$(OutDir)\openimagelib.pyd"
+ OutputFile="$(OutDir)\HDRFlowImage.pyd"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\src\openpluginlib\pl\$(ConfigurationName)";C:\Python25\Libs"
GenerateDebugInformation="true"
Modified: trunk/lib/openlibraries/src/openmedialib/py/py_vc8.vcproj
===================================================================
--- trunk/lib/openlibraries/src/openmedialib/py/py_vc8.vcproj 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/src/openmedialib/py/py_vc8.vcproj 2007-09-22 11:27:54 UTC (rev 310)
@@ -68,7 +68,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-gd-1_34.lib"
- OutputFile="$(OutDir)\openmedialib.pyd"
+ OutputFile="$(OutDir)\HDRFlowMedia.pyd"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib;C:\Python25\Libs;$(SolutionDir)\src\openpluginlib\pl\$(ConfigurationName);$(SolutionDir)\src\openimagelib\il\$(ConfigurationName)"
GenerateDebugInformation="true"
@@ -152,7 +152,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-1_34.lib"
- OutputFile="$(OutDir)\openmedialib.pyd"
+ OutputFile="$(OutDir)\HDRFlowMedia.pyd"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Boost\lib;C:\Python25\Libs;$(SolutionDir)\src\openpluginlib\pl\$(ConfigurationName);$(SolutionDir)\src\openimagelib\il\$(ConfigurationName)"
GenerateDebugInformation="true"
Modified: trunk/lib/openlibraries/src/openpluginlib/py/py_vc8.vcproj
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/py/py_vc8.vcproj 2007-09-22 08:30:17 UTC (rev 309)
+++ trunk/lib/openlibraries/src/openpluginlib/py/py_vc8.vcproj 2007-09-22 11:27:54 UTC (rev 310)
@@ -69,7 +69,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-gd-1_34.lib"
- OutputFile="$(OutDir)\openpluginlib.pyd"
+ OutputFile="$(OutDir)\HDRFlowPlugin.pyd"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib;"C:\Program Files\NVIDIA Corporation\Cg\lib";C:\Python25\Libs"
GenerateDebugInformation="true"
@@ -155,7 +155,7 @@
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
AdditionalDependencies="boost_python-vc80-mt-1_34.lib"
- OutputFile="$(OutDir)\openpluginlib.pyd"
+ OutputFile="$(OutDir)\HDRFlowPlugin.pyd"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Boost\lib;"C:\Program Files\NVIDIA Corporation\Cg\lib";C:\Python25\Libs"
GenerateDebugInformation="true"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-22 08:30:21
|
Revision: 309
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=309&view=rev
Author: glslang
Date: 2007-09-22 01:30:17 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
+ maintenance cleanups
Modified Paths:
--------------
trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-19 21:08:41 UTC (rev 308)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-22 08:30:17 UTC (rev 309)
@@ -28,9 +28,6 @@
std::vector<unsigned int> row_start;
std::vector<unsigned int> row_size;
};
-
- void destroy( il::image_type* im )
- { delete im; }
void convert_short( unsigned short* array, long length )
{
@@ -62,24 +59,19 @@
il::image_type_ptr sgi_image_type_to_image_type( int /*dimension*/, int channels, int width, int height )
{
- typedef il::image<unsigned char, il::r8g8b8> r8g8b8_image_type;
- typedef il::image<unsigned char, il::r8g8b8a8> r8g8b8a8_image_type;
- typedef il::image<unsigned char, il::l8a8> l8a8_image_type;
- typedef il::image<unsigned char, il::l8> l8_image_type;
-
switch( channels )
{
case 4:
- return il::image_type_ptr( new il::image_type( r8g8b8a8_image_type( width, height, 1 ) ), destroy );
+ return il::allocate( L"r8g8b8a8", width, height );
case 3:
- return il::image_type_ptr( new il::image_type( r8g8b8_image_type( width, height, 1 ) ), destroy );
+ return il::allocate( L"r8g8b8a8", width, height );
case 2:
- return il::image_type_ptr( new il::image_type( l8a8_image_type( width, height, 1 ) ), destroy );
+ return il::allocate( L"l8a8", width, height );
case 1:
- return il::image_type_ptr( new il::image_type( l8_image_type( width, height, 1 ) ), destroy );
+ return il::allocate( L"l8", width, height );
default:
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-19 21:08:45
|
Revision: 308
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=308&view=rev
Author: glslang
Date: 2007-09-19 14:08:41 -0700 (Wed, 19 Sep 2007)
Log Message:
-----------
+ noise bootstrap code
Modified Paths:
--------------
trunk/lib/extras/extras_vc8.sln
Added Paths:
-----------
trunk/lib/extras/src/noise/noise.cpp
trunk/lib/extras/src/noise/noise_vc8.vcproj
Modified: trunk/lib/extras/extras_vc8.sln
===================================================================
--- trunk/lib/extras/extras_vc8.sln 2007-09-19 20:20:16 UTC (rev 307)
+++ trunk/lib/extras/extras_vc8.sln 2007-09-19 21:08:41 UTC (rev 308)
@@ -26,52 +26,30 @@
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
Multi-threaded Debug DLL|Win32 = Multi-threaded Debug DLL|Win32
Multi-threaded Release DLL|Win32 = Multi-threaded Release DLL|Win32
- Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
- {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Debug|Win32.ActiveCfg = Debug|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Debug|Win32.Build.0 = Debug|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.ActiveCfg = Debug|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.Build.0 = Debug|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.ActiveCfg = Release|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.Build.0 = Release|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Release|Win32.ActiveCfg = Release|Win32
- {927446CD-3483-4CCF-B581-F0896DD4A550}.Release|Win32.Build.0 = Release|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: trunk/lib/extras/src/noise/noise.cpp
===================================================================
--- trunk/lib/extras/src/noise/noise.cpp (rev 0)
+++ trunk/lib/extras/src/noise/noise.cpp 2007-09-19 21:08:41 UTC (rev 308)
@@ -0,0 +1,135 @@
+
+// noise - Noise functions plugin.
+
+// Copyright (C) 2007 Goncalo N. M. de Carvalho
+// Released under the GPLv3 or later.
+// For more information, see http://www.hdrflow.com.
+
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#define STRICT
+#include <windows.h>
+#endif
+
+#ifdef WIN32
+# define NOISE_DECLSPEC __declspec( dllexport )
+#else
+# define NOISE_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
+#include <ofxImageEffect.h>
+
+#include <openmedialib/ml/openmedialib_plugin.hpp>
+
+namespace pl = olib::openpluginlib;
+namespace il = olib::openimagelib::il;
+namespace ml = olib::openmedialib::ml;
+namespace pcos = olib::openpluginlib::pcos;
+
+namespace hdrflow { namespace extras { namespace noise {
+
+namespace
+{
+ OfxHost* host;
+ OfxImageEffectSuiteV1* effect_suite;
+ OfxPropertySuiteV1* property_suite;
+ OfxParameterSuiteV1* parameter_suite;
+ OfxMemorySuiteV1* memory_suite;
+ OfxMultiThreadSuiteV1* multithread_suite;
+ OfxMessageSuiteV1* message_suite;
+
+ void set_host_func( OfxHost* host_struct )
+ {
+ host = host_struct;
+ }
+
+ OfxStatus plugin_main( const char* action, const void* handle, OfxPropertySetHandle in_args, OfxPropertySetHandle out_args )
+ {
+ return kOfxStatOK;
+ }
+
+ OfxPlugin noise_ofx_plugin =
+ {
+ kOfxImageEffectPluginApi,
+ 1,
+ "com.cryogenicgraphics:Noise",
+ 1,
+ 0,
+ set_host_func,
+ plugin_main
+ };
+
+ class noise_filter : public ml::filter_type
+ {
+ public:
+ explicit noise_filter( )
+ { }
+
+ public:
+ const pl::wstring get_uri( ) const { return L"panoramic:"; }
+
+ ml::frame_type_ptr fetch( )
+ {
+ acquire_values( );
+
+ ml::frame_type_ptr result = fetch_from_slot( );
+
+ return result;
+ }
+
+ private:
+ };
+}
+
+struct NOISE_DECLSPEC noise_plugin : public ml::openmedialib_plugin
+{
+ virtual ml::filter_type_ptr filter( const pl::wstring& ) { return ml::filter_type_ptr( new noise_filter ); }
+};
+
+} } }
+
+extern "C"
+{
+ NOISE_DECLSPEC bool openplugin_init( void )
+ {
+ return true;
+ }
+
+ NOISE_DECLSPEC bool openplugin_uninit( void )
+ {
+ return true;
+ }
+
+ NOISE_DECLSPEC bool openplugin_create_plugin( const char*, pl::openplugin** plug )
+ {
+ *plug = new hdrflow::extras::noise::noise_plugin;
+ return true;
+ }
+
+ NOISE_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
+ {
+ delete static_cast<hdrflow::extras::noise::noise_plugin*>( plug );
+ }
+
+ NOISE_DECLSPEC OfxPlugin* OfxGetPlugin( int nth )
+ {
+ if( nth == 0 )
+ return &hdrflow::extras::noise::noise_ofx_plugin;
+
+ return 0;
+ }
+
+ NOISE_DECLSPEC int OfxGetNumberOfPlugins( )
+ {
+ return 1;
+ }
+}
+
+#ifdef WIN32
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID )
+{
+ if( fdwReason == DLL_PROCESS_ATTACH )
+ DisableThreadLibraryCalls( hInstDLL );
+ return TRUE;
+}
+#endif
Property changes on: trunk/lib/extras/src/noise/noise.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/noise/noise_vc8.vcproj
===================================================================
--- trunk/lib/extras/src/noise/noise_vc8.vcproj (rev 0)
+++ trunk/lib/extras/src/noise/noise_vc8.vcproj 2007-09-19 21:08:41 UTC (rev 308)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="noise"
+ ProjectGUID="{927446CD-3483-4CCF-B581-F0896DD4A550}"
+ RootNamespace="noise"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Multi-threaded Debug DLL|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(SolutionDir)\..\openlibraries\src";"C:\Boost\include\boost-1_34";C:\OFX"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NOISE_EXPORTS;HAVE_FLEX_STRING"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)\hdrflow_noise-vc80-d-0_1_0.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openmedialib\ml\$(ConfigurationName)""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Multi-threaded Release DLL|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(SolutionDir)\..\openlibraries\src";"C:\Boost\include\boost-1_34";C:\OFX"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NOISE_EXPORTS;HAVE_FLEX_STRING"
+ ExceptionHandling="2"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ OpenMP="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)\hdrflow_noise-vc80-r-0_1_0.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openmedialib\ml\$(ConfigurationName)""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\noise.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Property changes on: trunk/lib/extras/src/noise/noise_vc8.vcproj
___________________________________________________________________
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-19 20:20:34
|
Revision: 307
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=307&view=rev
Author: glslang
Date: 2007-09-19 13:20:16 -0700 (Wed, 19 Sep 2007)
Log Message:
-----------
+ build fixes
Modified Paths:
--------------
trunk/lib/extras/extras_vc8.sln
trunk/lib/extras/src/panoramic/panoramic.cpp
trunk/lib/extras/src/ppm/ppm_plugin.cpp
trunk/lib/extras/src/raw/raw.cpp
trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp
Modified: trunk/lib/extras/extras_vc8.sln
===================================================================
--- trunk/lib/extras/extras_vc8.sln 2007-09-16 17:48:14 UTC (rev 306)
+++ trunk/lib/extras/extras_vc8.sln 2007-09-19 20:20:16 UTC (rev 307)
@@ -22,28 +22,56 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ppm", "src\ppm\ppm_vc8.vcproj", "{95CD0C43-860C-467B-9995-E6A4E0F8519B}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "noise", "src\noise\noise_vc8.vcproj", "{927446CD-3483-4CCF-B581-F0896DD4A550}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
Multi-threaded Debug DLL|Win32 = Multi-threaded Debug DLL|Win32
Multi-threaded Release DLL|Win32 = Multi-threaded Release DLL|Win32
+ Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {B4CCC2D9-D505-4B08-B908-B2A38105ABC8}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {C8F73831-1355-45C9-BD1B-C7AAB4CDE373}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {9A2197B4-ABC1-4047-A81B-15E9D228C108}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Debug|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Debug|Win32.Build.0 = Multi-threaded Release DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Release|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Release|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Debug|Win32.ActiveCfg = Debug|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Debug|Win32.Build.0 = Debug|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.ActiveCfg = Debug|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Debug DLL|Win32.Build.0 = Debug|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.ActiveCfg = Release|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Multi-threaded Release DLL|Win32.Build.0 = Release|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Release|Win32.ActiveCfg = Release|Win32
+ {927446CD-3483-4CCF-B581-F0896DD4A550}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -55,6 +83,7 @@
{CE7A290A-13C0-424E-A02A-96CDC6B0E6BE} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
{4E0BD6BF-2B4D-4BF8-BEB7-3BFF57D627BC} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8} = {675FBBBA-6681-49E3-AAC6-FE371310DA63}
+ {927446CD-3483-4CCF-B581-F0896DD4A550} = {E0C3CF4A-5F43-4BBC-B7A9-6D4CDB225CD9}
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373} = {D133B05E-F174-4CDA-8FF4-C45C139CFACD}
{9A2197B4-ABC1-4047-A81B-15E9D228C108} = {CE7A290A-13C0-424E-A02A-96CDC6B0E6BE}
{95CD0C43-860C-467B-9995-E6A4E0F8519B} = {4E0BD6BF-2B4D-4BF8-BEB7-3BFF57D627BC}
Modified: trunk/lib/extras/src/panoramic/panoramic.cpp
===================================================================
--- trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-16 17:48:14 UTC (rev 306)
+++ trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-19 20:20:16 UTC (rev 307)
@@ -2,7 +2,7 @@
// panoramic - Panoramic transformations plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifdef WIN32
@@ -11,6 +11,12 @@
#include <windows.h>
#endif
+#ifdef WIN32
+# define PANORAMIC_DECLSPEC __declspec( dllexport )
+#else
+# define PANORAMIC_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
#include <ofxImageEffect.h>
#include <openmedialib/ml/openmedialib_plugin.hpp>
@@ -95,7 +101,7 @@
};
}
-struct panoramic_plugin : public ml::openmedialib_plugin
+struct PANORAMIC_DECLSPEC panoramic_plugin : public ml::openmedialib_plugin
{
virtual ml::filter_type_ptr filter( const pl::wstring& ) { return ml::filter_type_ptr( new panoramic_filter ); }
};
@@ -104,28 +110,28 @@
extern "C"
{
- bool openplugin_init( void )
+ PANORAMIC_DECLSPEC bool openplugin_init( void )
{
return true;
}
- bool openplugin_uninit( void )
+ PANORAMIC_DECLSPEC bool openplugin_uninit( void )
{
return true;
}
- bool openplugin_create_plugin( const char*, pl::openplugin** plug )
+ PANORAMIC_DECLSPEC bool openplugin_create_plugin( const char*, pl::openplugin** plug )
{
*plug = new hdrflow::extras::pan::panoramic_plugin;
return true;
}
- void openplugin_destroy_plugin( pl::openplugin* plug )
+ PANORAMIC_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
{
delete static_cast<hdrflow::extras::pan::panoramic_plugin*>( plug );
}
- OfxPlugin* OfxGetPlugin( int nth )
+ PANORAMIC_DECLSPEC OfxPlugin* OfxGetPlugin( int nth )
{
if( nth == 0 )
return &hdrflow::extras::pan::panoramic_ofx_plugin;
@@ -133,7 +139,7 @@
return 0;
}
- int OfxGetNumberOfPlugins( )
+ PANORAMIC_DECLSPEC int OfxGetNumberOfPlugins( )
{
return 1;
}
Modified: trunk/lib/extras/src/ppm/ppm_plugin.cpp
===================================================================
--- trunk/lib/extras/src/ppm/ppm_plugin.cpp 2007-09-16 17:48:14 UTC (rev 306)
+++ trunk/lib/extras/src/ppm/ppm_plugin.cpp 2007-09-19 20:20:16 UTC (rev 307)
@@ -2,7 +2,7 @@
// ppm - A PPM reader/writer plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the GPL.
+// Released under the GPLv3 or later.
// For more information, see http://www.hdrflow.com.
#ifdef WIN32
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-16 17:48:14 UTC (rev 306)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-19 20:20:16 UTC (rev 307)
@@ -26,10 +26,10 @@
namespace il = olib::openimagelib::il;
namespace pcos = olib::openpluginlib::pcos;
+extern "C" int dcraw_( int argc, char** argv );
+
namespace hdrflow { namespace extras { namespace raw {
-extern "C" int dcraw_( int argc, char** argv );
-
namespace
{
struct query_traits
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp 2007-09-16 17:48:14 UTC (rev 306)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp 2007-09-19 20:20:16 UTC (rev 307)
@@ -24,7 +24,7 @@
namespace olib { namespace openpluginlib {
-class openplugin;
+struct openplugin;
extern "C"
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-16 17:48:16
|
Revision: 306
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=306&view=rev
Author: glslang
Date: 2007-09-16 10:48:14 -0700 (Sun, 16 Sep 2007)
Log Message:
-----------
+ build fixes
Modified Paths:
--------------
trunk/unity.sh
Modified: trunk/unity.sh
===================================================================
--- trunk/unity.sh 2007-09-16 16:20:54 UTC (rev 305)
+++ trunk/unity.sh 2007-09-16 17:48:14 UTC (rev 306)
@@ -464,6 +464,21 @@
HDRFlow.framework/Frameworks/$j.framework/PlugIns/$j.so
done
done
+
+ for j in $fmwklist
+ do if [ $j == "HDRFlowPlugin" ]
+ then continue
+ fi
+ libraries=`ls HDRFlow.framework/Frameworks/$j.framework/PlugIns/*.dylib`
+ for lib in $libraries
+ do depname=`otool -L $lib | grep $i | cut -d ' ' -f 1`
+ for k in $depname
+ do base=`basename $k`
+ install_name_tool -change $k \
+ $install_name_prefix/HDRFlow.framework/Versions/$framework_version/Libraries/$base $lib
+ done
+ done
+ done
done
update_umbrella_framework_install_names "HDRFlowPlugin"
@@ -513,7 +528,7 @@
{
if [ "$strip_symbols" -eq 1 ]
then
- echo -n " Stripping symbols..."
+ echo -n " Stripping symbols..."
strip -x HDRFlow.framework/HDRFlow &&
strip -x HDRFlow.framework/Libraries/* &&
strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/HDRFlowPlugin &&
@@ -531,6 +546,16 @@
fi
}
+make_framework_libraries_unique( )
+{
+ libraries=`ls HDRFlow.framework/Versions/$framework_version/Libraries/*.dylib`
+ for i in $libraries
+ do if [ -e HDRFlow.framework/Versions/$framework_version/Frameworks/$1.framework/Versions/$framework_version/Libraries/`basename $i` ]
+ then rm -rf HDRFlow.framework/Versions/$framework_version/Frameworks/$1.framework/Versions/$framework_version/Libraries/`basename $i`
+ fi
+ done
+}
+
if [ "$build_frameworks" -eq 1 ] && [ "$PLATFORM" = "Darwin" ]
then
echo "Building OS/X Frameworks..."
@@ -547,7 +572,10 @@
then echo " Building Umbrella Framework..."
echo -n " HDRFlow..."
make_umbrella_framework &&
- strip_framework_symbols
+ strip_framework_symbols &&
+ make_framework_libraries_unique "HDRFlowPlugin" &&
+ make_framework_libraries_unique "HDRFlowImage" &&
+ make_framework_libraries_unique "HDRFlowMedia"
check_status $?
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-16 16:21:00
|
Revision: 305
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=305&view=rev
Author: glslang
Date: 2007-09-16 09:20:54 -0700 (Sun, 16 Sep 2007)
Log Message:
-----------
+ build fixes
Modified Paths:
--------------
trunk/unity.sh
Modified: trunk/unity.sh
===================================================================
--- trunk/unity.sh 2007-09-15 14:51:36 UTC (rev 304)
+++ trunk/unity.sh 2007-09-16 16:20:54 UTC (rev 305)
@@ -55,7 +55,7 @@
output_directory="."
-openlibraries_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-pythonversion=2.3 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-glewprefix=/usr/local"
+openlibraries_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-pythonversion=2.3 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-glewprefix=/usr/local --with-tiffprefix=/usr/local"
extras_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-mayadir=/Applications/Autodesk/maya8.5"
extras_image_plugins="ppm raw"
@@ -513,19 +513,18 @@
{
if [ "$strip_symbols" -eq 1 ]
then
- echo -n " Stripping symbols..."
+ echo -n " Stripping symbols..."
strip -x HDRFlow.framework/HDRFlow &&
strip -x HDRFlow.framework/Libraries/* &&
strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/HDRFlowPlugin &&
- strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/Libraries/*.dylib &&
strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.so &&
- strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.dylib &&
strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/HDRFlowImage &&
- strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/Libraries/*.dylib &&
strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.so &&
strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.dylib &&
strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/HDRFlowMedia &&
- strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/Libraries/*.dylib &&
strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.so &&
strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.dylib
check_status $?
@@ -547,10 +546,9 @@
if [ "$build_umbrella" -eq 1 ]
then echo " Building Umbrella Framework..."
echo -n " HDRFlow..."
- make_umbrella_framework
- check_status $?
-
+ make_umbrella_framework &&
strip_framework_symbols
+ check_status $?
fi
if [ "$build_application" -eq 1 ]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-15 14:51:37
|
Revision: 304
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=304&view=rev
Author: glslang
Date: 2007-09-15 07:51:36 -0700 (Sat, 15 Sep 2007)
Log Message:
-----------
+ adds ppm plugin to win build
Modified Paths:
--------------
trunk/lib/extras/extras_vc8.sln
trunk/lib/extras/src/raw/raw_vc8.vcproj
Added Paths:
-----------
trunk/lib/extras/src/ppm/ppm_vc8.vcproj
Property Changed:
----------------
trunk/lib/extras/src/ppm/ppm_plugin.opl
Modified: trunk/lib/extras/extras_vc8.sln
===================================================================
--- trunk/lib/extras/extras_vc8.sln 2007-09-15 14:29:54 UTC (rev 303)
+++ trunk/lib/extras/extras_vc8.sln 2007-09-15 14:51:36 UTC (rev 304)
@@ -18,6 +18,10 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jp2", "src\jp2\jp2_vc8.vcproj", "{9A2197B4-ABC1-4047-A81B-15E9D228C108}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PPM", "PPM", "{4E0BD6BF-2B4D-4BF8-BEB7-3BFF57D627BC}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ppm", "src\ppm\ppm_vc8.vcproj", "{95CD0C43-860C-467B-9995-E6A4E0F8519B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Multi-threaded Debug DLL|Win32 = Multi-threaded Debug DLL|Win32
@@ -36,6 +40,10 @@
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
{9A2197B4-ABC1-4047-A81B-15E9D228C108}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.ActiveCfg = Multi-threaded Debug DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Debug DLL|Win32.Build.0 = Multi-threaded Debug DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.ActiveCfg = Multi-threaded Release DLL|Win32
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B}.Multi-threaded Release DLL|Win32.Build.0 = Multi-threaded Release DLL|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -45,8 +53,10 @@
{E0C3CF4A-5F43-4BBC-B7A9-6D4CDB225CD9} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
{D133B05E-F174-4CDA-8FF4-C45C139CFACD} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
{CE7A290A-13C0-424E-A02A-96CDC6B0E6BE} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
+ {4E0BD6BF-2B4D-4BF8-BEB7-3BFF57D627BC} = {2644DB77-2096-4A50-A23F-C57D3C011FE2}
{B4CCC2D9-D505-4B08-B908-B2A38105ABC8} = {675FBBBA-6681-49E3-AAC6-FE371310DA63}
{C8F73831-1355-45C9-BD1B-C7AAB4CDE373} = {D133B05E-F174-4CDA-8FF4-C45C139CFACD}
{9A2197B4-ABC1-4047-A81B-15E9D228C108} = {CE7A290A-13C0-424E-A02A-96CDC6B0E6BE}
+ {95CD0C43-860C-467B-9995-E6A4E0F8519B} = {4E0BD6BF-2B4D-4BF8-BEB7-3BFF57D627BC}
EndGlobalSection
EndGlobal
Property changes on: trunk/lib/extras/src/ppm/ppm_plugin.opl
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/ppm/ppm_vc8.vcproj
===================================================================
--- trunk/lib/extras/src/ppm/ppm_vc8.vcproj (rev 0)
+++ trunk/lib/extras/src/ppm/ppm_vc8.vcproj 2007-09-15 14:51:36 UTC (rev 304)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ppm"
+ ProjectGUID="{95CD0C43-860C-467B-9995-E6A4E0F8519B}"
+ RootNamespace="ppm"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Multi-threaded Debug DLL|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(SolutionDir)\..\openlibraries\src";"C:\Boost\include\boost-1_34""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PPM_EXPORTS;HAVE_FLEX_STRING"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ OpenMP="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\hdrflow_extras_ppm-vc80-d-0_1_0.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Multi-threaded Release DLL|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(SolutionDir)\..\openlibraries\src";"C:\Boost\include\boost-1_34""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PPM_EXPORTS;HAVE_FLEX_STRING"
+ ExceptionHandling="2"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ OpenMP="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\hdrflow_extras_ppm-vc80-r-0_1_0.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)""
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\ppm_plugin.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Property changes on: trunk/lib/extras/src/ppm/ppm_vc8.vcproj
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/lib/extras/src/raw/raw_vc8.vcproj
===================================================================
--- trunk/lib/extras/src/raw/raw_vc8.vcproj 2007-09-15 14:29:54 UTC (rev 303)
+++ trunk/lib/extras/src/raw/raw_vc8.vcproj 2007-09-15 14:51:36 UTC (rev 304)
@@ -66,7 +66,7 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
- OutputFile="$(OutDir)\hdrflow_raw-vc80-d-0_1_0.dll"
+ OutputFile="$(OutDir)\hdrflow_extras_raw-vc80-d-0_1_0.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openmedialib\ml\$(ConfigurationName)""
IgnoreDefaultLibraryNames=""
@@ -150,7 +150,7 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions="/LARGEADDRESSAWARE"
- OutputFile="$(OutDir)\hdrflow_raw-vc80-r-0_1_0.dll"
+ OutputFile="$(OutDir)\hdrflow_extras_raw-vc80-r-0_1_0.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\Boost\lib;"$(SolutionDir)\..\openlibraries\src\openpluginlib\pl\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openimagelib\il\$(ConfigurationName)";"$(SolutionDir)\..\openlibraries\src\openmedialib\ml\$(ConfigurationName)""
IgnoreDefaultLibraryNames=""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-15 14:29:56
|
Revision: 303
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=303&view=rev
Author: glslang
Date: 2007-09-15 07:29:54 -0700 (Sat, 15 Sep 2007)
Log Message:
-----------
+build updates
Modified Paths:
--------------
trunk/lib/openlibraries/m4/tiff.m4
Modified: trunk/lib/openlibraries/m4/tiff.m4
===================================================================
--- trunk/lib/openlibraries/m4/tiff.m4 2007-09-15 13:07:24 UTC (rev 302)
+++ trunk/lib/openlibraries/m4/tiff.m4 2007-09-15 14:29:54 UTC (rev 303)
@@ -8,6 +8,7 @@
with_tiffprefix="")
TIFF_PREFIX="$with_tiffprefix"
+ TIFF_INCLUDE=""
TIFF_INCLUDE_PATH=""
TIFF_LIB_PATH=""
TIFF_LIBS=""
@@ -22,8 +23,8 @@
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$TIFF_LIB_PATH $save_LDFLAGS"
- AC_CHECK_LIB(TIFF, TIFFOpen,
- [AC_CHECK_HEADER(${TIFF_INCLUDE}/tiffio.h,
+ AC_CHECK_LIB(tiff, TIFFOpen,
+ [AC_CHECK_HEADER(${TIFF_INCLUDE}tiffio.h,
[ac_have_tiff="yes" TIFF_LIBS="-ltiff" AC_DEFINE(HAVE_TIFF_H, 1,[Define this if you have TIFF support])],
[AC_MSG_ERROR([*** TIFF support is not available. Please install libtiff to proceed. ***])])]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-15 13:07:26
|
Revision: 302
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=302&view=rev
Author: glslang
Date: 2007-09-15 06:07:24 -0700 (Sat, 15 Sep 2007)
Log Message:
-----------
+ build fix
Modified Paths:
--------------
trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp 2007-09-15 13:07:24 UTC (rev 302)
@@ -124,7 +124,9 @@
}
}
+}
+
openplugin::~openplugin( )
{ }
-} } }
+} }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-14 20:25:11
|
Revision: 301
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=301&view=rev
Author: glslang
Date: 2007-09-14 13:25:06 -0700 (Fri, 14 Sep 2007)
Log Message:
-----------
+ gcc visibility updates, ppm plugin (raw conversion), build updates
Modified Paths:
--------------
trunk/HDRFlowFramework.pmproj
trunk/app/HDRFlow/Viewer.cpp
trunk/app/HDRFlow/Viewer.hpp
trunk/app/HDRFlow/ViewportOpenGLView.mm
trunk/lib/extras/configure.ac
trunk/lib/extras/src/Makefile.am
trunk/lib/extras/src/imf/imf_common.cpp
trunk/lib/extras/src/imf/imf_common.hpp
trunk/lib/extras/src/imf/mfn/mfn.cpp
trunk/lib/extras/src/panoramic/panoramic.cpp
trunk/lib/extras/src/raw/Makefile.am
trunk/lib/extras/src/raw/raw.cpp
trunk/lib/extras/src/raw/raw_plugin.opl
trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
trunk/unity.sh
Added Paths:
-----------
trunk/lib/extras/src/ppm/
trunk/lib/extras/src/ppm/Makefile.am
trunk/lib/extras/src/ppm/ppm_plugin.cpp
trunk/lib/extras/src/ppm/ppm_plugin.opl
Modified: trunk/HDRFlowFramework.pmproj
===================================================================
(Binary files differ)
Modified: trunk/app/HDRFlow/Viewer.cpp
===================================================================
--- trunk/app/HDRFlow/Viewer.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/Viewer.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -9,11 +9,104 @@
namespace hdrflow {
+namespace
+{
+ void paint_image( il::image_type_ptr im, int width, int height )
+ {
+ 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;
+ type = GL_UNSIGNED_BYTE;
+ }
+
+ glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
+ glEnable( target );
+
+ GLuint id;
+ glGenTextures( 1, &id );
+
+ glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+ glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, im->data( ) );
+
+ float off_x = width * 0.5f - phy_w * 0.5f;
+ float off_y = height * 0.5f - phy_h * 0.5f;
+
+ glMatrixMode( GL_PROJECTION );
+ glPushMatrix( );
+ glLoadIdentity( );
+ gluOrtho2D( 0.0f, width, 0.0f, height );
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix( );
+ glLoadIdentity( );
+
+ glTranslatef( off_x, off_y, 0.0f );
+
+ if( !im->is_flipped( ) )
+ {
+ glBegin( GL_QUADS );
+ glTexCoord2f( 0.0f, 0.0f );
+ glVertex2f( 0.0f, 0.0f );
+ glTexCoord2f( tex_w, 0.0f );
+ glVertex2f( phy_w, 0.0f );
+ glTexCoord2f( tex_w, tex_h );
+ glVertex2f( phy_w, phy_h );
+ glTexCoord2f( 0.0f, tex_h );
+ glVertex2f( 0.0f, phy_h );
+ glEnd( );
+ }
+ else
+ {
+ glBegin( GL_QUADS );
+ glTexCoord2f( 0.0f, tex_h );
+ glVertex2f( 0.0f, 0.0f );
+ glTexCoord2f( tex_w, tex_h );
+ glVertex2f( phy_w, 0.0f );
+ glTexCoord2f( tex_w, 0.0f );
+ glVertex2f( phy_w, phy_h );
+ glTexCoord2f( 0.0f, 0.0f );
+ glVertex2f( 0.0f, phy_h );
+ glEnd( );
+ }
+
+ glMatrixMode( GL_MODELVIEW );
+ glPopMatrix( );
+
+ glMatrixMode( GL_PROJECTION );
+ glPopMatrix( );
+
+ glDisable( target );
+ }
+}
+
Viewer::Viewer( const pl::string& uri )
- : default_( new Track( uri ) )
+ : default_( new TrackHolder( TrackPtr( new Track( uri ) ) ) )
{
}
+Viewer::TrackHolder::~TrackHolder( )
+{
+ if( id_ )
+ glDeleteTextures( 1, &id_ );
+}
+
void Viewer::initialise( )
{
glClearColor( 0.0, 0.0, 0.0, 0.0 );
@@ -30,29 +123,7 @@
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 );
-
-
+ paint_image( im, width, height );
}
}
Modified: trunk/app/HDRFlow/Viewer.hpp
===================================================================
--- trunk/app/HDRFlow/Viewer.hpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/Viewer.hpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -14,6 +14,48 @@
class Viewer
{
+private:
+ class TrackHolder
+ {
+ public:
+ explicit TrackHolder( TrackPtr track )
+ : track_( track )
+ , phy_w( 0 )
+ , phy_h( 0 )
+ , id_( 0 )
+ { }
+
+ ~TrackHolder( );
+
+ public:
+ BucketPtr media( int position )
+ { return track_->media( position ); }
+
+ // OpenGL associated member functions.
+ public:
+ GLuint id( ) const
+ { return id_; }
+ void set_id( GLuint id )
+ { id_ = id; }
+
+ GLenum target( ) const
+ { return target_; }
+ void set_target( GLenum target )
+ { target_ = target; }
+
+ private:
+ TrackPtr track_;
+ int phy_w;
+ int phy_h;
+
+ // OpenGL associated member data.
+ private:
+ GLuint id_;
+ GLenum target_;
+ };
+
+ typedef boost::shared_ptr<TrackHolder> TrackHolderPtr;
+
public:
explicit Viewer( const pl::string& uri );
@@ -21,7 +63,7 @@
void display( int width, int height );
private:
- TrackPtr default_;
+ TrackHolderPtr default_;
};
}
Modified: trunk/app/HDRFlow/ViewportOpenGLView.mm
===================================================================
--- trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/app/HDRFlow/ViewportOpenGLView.mm 2007-09-14 20:25:06 UTC (rev 301)
@@ -67,6 +67,9 @@
- ( void ) prepareOpenGL
{
+ glewExperimental = GL_TRUE;
+ glewInit( );
+
viewer_->initialise( );
// Sync to vertical retrace
Modified: trunk/lib/extras/configure.ac
===================================================================
--- trunk/lib/extras/configure.ac 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/configure.ac 2007-09-14 20:25:06 UTC (rev 301)
@@ -144,6 +144,24 @@
INCLUDES='-I$(top_srcdir)/src'
AC_SUBST(INCLUDES)
+dnl OpenLibraries common flags
+dnl NOTE: we could use $(var) instead of @var@ if we want late-expansion in the generated makefiles.
+EXTRAS_CXXFLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
+AC_SUBST(EXTRAS_CXXFLAGS)
+
+EXTRAS_LDFLAGS=''
+
+case $host in
+ *-*-linux*)
+ EXTRAS_LDFLAGS='-Wl,-export-dynamic'
+ ;;
+ *-apple-darwin*)
+ EXTRAS_LDFLAGS='-Wl,-headerpad_max_install_names'
+ ;;
+esac
+
+AC_SUBST(EXTRAS_LDFLAGS)
+
dnl Universal Binary Support (OS X only)
AC_CHECK_UNIVERSAL_BINARY_SUPPORT( )
@@ -176,6 +194,7 @@
src/imf/hdr/Makefile
src/imf/mfn/Makefile
src/panoramic/Makefile
+src/ppm/Makefile
src/raw/Makefile
])
AC_OUTPUT
Modified: trunk/lib/extras/src/Makefile.am
===================================================================
--- trunk/lib/extras/src/Makefile.am 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -3,4 +3,4 @@
#
#
-SUBDIRS = panoramic raw imf
+SUBDIRS = imf panoramic ppm raw
Modified: trunk/lib/extras/src/imf/imf_common.cpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/imf_common.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -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 <cstdio>
Modified: trunk/lib/extras/src/imf/imf_common.hpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.hpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/imf_common.hpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -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 IMF_COMMON_INC_
#define IMF_COMMON_INC_
Modified: trunk/lib/extras/src/imf/mfn/mfn.cpp
===================================================================
--- trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -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.
#ifdef __APPLE__
#include <maya/OpenMayaMac.h>
@@ -135,7 +135,13 @@
#endif
im_ = il::convert( im_, L"r32g32b32a32f" );
- if( !im_ ) return MS::kFailure;
+ if( !im_ )
+ {
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: Internal Error: conversion to floating point format failed. Please report to su...@cr...." );
+#endif
+ return MS::kFailure;
+ }
int width = im_->width( );
int height = im_->height( );
@@ -173,20 +179,22 @@
extern "C" MStatus initializePlugin( MObject obj )
{
-#ifndef NDEBUG
- MGlobal::displayInfo( "HDRFlow: initialising ..." );
-#endif
-
MFnPlugin plugin( obj, "com.cryogenicgraphics", "8.0", "Any" );
MStringArray extensions;
extensions.append( "hdr" );
extensions.append( "exr" );
extensions.append( "tiff" );
extensions.append( "tif" );
+ extensions.append( "cr2" );
+ extensions.append( "raw" );
CHECK_MSTATUS( plugin.registerImageFile( "HDRFlow", hdrflow::extras::mfn::image_reader::creator, extensions ) );
pl::init( );
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: initialised ..." );
+#endif
+
return MS::kSuccess;
}
@@ -194,6 +202,10 @@
{
MFnPlugin plugin( obj );
CHECK_MSTATUS( plugin.deregisterImageFile( "HDRFlow" ) );
+
+#ifndef NDEBUG
+ MGlobal::displayInfo( "HDRFlow: uninitialised ..." );
+#endif
return MS::kSuccess;
}
Modified: trunk/lib/extras/src/panoramic/panoramic.cpp
===================================================================
--- trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/panoramic/panoramic.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -2,8 +2,8 @@
// panoramic - Panoramic transformations plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the LGPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
Added: trunk/lib/extras/src/ppm/Makefile.am
===================================================================
--- trunk/lib/extras/src/ppm/Makefile.am (rev 0)
+++ trunk/lib/extras/src/ppm/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,28 @@
+
+#
+#
+#
+
+libdir = $(EXTRAS_PLUGINPATH)
+
+lib_LTLIBRARIES = libhdrflow_extras_ppm.la
+
+libhdrflow_extras_ppm_la_SOURCES = \
+ ppm_plugin.cpp
+
+libhdrflow_extras_ppm_la_CXXFLAGS = \
+ $(EXTRAS_CXXFLAGS) \
+ $(BOOST_INCLUDE_PATH) \
+ -I$(top_builddir)/../openlibraries/src
+
+libhdrflow_extras_ppm_la_LIBADD = \
+ $(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la \
+ $(top_builddir)/../openlibraries/src/openimagelib/il/libopenimagelib_il.la
+
+libhdrflow_extras_ppm_la_LDFLAGS = \
+ $(EXTRAS_LDFLAGS)
+
+libhdrflow_extras_ppm_ladir = $(EXTRAS_PLUGINPATH)
+libhdrflow_extras_ppm_la_DATA = ppm_plugin.opl
+
+nobase_dist_libhdrflow_extras_ppm_la_DATA = ppm_plugin.opl
Property changes on: trunk/lib/extras/src/ppm/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/ppm/ppm_plugin.cpp
===================================================================
--- trunk/lib/extras/src/ppm/ppm_plugin.cpp (rev 0)
+++ trunk/lib/extras/src/ppm/ppm_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,110 @@
+
+// ppm - A PPM reader/writer plugin.
+
+// Copyright (C) 2007 Goncalo N. M. de Carvalho
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
+
+#ifdef WIN32
+# define PPM_DECLSPEC __declspec( dllexport )
+#else
+# define PPM_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
+#include <openimagelib/il/openimagelib_plugin.hpp>
+
+namespace il = olib::openimagelib::il;
+namespace pl = olib::openpluginlib;
+
+namespace hdrflow {
+
+namespace
+{
+ il::image_type_ptr load_ppm( pl::stream_ptr stream )
+ {
+ char buffer[ 128 ];
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ if( buffer[ 0 ] != 'P' && buffer[ 1 ] != '6' )
+ return il::image_type_ptr( );
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ int width, height;
+ if( sscanf( buffer, "%d %d", &width, &height ) < 2 )
+ return il::image_type_ptr( );
+
+ if( !stream->getline( buffer, 128 ) )
+ return il::image_type_ptr( );
+
+ il::image_type_ptr im = il::allocate( L"r32g32b32a32f", width, height );
+ if( !im )
+ return il::image_type_ptr( );
+
+ const unsigned short* data = reinterpret_cast<const unsigned short*>( stream->data( ) );
+ il::image_type::pointer texels = im->data( );
+
+ for( int i = 0; i < height; ++i )
+ {
+ for( int j = 0; j < width; ++j )
+ {
+ ( ( float* ) texels )[ 0 ] = *data++;
+ ( ( float* ) texels )[ 1 ] = *data++;
+ ( ( float* ) texels )[ 2 ] = *data++;
+ ( ( float* ) texels )[ 3 ] = 1.0f;
+
+ texels += 4 * sizeof( float );
+ }
+
+ texels += ( im->pitch( ) - im->linesize( ) ) * sizeof( float );
+ }
+
+ return im;
+ }
+}
+
+struct PPM_DECLSPEC ppm_plugin : public il::openimagelib_plugin
+{
+ virtual il::image_type_ptr load( pl::stream_ptr stream )
+ { return load_ppm( stream ); }
+
+ virtual bool store( pl::stream_ptr, il::image_type_ptr )
+ { return false; }
+};
+
+}
+
+extern "C"
+{
+ PPM_DECLSPEC bool openplugin_init( void )
+ {
+ return true;
+ }
+
+ PPM_DECLSPEC bool openplugin_uninit( void )
+ {
+ return true;
+ }
+
+ PPM_DECLSPEC bool openplugin_create_plugin( const char*, pl::openplugin** plug )
+ {
+ *plug = new hdrflow::ppm_plugin;
+ return true;
+ }
+
+ PPM_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
+ { delete static_cast<hdrflow::ppm_plugin*>( plug ); }
+}
+
+#ifdef WIN32
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID )
+{
+ if( fdwReason == DLL_PROCESS_ATTACH )
+ DisableThreadLibraryCalls( hInstDLL );
+
+ return TRUE;
+}
+#endif
Property changes on: trunk/lib/extras/src/ppm/ppm_plugin.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/ppm/ppm_plugin.opl
===================================================================
--- trunk/lib/extras/src/ppm/ppm_plugin.opl (rev 0)
+++ trunk/lib/extras/src/ppm/ppm_plugin.opl 2007-09-14 20:25:06 UTC (rev 301)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openlibraries version="1.0">
+ <openimagelib name="oil" version="0.2.0">
+ <plugin name="HDRFlow ppm plugin" type="input" in_filter="*.ppm" extension='".*\.ppm"' merit="0" filename='"libhdrflow_extras_ppm.so", "libhdrflow_extras_ppm.dylib", "hdrflow_extras_ppm-vc80-d-0_1_0.dll", "hdrflow_extras_ppm-vc80-r-0_1_0.dll"'/>
+ </openimagelib>
+</openlibraries>
Modified: trunk/lib/extras/src/raw/Makefile.am
===================================================================
--- trunk/lib/extras/src/raw/Makefile.am 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/Makefile.am 2007-09-14 20:25:06 UTC (rev 301)
@@ -12,6 +12,7 @@
dcraw.c
libhdrflow_extras_raw_la_CXXFLAGS = \
+ $(EXTRAS_CXXFLAGS) \
$(BOOST_INCLUDE_PATH) \
-I$(top_builddir)/../openlibraries/src
@@ -23,6 +24,9 @@
$(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la \
$(top_builddir)/../openlibraries/src/openimagelib/il/libopenimagelib_il.la
+libhdrflow_extras_raw_la_LDFLAGS = \
+ $(EXTRAS_LDFLAGS)
+
libhdrflow_extras_raw_ladir = $(EXTRAS_PLUGINPATH)
libhdrflow_extras_raw_la_DATA = raw_plugin.opl
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -2,10 +2,16 @@
// raw - A camera raw processing plugin.
// Copyright (C) 2007 Goncalo N. M. de Carvalho
-// Released under the LGPL.
-// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+// Released under the GPL.
+// For more information, see http://www.hdrflow.com.
#ifdef WIN32
+# define RAW_DECLSPEC __declspec( dllexport )
+#else
+# define RAW_DECLSPEC __attribute__( ( visibility( "default" ) ) )
+#endif
+
+#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <windows.h>
@@ -50,14 +56,12 @@
il::image_type_ptr dcraw( pcos::property_container properties ) // TODO: change to ptr when pcos moves to proper copy semantics
{
pl::string linear_output = properties.get_property_with_key( pcos::key::from_string( "linear_output" ) ).value<pl::string>( );
- pl::string tiff = properties.get_property_with_key( pcos::key::from_string( "tiff_output" ) ).value<pl::string>( );
pl::string path = properties.get_property_with_key( pcos::key::from_string( "path" ) ).value<pl::string>( );
pl::string output_path = properties.get_property_with_key( pcos::key::from_string( "output_path" ) ).value<pl::string>( );
std::vector<const char*> args;
args.push_back( "dcraw" );
args.push_back( linear_output.c_str( ) );
- args.push_back( tiff.c_str( ) );
args.push_back( "-Z" );
args.push_back( output_path.c_str( ) );
args.push_back( path.c_str( ) );
@@ -82,7 +86,7 @@
}
}
-class raw_plugin : public il::openimagelib_plugin
+class RAW_DECLSPEC raw_plugin : public il::openimagelib_plugin
{
public:
explicit raw_plugin( )
@@ -156,7 +160,7 @@
tempdir = "/var/tmp/";
#endif
- raw_props_.append( output_path_ = tempdir + pl::string( "hdrflow_extras_raw_.tiff" ) );
+ raw_props_.append( output_path_ = tempdir + pl::string( "hdrflow_extras_raw_.ppm" ) );
}
private:
@@ -187,12 +191,6 @@
} } }
-#ifdef WIN32
-# define RAW_DECLSPEC __declspec( dllexport )
-#else
-# define RAW_DECLSPEC __attribute__( ( visibility( "default" ) ) )
-#endif
-
extern "C"
{
RAW_DECLSPEC bool openplugin_init( void )
@@ -212,7 +210,7 @@
}
RAW_DECLSPEC void openplugin_destroy_plugin( pl::openplugin* plug )
- {
+ {
delete static_cast<hdrflow::extras::raw::raw_plugin*>( plug );
}
}
Modified: trunk/lib/extras/src/raw/raw_plugin.opl
===================================================================
--- trunk/lib/extras/src/raw/raw_plugin.opl 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/extras/src/raw/raw_plugin.opl 2007-09-14 20:25:06 UTC (rev 301)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<openlibraries version="1.0">
- <!-- plugins go here -->
<openimagelib name="oil" version="0.2.0">
- <plugin name="HDRFlow Raw plugin" type="input" in_filter="*.raw *.cr2" extension='".*\.raw", ".*\.cr2"' merit="0" filename='"libhdrflow_raw.so", "libhdrflow_raw.dylib", "hdrflow_raw-vc80-d-0_1_0.dll", "hdrflow_raw-vc80-r-0_1_0.dll"'/>
+ <plugin name="HDRFlow Raw plugin" type="input" in_filter="*.raw *.cr2" extension='".*\.raw", ".*\.cr2"' merit="0" filename='"libhdrflow_extras_raw.so", "libhdrflow_extras_raw.dylib", "hdrflow_extras_raw-vc80-d-0_1_0.dll", "hdrflow_extras_raw-vc80-r-0_1_0.dll"'/>
</openimagelib>
</openlibraries>
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/3D_lightmap/3D_lightmap_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -84,7 +84,7 @@
*/
}
-class lightmap3D_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC lightmap3D_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/bmp/bmp_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -16,7 +16,7 @@
{
}
-struct bmp_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC bmp_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr )
{ return il::image_type_ptr( ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/dds/dds_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -200,7 +200,7 @@
}
}
-struct dds_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC dds_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_dds( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/dpx/dpx_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -834,7 +834,7 @@
}
}
-struct dpx_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC dpx_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_dpx( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/exr/exr_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -56,7 +56,7 @@
}
}
-struct exr_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC exr_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_exr( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/gdi+/gdi+_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -144,7 +144,7 @@
*/
}
-class gdi_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC gdi_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/hdr/hdr_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -275,7 +275,7 @@
}
}
-struct hdr_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC hdr_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_hdr( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/jpg/jpg_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -289,7 +289,7 @@
}
}
-class jpg_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC jpg_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/png/png_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -97,7 +97,7 @@
}
}
-struct png_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC png_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_png( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/psd/psd_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -70,7 +70,7 @@
return il::image_type_ptr( );
}
-class psd_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC psd_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -115,7 +115,7 @@
}
}
-struct qt_plugin : public il::openimagelib_plugin
+struct IL_DECLSPEC qt_plugin : public il::openimagelib_plugin
{
virtual il::image_type_ptr load( pl::stream_ptr stream )
{ return load_quicktime( stream ); }
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/sgi/sgi_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -261,7 +261,7 @@
}
}
-class sgi_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC sgi_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tga/tga_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -219,7 +219,7 @@
#undef TGA_TYPE_GRAY_RLE
}
-class tga_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC tga_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-14 20:25:06 UTC (rev 301)
@@ -143,7 +143,7 @@
}
}
-class tiff_plugin : public il::openimagelib_plugin
+class IL_DECLSPEC tiff_plugin : public il::openimagelib_plugin
{
public:
virtual il::image_type_ptr load( pl::stream_ptr stream )
Modified: trunk/unity.sh
===================================================================
--- trunk/unity.sh 2007-09-13 17:58:41 UTC (rev 300)
+++ trunk/unity.sh 2007-09-14 20:25:06 UTC (rev 301)
@@ -56,8 +56,10 @@
output_directory="."
openlibraries_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-pythonversion=2.3 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-glewprefix=/usr/local"
-extras_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking"
+extras_configure_options="--with-boostprefix=/usr/local --with-boostversion=1_34_1 --with-boostthreadruntime=mt --enable-universalbinaries --disable-dependency-tracking --with-mayadir=/Applications/Autodesk/maya8.5"
+extras_image_plugins="ppm raw"
+
while getopts "v:b:efi:o:x:upasm" option
do
case $option in
@@ -87,14 +89,6 @@
done
fi
-strip_library_symbols( )
-{
- if [ "$strip_symbols" -eq 1 ]
- then
- strip -x $1
- fi
-}
-
make_framework_dir( )
{
framework_dir="$output_directory/$1.framework"
@@ -159,8 +153,7 @@
do if [ ! -L $i ]
then ln -sf Versions/Current/$1 $1.framework/$1 &&
cp $i $1.framework/Versions/Current/$1 &&
- install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1 &&
- strip_library_symbols $1.framework/$1
+ install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1
fi
done
}
@@ -173,8 +166,7 @@
for i in $libs
do if [ ! -L $i ]
then cp $i $1.framework/Versions/$framework_version/PlugIns/$1.so &&
- install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1 &&
- strip_library_symbols $1.framework/Versions/$framework_version/PlugIns/$1.so
+ install_name_tool -id $install_name_prefix/$1.framework/Versions/$framework_version/$1 $1.framework/$1
fi
done
fi
@@ -207,7 +199,7 @@
if [ -d "$2/../plugins" ]
then plugins=`ls $2/../plugins`
for i in $plugins
- do if [ -d $2/../plugins/$i ]
+ do if [ -d $2/../plugins/$i/.libs ]
then cp $2/../plugins/$i/*.opl $1.framework/PlugIns
fi
done
@@ -272,7 +264,6 @@
fi
done
done
- strip_library_symbols $1.framework/Versions/$framework_version/Libraries/*
}
make_framework_plugins( )
@@ -285,7 +276,6 @@
fi
done
fi
- strip_library_symbols $2.framework/PlugIns/*
}
make_framework_interdeps( )
@@ -315,6 +305,38 @@
done
}
+make_extras_plugins( )
+{
+ case $1 in
+ HDRFlowImage )
+ for i in $extras_image_plugins
+ do if [ -d ./lib/extras/src/$i/.libs ]
+ then cp -R ./lib/extras/src/$i/.libs/*.dylib $1.framework/PlugIns
+ fi
+ done
+ ;;
+
+ HDRFlowMedia )
+ ;;
+ esac
+}
+
+make_extras_resources( )
+{
+ case $1 in
+ HDRFlowImage )
+ for i in $extras_image_plugins
+ do if [ -d ./lib/extras/src/$i/.libs ]
+ then cp -R ./lib/extras/src/$i/*.opl $1.framework/PlugIns
+ fi
+ done
+ ;;
+
+ HDRFlowMedia )
+ ;;
+ esac
+}
+
make_framework( )
{
rm -rf $1.framework
@@ -323,11 +345,13 @@
make_framework_libs $1 $2 &&
make_framework_python_libs $1 "$2/../py" &&
make_framework_deps $1 &&
+ make_extras_plugins $1 &&
make_framework_plugins $2 $1 &&
make_framework_interdeps $1 &&
make_framework_plugins_deps $1 &&
make_framework_libs_deps $1 &&
- make_framework_resources $1 $2
+ make_framework_resources $1 $2 &&
+ make_extras_resources $1
}
make_umbrella_framework_deps( )
@@ -474,11 +498,6 @@
check_status $?
}
-make_extras_framework( )
-{
- echo "not implemented"
-}
-
make_app( )
{
cp -R ./app/HDRFlow/build/Release/HDRFlow.app .
@@ -490,6 +509,29 @@
hdiutil create -ov -srcfolder $1.pkg $1.dmg -fs HFS+ -volname "$1"
}
+strip_framework_symbols( )
+{
+ if [ "$strip_symbols" -eq 1 ]
+ then
+ echo -n " Stripping symbols..."
+ strip -x HDRFlow.framework/HDRFlow &&
+ strip -x HDRFlow.framework/Libraries/* &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/HDRFlowPlugin &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/*.dylib &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/HDRFlowImage &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/*.dylib &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/HDRFlowMedia &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/Libraries &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.so &&
+ strip -x HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/*.dylib
+ check_status $?
+ fi
+}
+
if [ "$build_frameworks" -eq 1 ] && [ "$PLATFORM" = "Darwin" ]
then
echo "Building OS/X Frameworks..."
@@ -506,7 +548,9 @@
then echo " Building Umbrella Framework..."
echo -n " HDRFlow..."
make_umbrella_framework
- check_status $?
+ check_status $?
+
+ strip_framework_symbols
fi
if [ "$build_application" -eq 1 ]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-13 17:58:45
|
Revision: 300
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=300&view=rev
Author: glslang
Date: 2007-09-13 10:58:41 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
+build fixes
Modified Paths:
--------------
trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
trunk/lib/openlibraries/src/openobjectlib/sg/hw_GL_renderer.cpp
trunk/lib/openlibraries/src/openobjectlib/sg/render_buffer.hpp
trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp
trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/quicktime/quicktime_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -109,7 +109,9 @@
SetGWorld( port, device );
DisposeGWorld( gworld );
- return il::convert( im, L"a8b8g8r8" );
+ im = il::convert( im, L"a8b8g8r8" );
+ im->set_flipped( true );
+ return im;
}
}
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -58,10 +58,12 @@
if( config != PLANARCONFIG_CONTIG )
return tiff_null_image( tif );
- unsigned short photo, compression, sample_format;
+ unsigned short photo, compression;
+ unsigned short sample_format, orientation;
TIFFGetFieldDefaulted( tif, TIFFTAG_PHOTOMETRIC, &photo );
TIFFGetFieldDefaulted( tif, TIFFTAG_SAMPLEFORMAT, &sample_format );
TIFFGetFieldDefaulted( tif, TIFFTAG_COMPRESSION, &compression );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_ORIENTATION, &orientation );
bool is_float = false;
switch( photo )
@@ -83,6 +85,9 @@
if( !im )
return il::image_type_ptr( );
+ if( orientation == ORIENTATION_TOPLEFT )
+ im->set_flipped( true );
+
il::image_type::pointer data = im->data( );
int bytes_per_pixel = components * bpp / 8;
@@ -117,6 +122,10 @@
}
else
{
+ size_t pitch = im->pitch( );
+ if( is_float )
+ pitch *= sizeof( float );
+
unsigned int rows;
TIFFGetField( tif, TIFFTAG_ROWSPERSTRIP, &rows );
@@ -124,7 +133,7 @@
for( int i = 0; i < height * depth; i += rows )
{
tstrip_t strip = TIFFComputeStrip( tif, i, 0 );
- TIFFReadEncodedStrip( tif, strip, data + i * im->pitch( ), strip_size );
+ TIFFReadEncodedStrip( tif, strip, data + i * pitch, strip_size );
}
}
Modified: trunk/lib/openlibraries/src/openobjectlib/sg/hw_GL_renderer.cpp
===================================================================
--- trunk/lib/openlibraries/src/openobjectlib/sg/hw_GL_renderer.cpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openobjectlib/sg/hw_GL_renderer.cpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -975,8 +975,9 @@
num_im = 6;
}
- typedef std::pair<GLenum, GLenum> internal_and_base_format;
- internal_and_base_format pf = opl::pf_to_gl_format( im->pf( ).c_str( ) );
+ GLint internal_format;
+ GLenum format, type;
+ opl::pf_to_gl_format( im->pf( ).c_str( ), internal_format, format, type );
glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
@@ -990,20 +991,20 @@
size_t mipsize = il::calculate_mipmap_size( im, 0 );
if( width != 0 && height == 0 && !im->is_volume( ) )
- glCompressedTexImage1DARB( target + i, 0, pf.second, static_cast<GLsizei>( width ), 0, mipsize, texels );
+ glCompressedTexImage1DARB( target + i, 0, format, static_cast<GLsizei>( width ), 0, mipsize, texels );
else if( width != 0 && height != 0 && !im->is_volume( ) )
- glCompressedTexImage2DARB( target + i, 0, pf.second, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), 0, mipsize, texels );
+ glCompressedTexImage2DARB( target + i, 0, format, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), 0, mipsize, texels );
else if( width != 0 && height != 0 && im->is_volume( ) )
- glCompressedTexImage3DARB( target + i, 0, pf.second, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), static_cast<GLsizei>( depth ), 0, mipsize, texels );
+ glCompressedTexImage3DARB( target + i, 0, format, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), static_cast<GLsizei>( depth ), 0, mipsize, texels );
}
else
{
if( width != 0 && height == 0 && !im->is_volume( ) )
- glTexImage1D( target + i, 0, pf.first, static_cast<GLsizei>( width ), 0, pf.second, GL_UNSIGNED_BYTE, texels );
+ glTexImage1D( target + i, 0, internal_format, static_cast<GLsizei>( width ), 0, format, type, texels );
else if( width != 0 && height != 0 && !im->is_volume( ) )
- glTexImage2D( target + i, 0, pf.first, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), 0, pf.second, GL_UNSIGNED_BYTE, texels );
+ glTexImage2D( target + i, 0, internal_format, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), 0, format, type, texels );
else if( width != 0 && height != 0 && im->is_volume( ) )
- glTexImage3D( target + i, 0, pf.first, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), static_cast<GLsizei>( depth ), 0, pf.second, GL_UNSIGNED_BYTE, texels );
+ glTexImage3D( target + i, 0, internal_format, static_cast<GLsizei>( width ), static_cast<GLsizei>( height ), static_cast<GLsizei>( depth ), 0, format, type, texels );
}
}
Modified: trunk/lib/openlibraries/src/openobjectlib/sg/render_buffer.hpp
===================================================================
--- trunk/lib/openlibraries/src/openobjectlib/sg/render_buffer.hpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openobjectlib/sg/render_buffer.hpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -719,8 +719,9 @@
{
GLenum target = buffer_type<surface_format>::get_GL_target( force_2_0_targets );
- typedef std::pair<GLenum, GLenum> internal_and_base_format;
- internal_and_base_format pf = openpluginlib::pf_to_gl_format( data_->pf( ) );
+ GLint internal_format;
+ GLenum format, type;
+ openpluginlib::pf_to_gl_format( data_->pf( ), internal_format, format, type );
glEnable( target );
glBindTexture( target, id_ );
@@ -736,11 +737,11 @@
{
glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
- glTexImage2D( target, 0, pf.first, phy_w, phy_h, 0, pf.second, GL_UNSIGNED_BYTE, data_->data( ) );
+ glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, data_->data( ) );
}
else
{
- glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, pf.second, GL_UNSIGNED_BYTE, data_->data( ) );
+ glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, format, type, data_->data( ) );
}
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.cpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -124,4 +124,7 @@
}
}
+openplugin::~openplugin( )
+{ }
+
} } }
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp 2007-09-12 16:52:46 UTC (rev 299)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/openplugin.hpp 2007-09-13 17:58:41 UTC (rev 300)
@@ -75,11 +75,9 @@
};
}
-class OPENPLUGINLIB_DECLSPEC openplugin
+struct OPENPLUGINLIB_DECLSPEC openplugin
{
-public:
- explicit openplugin( ) { }
- virtual ~openplugin( ) { }
+ virtual ~openplugin( );
};
typedef boost::shared_ptr<openplugin> opl_ptr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <gl...@us...> - 2007-09-12 16:34:12
|
Revision: 298
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=298&view=rev
Author: glslang
Date: 2007-09-12 09:34:07 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
+ changes to allow cleaner client code. some gl state calculation was left to the client with the need to replicate the same tests
Modified Paths:
--------------
trunk/lib/openlibraries/src/openmedialib/plugins/oil/Makefile.am
trunk/lib/openlibraries/src/openmedialib/plugins/oil/oil_plugin.cpp
trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.cpp
trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.hpp
trunk/lib/openlibraries/src/umbrella_framework/openlibraries.hpp
trunk/lib/openlibraries/test/openimagelib/GL/_2D/_2D.cpp
trunk/lib/openlibraries/test/openimagelib/GL/_2D_crop/_2D_crop.cpp
trunk/lib/openlibraries/test/openimagelib/GL/_2D_exr/_2D_exr.cpp
trunk/lib/openlibraries/test/openimagelib/GL/_2D_scale/_2D_scale.cpp
Modified: trunk/lib/openlibraries/src/openmedialib/plugins/oil/Makefile.am
===================================================================
--- trunk/lib/openlibraries/src/openmedialib/plugins/oil/Makefile.am 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/src/openmedialib/plugins/oil/Makefile.am 2007-09-12 16:34:07 UTC (rev 298)
@@ -11,12 +11,13 @@
oil_plugin.cpp
libopenmedialib_oil_la_CXXFLAGS = \
- $(OLIB_CXXFLAGS) \
+ $(OLIB_CXXFLAGS) \
$(BOOST_INCLUDE_PATH) \
-DML_PLUGIN_EXPORTS
libopenmedialib_oil_la_LIBADD = \
$(BOOST_FILESYSTEM_LIBS) \
+ $(top_builddir)/src/openpluginlib/pl/libopenpluginlib_pl.la \
$(top_builddir)/src/openmedialib/ml/libopenmedialib_ml.la \
$(top_builddir)/src/openimagelib/il/libopenimagelib_il.la
Modified: trunk/lib/openlibraries/src/openmedialib/plugins/oil/oil_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openmedialib/plugins/oil/oil_plugin.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/src/openmedialib/plugins/oil/oil_plugin.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -202,7 +202,7 @@
pl::string full = path_ + "/" + files_[ 0 ];
il_query_traits query( pl::to_wstring( full ), L"input" );
discovery plugins( query );
- if ( plugins.size( ) != 0 )
+ if ( !plugins.empty( ) )
{
discovery::const_iterator it = plugins.begin( );
plug_ = boost::shared_dynamic_cast<il::openimagelib_plugin>( it->create_plugin( "" ) );
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.cpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -9,85 +9,163 @@
namespace olib { namespace openpluginlib {
-std::pair<int, GLenum> pf_to_gl_format( const wstring& pf )
+bool pf_to_gl_format( const wstring& pf, GLint& internal_format, GLenum& format, GLenum& type )
{
if( pf == L"dxt1" )
{
- return std::make_pair( -1, GL_COMPRESSED_RGB_S3TC_DXT1_EXT );
+ internal_format = -1;
+ format = GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"dxt3" )
{
- return std::make_pair( -1, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT );
+ internal_format = -1;
+ format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"dxt5" )
{
- return std::make_pair( -1, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT );
+ internal_format = -1;
+ format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"b8g8r8a8" )
{
- return std::make_pair( 4, GL_BGRA_EXT );
+ internal_format = GL_RGBA;
+ format = GL_BGRA_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"a8b8g8r8" )
{
- return std::make_pair( 4, GL_ABGR_EXT );
+ internal_format = GL_RGBA;
+ format = GL_ABGR_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"b8g8r8" )
{
- return std::make_pair( 3, GL_BGR_EXT );
+ internal_format = GL_RGB;
+ format = GL_BGR_EXT;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"r8g8b8" )
{
- return std::make_pair( 3, GL_RGB );
+ internal_format = GL_RGB;
+ format = GL_RGB;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"r8g8b8a8" )
{
- return std::make_pair( 4, GL_RGBA );
+ internal_format = GL_RGBA;
+ format = GL_RGBA;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"l8" )
{
- return std::make_pair( 1, GL_LUMINANCE );
+ internal_format = GL_LUMINANCE;
+ format = GL_LUMINANCE;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"l8a8" )
{
- return std::make_pair( 2, GL_LUMINANCE_ALPHA );
+ internal_format = GL_LUMINANCE_ALPHA;
+ format = GL_LUMINANCE_ALPHA;
+ type = GL_UNSIGNED_BYTE;
+
+ return true;
}
else if( pf == L"r10g10b10" )
{
- return std::make_pair( GL_RGB10, GL_RGB );
+ internal_format = GL_RGB10;
+ format = GL_RGB;
+ type = GL_UNSIGNED_SHORT;
+
+ return true;
}
else if( pf == L"r12g12b12" )
{
- return std::make_pair( GL_RGB12, GL_RGB );
+ internal_format = GL_RGB12;
+ format = GL_RGB;
+ type = GL_UNSIGNED_SHORT;
+
+ return true;
}
else if( pf == L"r12g12b12a12" )
{
- return std::make_pair( GL_RGBA12, GL_RGBA );
+ internal_format = GL_RGBA12;
+ format = GL_RGBA;
+ type = GL_UNSIGNED_SHORT;
+
+ return true;
}
else if( pf == L"r16g16b16" )
{
- return std::make_pair( GL_RGB16, GL_RGB );
+ internal_format = GL_RGB16;
+ format = GL_RGB;
+ type = GL_UNSIGNED_SHORT;
+
+ return true;
}
else if( pf == L"r16g16b16a16" )
{
- return std::make_pair( GL_RGBA16, GL_RGBA );
+ internal_format = GL_RGBA16;
+ format = GL_RGBA;
+ type = GL_UNSIGNED_SHORT;
+
+ return true;
}
else if( pf == L"yuv422" )
{
if( GLEW_APPLE_ycbcr_422 )
- return std::make_pair( 3, GL_YCBCR_422_APPLE );
+ {
+ internal_format = GL_RGB;
+ format = GL_YCBCR_422_APPLE;
+ type = GL_UNSIGNED_SHORT_8_8_APPLE;
+
+ return true;
+ }
}
else if( pf == L"r32g32b32f" )
{
if( GLEW_ARB_texture_float )
- return std::make_pair( GL_RGB32F_ARB, GL_RGB );
+ {
+ internal_format = GL_RGB32F_ARB;
+ format = GL_RGB;
+ type = GL_FLOAT;
+
+ return true;
+ }
}
else if( pf == L"r32g32b32a32f" )
{
if( GLEW_ARB_texture_float )
- return std::make_pair( GL_RGBA32F_ARB, GL_RGBA );
+ {
+ internal_format = GL_RGBA32F_ARB;
+ format = GL_RGBA;
+ type = GL_FLOAT;
+
+ return true;
+ }
}
- return std::make_pair( 0, 0 );
+ return false;
}
bool is_compressed_format( const wstring& pf )
Modified: trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.hpp
===================================================================
--- trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.hpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/src/openpluginlib/pl/GL_utility.hpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -8,8 +8,6 @@
#ifndef GL_UTILITY_INC_
#define GL_UTILITY_INC_
-#include <utility>
-
#include <GL/glew.h>
#include <openpluginlib/pl/config.hpp>
@@ -17,10 +15,10 @@
namespace olib { namespace openpluginlib {
-OPENPLUGINLIB_DECLSPEC std::pair<int, GLenum> pf_to_gl_format( const wstring& pf );
-OPENPLUGINLIB_DECLSPEC bool is_compressed_format( const wstring& pf );
-OPENPLUGINLIB_DECLSPEC bool is_yuv_format( const wstring& pf );
-OPENPLUGINLIB_DECLSPEC bool texture_target( size_t width, size_t height, GLenum& target, float& tex_w, float& tex_h, bool force_2_0_targets = false );
+OPENPLUGINLIB_DECLSPEC bool pf_to_gl_format( const wstring& pf, GLint& internal_format, GLenum& external_format, GLenum& type );
+OPENPLUGINLIB_DECLSPEC bool is_compressed_format( const wstring& pf );
+OPENPLUGINLIB_DECLSPEC bool is_yuv_format( const wstring& pf );
+OPENPLUGINLIB_DECLSPEC bool texture_target( size_t width, size_t height, GLenum& target, float& tex_w, float& tex_h, bool force_2_0_targets = false );
} }
Modified: trunk/lib/openlibraries/src/umbrella_framework/openlibraries.hpp
===================================================================
--- trunk/lib/openlibraries/src/umbrella_framework/openlibraries.hpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/src/umbrella_framework/openlibraries.hpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -20,6 +20,7 @@
#include <openpluginlib/pl/openpluginlib.hpp>
#include <openpluginlib/pl/utf8_utils.hpp>
+#include <openpluginlib/pl/GL_utility.hpp>
#include <openimagelib/il/il.hpp>
#include <openimagelib/il/openimagelib_plugin.hpp>
#include <openmedialib/ml/ml.hpp>
Modified: trunk/lib/openlibraries/test/openimagelib/GL/_2D/_2D.cpp
===================================================================
--- trunk/lib/openlibraries/test/openimagelib/GL/_2D/_2D.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/test/openimagelib/GL/_2D/_2D.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -81,20 +81,21 @@
image = il::conform( image, il::cropped | il::flipped | il::flopped );
image = il::convert( image, L"r8g8b8" );
if( !image ) return 0;
+
+ GLint internal_format;
+ GLenum format, type;
+ pl::pf_to_gl_format( image->pf( ), internal_format, format, type );
- GLuint id;
+ glActiveTexture( GL_TEXTURE0 );
- std::pair<int, GLenum> pf = pl::pf_to_gl_format( image->pf( ) );
-
- glActiveTexture( GL_TEXTURE0 );
-
+ GLuint id;
glGenTextures( 1, &id );
glBindTexture( GL_TEXTURE_2D, id );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
- glTexImage2D( GL_TEXTURE_2D, 0, pf.first, image->width( ), image->height( ), 0, pf.second, GL_UNSIGNED_BYTE, image->data( ) );
+ glTexImage2D( GL_TEXTURE_2D, 0, internal_format, image->width( ), image->height( ), 0, format, type, image->data( ) );
return id;
}
Modified: trunk/lib/openlibraries/test/openimagelib/GL/_2D_crop/_2D_crop.cpp
===================================================================
--- trunk/lib/openlibraries/test/openimagelib/GL/_2D_crop/_2D_crop.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/test/openimagelib/GL/_2D_crop/_2D_crop.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -85,19 +85,20 @@
orig_w = image->width( );
orig_h = image->height( );
- GLuint id;
+ GLint internal_format;
+ GLenum format, type;
+ opl::pf_to_gl_format( image->pf( ), internal_format, format, type );
- std::pair<int, GLenum> pf = opl::pf_to_gl_format( image->pf( ).c_str( ) );
+ glActiveTexture( GL_TEXTURE0 );
- glActiveTexture( GL_TEXTURE0 );
-
+ GLuint id;
glGenTextures( 1, &id );
glBindTexture( GL_TEXTURE_2D, id );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
- glTexImage2D( GL_TEXTURE_2D, 0, pf.first, image->width( ), image->height( ), 0, pf.second, GL_UNSIGNED_BYTE, image->data( ) );
+ glTexImage2D( GL_TEXTURE_2D, 0, internal_format, image->width( ), image->height( ), 0, format, type, image->data( ) );
glEnable( GL_TEXTURE_2D );
@@ -113,10 +114,12 @@
orig->crop( 0, 0, static_cast<int>( crop_w ), static_cast<int>( crop_h ), false );
il::image_type_ptr new_im = il::conform( orig, il::cropped | il::flipped | il::flopped );
- std::pair<int, GLenum> pf = opl::pf_to_gl_format( new_im->pf( ).c_str( ) );
+ GLint internal_format;
+ GLenum format, type;
+ opl::pf_to_gl_format( new_im->pf( ), internal_format, format, type );
glBindTexture( GL_TEXTURE_2D, texid_jpg );
- glTexImage2D( GL_TEXTURE_2D, 0, pf.first, new_im->width( ), new_im->height( ), 0, pf.second, GL_UNSIGNED_BYTE, new_im->data( ) );
+ glTexImage2D( GL_TEXTURE_2D, 0, internal_format, new_im->width( ), new_im->height( ), 0, format, type, new_im->data( ) );
glPushMatrix( );
Modified: trunk/lib/openlibraries/test/openimagelib/GL/_2D_exr/_2D_exr.cpp
===================================================================
--- trunk/lib/openlibraries/test/openimagelib/GL/_2D_exr/_2D_exr.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/test/openimagelib/GL/_2D_exr/_2D_exr.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -79,21 +79,22 @@
image = il::tm_linear( image );
- GLuint id;
+ GLint internal_format;
+ GLenum format, type;
+ opl::pf_to_gl_format( image->pf( ), internal_format, format, type );
- std::pair<int, GLenum> pf = opl::pf_to_gl_format( image->pf( ) );
-
glActiveTexture( GL_TEXTURE0 );
glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
-
+
+ GLuint id;
glGenTextures( 1, &id );
glBindTexture( GL_TEXTURE_RECTANGLE_EXT, id );
glTexParameteri( GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
- glTexImage2D( GL_TEXTURE_RECTANGLE_EXT, 0, pf.first, image->width( ), image->height( ), 0, pf.second, GL_UNSIGNED_BYTE, image->data( ) );
+ glTexImage2D( GL_TEXTURE_RECTANGLE_EXT, 0, internal_format, image->width( ), image->height( ), 0, format, type, image->data( ) );
tex_width = image->width( );
tex_height = image->height( );
Modified: trunk/lib/openlibraries/test/openimagelib/GL/_2D_scale/_2D_scale.cpp
===================================================================
--- trunk/lib/openlibraries/test/openimagelib/GL/_2D_scale/_2D_scale.cpp 2007-09-06 22:34:31 UTC (rev 297)
+++ trunk/lib/openlibraries/test/openimagelib/GL/_2D_scale/_2D_scale.cpp 2007-09-12 16:34:07 UTC (rev 298)
@@ -81,21 +81,22 @@
il::image_type_ptr new_im = il::rescale( image, 134, 100, 1, il::BILINEAR_SAMPLING );
- GLuint id;
+ GLint internal_format;
+ GLenum format, type;
+ opl::pf_to_gl_format( new_im->pf( ), internal_format, format, type );
- std::pair<int, GLenum> gl_pf = opl::pf_to_gl_format( new_im->pf( ) );
-
opl::texture_target( new_im->width( ), new_im->height( ), target, tex_w, tex_h );
glActiveTexture( GL_TEXTURE0 );
-
+
+ GLuint id;
glGenTextures( 1, &id );
glBindTexture( target, id );
glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
- glTexImage2D( target, 0, gl_pf.first, new_im->width( ), new_im->height( ), 0, gl_pf.second, GL_UNSIGNED_BYTE, new_im->data( ) );
+ glTexImage2D( target, 0, internal_format, new_im->width( ), new_im->height( ), 0, format, type, new_im->data( ) );
return id;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-06 22:34:33
|
Revision: 297
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=297&view=rev
Author: glslang
Date: 2007-09-06 15:34:31 -0700 (Thu, 06 Sep 2007)
Log Message:
-----------
+ writes output to temp
Modified Paths:
--------------
trunk/lib/extras/src/raw/dcraw.c
trunk/lib/extras/src/raw/raw.cpp
Modified: trunk/lib/extras/src/raw/dcraw.c
===================================================================
--- trunk/lib/extras/src/raw/dcraw.c 2007-09-05 22:20:13 UTC (rev 296)
+++ trunk/lib/extras/src/raw/dcraw.c 2007-09-06 22:34:31 UTC (rev 297)
@@ -7407,9 +7407,7 @@
#ifndef NO_LCMS
char *cam_profile=0, *out_profile=0;
#endif
- char tempdir[ BUFSIZ ];
- DWORD dw;
-
+
#ifndef LOCALTIME
putenv ("TZ=UTC");
#endif
@@ -7457,7 +7455,7 @@
puts("");
return 1;
}
- argv[argc] = "";
+ //argv[argc] = "";
for (arg=1; argv[arg][0] == '-'; ) {
opt = argv[arg++][1];
if ((cp = strchr (sp="nbrktqsHA", opt)))
@@ -7503,6 +7501,7 @@
case 'm': output_color = 0; break;
case 'T': output_tiff = 1; break;
case '4': output_bps = 16; break;
+ case 'Z': ofname = argv[arg++]; break;
default:
fprintf (stderr,_("Unknown option \"-%c\".\n"), opt);
return 1;
@@ -7528,7 +7527,7 @@
status = 1;
image = 0;
oprof = 0;
- meta_data = ofname = 0;
+ meta_data = 0;
if (setjmp (failure)) {
if (fileno(ifp) > 2) fclose(ifp);
if (fileno(ofp) > 2) fclose(ofp);
@@ -7696,24 +7695,15 @@
write_ext = ".tiff";
else
write_ext = ".pgm\0.ppm\0.ppm\0.pam" + colors*5-5;
-#ifdef WIN32
- dw = GetTempPath(BUFSIZ, tempdir);
- if( dw > BUFSIZ || dw == 0 )
- return 2;
-#else
- tempdir = "/var/tmp";
-#endif
- ofname = (char *) malloc (strlen(ifname) + strlen(tempdir)+ 16);
- merror (ofname, "main()");
if (write_to_stdout)
strcpy (ofname,_("standard output"));
else {
- strcpy (ofname, tempdir);
- strcat (ofname, ifname);
- if ((cp = strrchr (ofname, '.'))) *cp = 0;
- if (thumbnail_only)
- strcat (ofname, ".thumb");
- strcat (ofname, write_ext);
+// strcpy (ofname, tempdir);
+// strcat (ofname, ifname);
+// if ((cp = strrchr (ofname, '.'))) *cp = 0;
+// if (thumbnail_only)
+// strcat (ofname, ".thumb");
+// strcat (ofname, write_ext);
ofp = fopen (ofname, "wb");
if (!ofp) {
status = 1;
@@ -7728,7 +7718,7 @@
if (ofp != stdout) fclose(ofp);
cleanup:
if (meta_data) free (meta_data);
- if (ofname) free (ofname);
+ //if (ofname) free (ofname);
if (oprof) free (oprof);
if (image) free (image);
}
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-05 22:20:13 UTC (rev 296)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-06 22:34:31 UTC (rev 297)
@@ -52,33 +52,22 @@
pl::string linear_output = properties.get_property_with_key( pcos::key::from_string( "linear_output" ) ).value<pl::string>( );
pl::string tiff = properties.get_property_with_key( pcos::key::from_string( "tiff_output" ) ).value<pl::string>( );
pl::string path = properties.get_property_with_key( pcos::key::from_string( "path" ) ).value<pl::string>( );
+ pl::string output_path = properties.get_property_with_key( pcos::key::from_string( "output_path" ) ).value<pl::string>( );
std::vector<const char*> args;
args.push_back( "dcraw" );
args.push_back( linear_output.c_str( ) );
args.push_back( tiff.c_str( ) );
+ args.push_back( "-Z" );
+ args.push_back( output_path.c_str( ) );
args.push_back( path.c_str( ) );
if( dcraw_( static_cast<int>( args.size( ) ), const_cast<char**>( &args[ 0 ] ) ) )
return il::image_type_ptr( );
- pl::string tempdir;
-#ifdef WIN32
- TCHAR wtempdir[ BUFSIZ ];
- DWORD dw = GetTempPath(BUFSIZ, wtempdir);
- if( dw > BUFSIZ || dw == 0 )
- return il::image_type_ptr( );
- tempdir = pl::to_string( wtempdir );
-#else
- tempdir = "/var/tmp";
-#endif
-
- pl::string pathname( path.begin( ), path.begin( ) + path.find_last_of( "." ) );
- pathname = pl::string( tempdir ) + pathname + ".tiff";
+ typedef pl::discovery<query_traits> discovery;
- typedef pl::discovery<query_traits> discovery;
-
- discovery plugins( query_traits( pl::to_wstring( pathname ) ) );
+ discovery plugins( query_traits( pl::to_wstring( output_path ) ) );
if( plugins.empty( ) )
return il::image_type_ptr( );
@@ -86,7 +75,7 @@
{
il::openimagelib_plugin_ptr plug = boost::shared_dynamic_cast<il::openimagelib_plugin>( i->create_plugin( "" ) );
if( plug )
- return plug->load( pl::make_stream( pathname, std::ios::in ) );
+ return plug->load( pl::make_stream( output_path, std::ios::in ) );
}
return il::image_type_ptr( );
@@ -118,6 +107,7 @@
, linear_output_( pcos::key::from_string( "linear_output" ) )
, tiff_output_( pcos::key::from_string( "tiff_output" ) )
, path_( pcos::key::from_string( "path" ) )
+ , output_path_( pcos::key::from_string( "output_path" ) )
{
set_raw_properties( );
}
@@ -155,6 +145,18 @@
raw_props_.append( linear_output_ = pl::string( "-4" ) );
raw_props_.append( tiff_output_ = pl::string( "-T" ) );
raw_props_.append( path_ = pl::string( "" ) );
+
+ pl::string tempdir;
+#ifdef WIN32
+ TCHAR wtempdir[ BUFSIZ ];
+ DWORD dw = GetTempPath(BUFSIZ, wtempdir);
+ if( !( dw > BUFSIZ || dw == 0 ) )
+ tempdir = pl::to_string( wtempdir );
+#else
+ tempdir = "/var/tmp/";
+#endif
+
+ raw_props_.append( output_path_ = tempdir + pl::string( "hdrflow_extras_raw_.tiff" ) );
}
private:
@@ -180,6 +182,7 @@
pcos::property linear_output_;
pcos::property tiff_output_;
pcos::property path_;
+ pcos::property output_path_;
};
} } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-05 22:20:18
|
Revision: 296
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=296&view=rev
Author: glslang
Date: 2007-09-05 15:20:13 -0700 (Wed, 05 Sep 2007)
Log Message:
-----------
+ output to temp directory (untested)
Modified Paths:
--------------
trunk/lib/extras/src/raw/dcraw.c
trunk/lib/extras/src/raw/raw.cpp
Modified: trunk/lib/extras/src/raw/dcraw.c
===================================================================
--- trunk/lib/extras/src/raw/dcraw.c 2007-09-02 22:35:27 UTC (rev 295)
+++ trunk/lib/extras/src/raw/dcraw.c 2007-09-05 22:20:13 UTC (rev 296)
@@ -7407,6 +7407,8 @@
#ifndef NO_LCMS
char *cam_profile=0, *out_profile=0;
#endif
+ char tempdir[ BUFSIZ ];
+ DWORD dw;
#ifndef LOCALTIME
putenv ("TZ=UTC");
@@ -7694,12 +7696,20 @@
write_ext = ".tiff";
else
write_ext = ".pgm\0.ppm\0.ppm\0.pam" + colors*5-5;
- ofname = (char *) malloc (strlen(ifname) + 16);
+#ifdef WIN32
+ dw = GetTempPath(BUFSIZ, tempdir);
+ if( dw > BUFSIZ || dw == 0 )
+ return 2;
+#else
+ tempdir = "/var/tmp";
+#endif
+ ofname = (char *) malloc (strlen(ifname) + strlen(tempdir)+ 16);
merror (ofname, "main()");
if (write_to_stdout)
strcpy (ofname,_("standard output"));
else {
- strcpy (ofname, ifname);
+ strcpy (ofname, tempdir);
+ strcat (ofname, ifname);
if ((cp = strrchr (ofname, '.'))) *cp = 0;
if (thumbnail_only)
strcat (ofname, ".thumb");
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-02 22:35:27 UTC (rev 295)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-05 22:20:13 UTC (rev 296)
@@ -61,9 +61,20 @@
if( dcraw_( static_cast<int>( args.size( ) ), const_cast<char**>( &args[ 0 ] ) ) )
return il::image_type_ptr( );
-
+
+ pl::string tempdir;
+#ifdef WIN32
+ TCHAR wtempdir[ BUFSIZ ];
+ DWORD dw = GetTempPath(BUFSIZ, wtempdir);
+ if( dw > BUFSIZ || dw == 0 )
+ return il::image_type_ptr( );
+ tempdir = pl::to_string( wtempdir );
+#else
+ tempdir = "/var/tmp";
+#endif
+
pl::string pathname( path.begin( ), path.begin( ) + path.find_last_of( "." ) );
- pathname += ".tiff";
+ pathname = pl::string( tempdir ) + pathname + ".tiff";
typedef pl::discovery<query_traits> discovery;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-02 22:35:29
|
Revision: 295
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=295&view=rev
Author: glslang
Date: 2007-09-02 15:35:27 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
+ build script updates (dependencies should be ok now for umbrella frameworks). still some lib redundancies. remove conform since it may not be correct for float data. TBI
Modified Paths:
--------------
trunk/lib/extras/src/imf/mfn/mfn.cpp
trunk/unity.sh
Modified: trunk/lib/extras/src/imf/mfn/mfn.cpp
===================================================================
--- trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-02 15:23:18 UTC (rev 294)
+++ trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-09-02 22:35:27 UTC (rev 295)
@@ -89,7 +89,7 @@
#ifndef NDEBUG
MGlobal::displayInfo( "HDRFlow: plugin found ..." );
#endif
- im_ = il::conform( plug->load( pl::make_stream( pathname.asChar( ), std::ios::in ) ), il::flipped );
+ im_ = plug->load( pl::make_stream( pathname.asChar( ), std::ios::in ) );
if( im_ )
{
#ifndef NDEBUG
@@ -180,6 +180,9 @@
MFnPlugin plugin( obj, "com.cryogenicgraphics", "8.0", "Any" );
MStringArray extensions;
extensions.append( "hdr" );
+ extensions.append( "exr" );
+ extensions.append( "tiff" );
+ extensions.append( "tif" );
CHECK_MSTATUS( plugin.registerImageFile( "HDRFlow", hdrflow::extras::mfn::image_reader::creator, extensions ) );
pl::init( );
Modified: trunk/unity.sh
===================================================================
--- trunk/unity.sh 2007-09-02 15:23:18 UTC (rev 294)
+++ trunk/unity.sh 2007-09-02 22:35:27 UTC (rev 295)
@@ -367,6 +367,39 @@
done
}
+update_umbrella_framework_install_names( )
+{
+ install_name_tool -id $install_name_prefix/HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/$1 \
+ HDRFlow.framework/Versions/A/Frameworks/$1.framework/$1
+
+ libs=`ls HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/Libraries/*.dylib`
+ for i in $libs
+ do install_name_tool -id $install_name_prefix/HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/Libraries/`basename $i` $i
+ done
+
+ if [ $1 != "HDRFlowPlugin" ]
+ then libs=`ls HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/PlugIns/*.dylib`
+ for i in $libs
+ do install_name_tool -id $install_name_prefix/HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/PlugIns/`basename $i` $i
+ done
+
+ depnames="$install_name_prefix/HDRFlowPlugin.framework $install_name_prefix/HDRFlowImage.framework $install_name_prefix/HDRFlowMedia.framework"
+ for i in $libs
+ do for j in $depnames
+ do deps=`otool -L $i | grep $j | cut -d ' ' -f 1`
+ for k in $deps
+ do if [ `basename $k` != "HDRFlowPlugin" ] && [ `basename $k` != "HDRFlowImage" ] && [ `basename $k` != "HDRFlowMedia" ]
+ then install_name_tool -change $k \
+ $install_name_prefix/HDRFlow.framework/Versions/A/Frameworks/$1.framework/Versions/A/Libraries/`basename $k` $i
+ else install_name_tool -change $k \
+ $install_name_prefix/HDRFlow.framework/Versions/A/Frameworks/`basename $k`.framework/Versions/A/`basename $k` $i
+ fi
+ done
+ done
+ done
+ fi
+}
+
make_umbrella_framework( )
{
rm -rf "./HDRFlow.framework"
@@ -384,7 +417,6 @@
make_umbrella_framework_deps "HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/HDRFlowPlugin.so" &&
make_umbrella_framework_deps "HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/HDRFlowImage.so" &&
make_umbrella_framework_deps "HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/HDRFlowMedia.so"
- check_status $?
deplist="GLEW boost"
for i in $deplist
@@ -410,6 +442,10 @@
done
done
+ update_umbrella_framework_install_names "HDRFlowPlugin"
+ update_umbrella_framework_install_names "HDRFlowImage"
+ update_umbrella_framework_install_names "HDRFlowMedia"
+
make_umbrella_framework_python_deps "HDRFlowPlugin" "HDRFlow.framework/Frameworks/HDRFlowPlugin.framework/PlugIns/HDRFlowPlugin.so"
make_umbrella_framework_python_deps "HDRFlowImage" "HDRFlow.framework/Frameworks/HDRFlowImage.framework/PlugIns/HDRFlowImage.so"
make_umbrella_framework_python_deps "HDRFlowMedia" "HDRFlow.framework/Frameworks/HDRFlowMedia.framework/PlugIns/HDRFlowMedia.so"
@@ -434,7 +470,8 @@
cp -R /usr/local/include/boost-$boost_new_version/boost HDRFlow.framework/Versions/$framework_version/Frameworks/HDRFlowPlugin.framework/Headers
cp -R /usr/local/include/GL/glew.h HDRFlow.framework/Versions/$framework_version/Frameworks/HDRFlowPlugin.framework/Headers
header_prefix="HDRFlow.framework/Versions/$framework_version/Frameworks/HDRFlowPlugin.framework/Headers/boost"
- find $header_prefix -name '*.hpp' | xargs sed -e "s|boost/|HDRFlowPlugin/boost/|g" -i ''
+ find $header_prefix -name '*.hpp' | xargs sed -e "s|boost/|HDRFlowPlugin/boost/|g" -i ''
+ check_status $?
}
make_extras_framework( )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-02 15:39:07
|
Revision: 294
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=294&view=rev
Author: glslang
Date: 2007-09-02 08:23:18 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
+ conversion from r32g32b32f to r32g32b32a32f (needs generalisation)
Modified Paths:
--------------
trunk/lib/openlibraries/src/openimagelib/il/utility.cpp
Modified: trunk/lib/openlibraries/src/openimagelib/il/utility.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/il/utility.cpp 2007-09-01 21:50:34 UTC (rev 293)
+++ trunk/lib/openlibraries/src/openimagelib/il/utility.cpp 2007-09-02 15:23:18 UTC (rev 294)
@@ -1640,6 +1640,43 @@
return dst_img;
}
+static image_type_ptr r32g32b32f_to_r32g32b32a32f( image_type_ptr src_img, const std::wstring &format )
+{
+ size_type width = src_img->width( );
+ size_type height = src_img->height( );
+
+ image_type_ptr dst_img = allocate( src_img, format );
+ if( dst_img != 0 )
+ {
+ const float* src = ( const float* ) src_img->data( );
+ size_type src_pitch = src_img->pitch( );
+ float* dst = ( float* ) dst_img->data( );
+ size_type dst_pitch = dst_img->pitch( );
+
+ const float* sptr = src;
+ float* dptr = dst;
+
+ size_type orig_width = width;
+
+ while( height-- )
+ {
+ while( width-- )
+ {
+ *dst++ = *src++;
+ *dst++ = *src++;
+ *dst++ = *src++;
+ *dst++ = 1.0f;
+ }
+
+ dst = dptr += dst_pitch;
+ src = sptr += src_pitch;
+ width = orig_width;
+ }
+ }
+
+ return dst_img;
+}
+
inline bool is_rgb_packed( const std::wstring &pf )
{
return pf == L"a8b8g8r8" || pf == L"a8r8g8b8" || pf == L"b8g8r8" || pf == L"b8g8r8a8" || pf == L"r8g8b8" || pf == L"r8g8b8a8";
@@ -1917,6 +1954,8 @@
return r32g32b32f_to_b8g8r8a8( src, L"b8g8r8a8" );
else if( dst_pf == L"rgbe" )
return r32g32b32f_to_rgbe( src, L"rgbe" );
+ else if( dst_pf == L"r32g32b32a32f" )
+ return r32g32b32f_to_r32g32b32a32f( src, L"r32g32b32a32f" );
}
else if( src_pf == L"rgbe" )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 21:50:39
|
Revision: 293
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=293&view=rev
Author: glslang
Date: 2007-09-01 14:50:34 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+build fixes
Modified Paths:
--------------
trunk/lib/openlibraries/configure.ac
trunk/lib/openlibraries/m4/openimagelib.m4
trunk/lib/openlibraries/src/openimagelib/plugins/tiff/Makefile.am
Added Paths:
-----------
trunk/lib/openlibraries/m4/tiff.m4
Modified: trunk/lib/openlibraries/configure.ac
===================================================================
--- trunk/lib/openlibraries/configure.ac 2007-09-01 20:57:47 UTC (rev 292)
+++ trunk/lib/openlibraries/configure.ac 2007-09-01 21:50:34 UTC (rev 293)
@@ -155,6 +155,7 @@
AC_SUBST(XML2_LIBS)
AC_CHECK_OPENIMAGELIB( )
+AC_CHECK_TIFF( )
AC_CHECK_QUICKTIME( )
Modified: trunk/lib/openlibraries/m4/openimagelib.m4
===================================================================
--- trunk/lib/openlibraries/m4/openimagelib.m4 2007-09-01 20:57:47 UTC (rev 292)
+++ trunk/lib/openlibraries/m4/openimagelib.m4 2007-09-01 21:50:34 UTC (rev 293)
@@ -36,13 +36,6 @@
AC_MSG_RESULT([*** JPEG support is not available ***]))
AM_CONDITIONAL(HAVE_LIBJPEG, test x"$have_libjpeg" = "xyes")
AC_SUBST(JPEG_LIBS)
-
- dnl libtiff support
- AC_CHECK_LIB(tiff, TIFFOpen,
- have_libtiff=yes TIFF_LIBS="-ltiff",
- AC_MSG_RESULT([*** TIFF support is not available ***]))
- AM_CONDITIONAL(HAVE_LIBTIFF, test x"$have_libtiff" = "xyes")
- AC_SUBST(TIFF_LIBS)
fi
AM_CONDITIONAL(HAVE_OPENIMAGELIB, test x"$ac_use_openimagelib" = "xyes")
Added: trunk/lib/openlibraries/m4/tiff.m4
===================================================================
--- trunk/lib/openlibraries/m4/tiff.m4 (rev 0)
+++ trunk/lib/openlibraries/m4/tiff.m4 2007-09-01 21:50:34 UTC (rev 293)
@@ -0,0 +1,47 @@
+
+#
+#
+#
+
+AC_DEFUN([AC_CHECK_TIFF],[
+ AC_ARG_WITH(tiffprefix, AC_HELP_STRING([--with-tiffprefix], [TIFF installation prefix directory]),,
+ with_tiffprefix="")
+
+ TIFF_PREFIX="$with_tiffprefix"
+ TIFF_INCLUDE_PATH=""
+ TIFF_LIB_PATH=""
+ TIFF_LIBS=""
+
+ AS_IF([test "x$with_tiffprefix" != "x" ],
+ [ AC_MSG_WARN([*** TIFF prefix is user defined. Current value is $with_tiffprefix. ***])
+ TIFF_INCLUDE="$with_tiffprefix/include/"
+ TIFF_INCLUDE_PATH="-I$TIFF_INCLUDE"
+ TIFF_LIB_PATH="-L$with_tiffprefix/$OL_LIBNAME"],
+ AC_MSG_RESULT([*** TIFF prefix is not defined. Will use system defaults. ***]))
+
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$TIFF_LIB_PATH $save_LDFLAGS"
+
+ AC_CHECK_LIB(TIFF, TIFFOpen,
+ [AC_CHECK_HEADER(${TIFF_INCLUDE}/tiffio.h,
+ [ac_have_tiff="yes" TIFF_LIBS="-ltiff" AC_DEFINE(HAVE_TIFF_H, 1,[Define this if you have TIFF support])],
+ [AC_MSG_ERROR([*** TIFF support is not available. Please install libtiff to proceed. ***])])]
+
+ LDFLAGS="$save_LDFLAGS", [AC_MSG_ERROR([*** TIFF support is not available. Please install libtiff to proceed. ***])],[])
+
+ if test x$ac_have_tiff = "xyes"; then
+ ac_use_tiff=yes
+ fi
+
+ AC_SUBST(TIFF_PREFIX)
+ AC_SUBST(TIFF_INCLUDE_PATH)
+ AC_SUBST(TIFF_LIB_PATH)
+ AC_SUBST(TIFF_LIBS)
+ AM_CONDITIONAL(HAVE_LIBTIFF, test x"$ac_use_tiff" = "xyes")
+
+ if test x$ac_use_tiff = "xyes"; then
+ ifelse([$1], , :, [$1])
+ else
+ ifelse([$2], , :, [$2])
+ fi
+])
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tiff/Makefile.am
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tiff/Makefile.am 2007-09-01 20:57:47 UTC (rev 292)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tiff/Makefile.am 2007-09-01 21:50:34 UTC (rev 293)
@@ -15,6 +15,7 @@
libopenimagelib_tiff_la_CXXFLAGS = \
$(OLIB_CXXFLAGS) \
$(BOOST_INCLUDE_PATH) \
+ $(TIFF_INCLUDE_PATH) \
-DIL_EXPORTS
libopenimagelib_tiff_la_LIBADD = \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 20:57:52
|
Revision: 292
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=292&view=rev
Author: glslang
Date: 2007-09-01 13:57:47 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+ deps package update
Modified Paths:
--------------
trunk/HDRFlowDependencies.pmproj
Modified: trunk/HDRFlowDependencies.pmproj
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 20:44:25
|
Revision: 291
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=291&view=rev
Author: glslang
Date: 2007-09-01 13:44:20 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+ deps package update
Modified Paths:
--------------
trunk/HDRFlowDependencies.pmproj
Modified: trunk/HDRFlowDependencies.pmproj
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 20:24:08
|
Revision: 290
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=290&view=rev
Author: glslang
Date: 2007-09-01 13:24:03 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+ make the tiff loader float aware (still misses some encodings)
Modified Paths:
--------------
trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
Modified: trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp
===================================================================
--- trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-01 16:42:57 UTC (rev 289)
+++ trunk/lib/openlibraries/src/openimagelib/plugins/tiff/tiff_plugin.cpp 2007-09-01 20:24:03 UTC (rev 290)
@@ -6,7 +6,7 @@
// For more information, see http://www.openlibraries.org.
#include <vector>
-#include <string>
+#include <sstream>
#include <tiffio.h>
@@ -19,51 +19,67 @@
namespace
{
- il::image_type_ptr tiff_image_type_to_image_type( unsigned short components, int width, int height )
+ il::image_type_ptr tiff_image_type_to_image_type( unsigned short bpp, unsigned short components, int width, int height, bool is_float = false )
{
- if( components == 4 )
- return il::allocate( L"r8g8b8a8", width, height );
- else if( components == 3 )
- return il::allocate( L"r8g8b8", width, height );
+ std::wstringstream str;
+ if( components >= 3 )
+ {
+ str << L"r" << bpp << L"g" << bpp << L"b" << bpp;
+ if( components == 4 )
+ str << L"a" << bpp;
+ }
+
+ if( is_float ) str << L"f";
+
+ return il::allocate( str.str( ), width, height );
+ }
+ il::image_type_ptr tiff_null_image( TIFF* tif )
+ {
+ TIFFClose( tif );
return il::image_type_ptr( );
}
il::image_type_ptr load_tiff( pl::stream_ptr stream )
- {
- struct tiff* tif = TIFFOpen( stream->path( ).c_str( ), "r" );
+ {
+ TIFF* tif = TIFFOpen( stream->path( ).c_str( ), "r" );
if( tif == NULL )
return il::image_type_ptr( );
int width, height, depth;
- TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &width );
- TIFFGetField( tif, TIFFTAG_IMAGELENGTH, &height );
- if( !TIFFGetField( tif, TIFFTAG_IMAGEDEPTH, &depth ) ) depth = 1;
+ TIFFGetFieldDefaulted( tif, TIFFTAG_IMAGEWIDTH, &width );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_IMAGELENGTH, &height );
+ if( !TIFFGetFieldDefaulted( tif, TIFFTAG_IMAGEDEPTH, &depth ) ) depth = 1;
unsigned short config;
- TIFFGetField( tif, TIFFTAG_PLANARCONFIG, &config );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_PLANARCONFIG, &config );
if( config != PLANARCONFIG_CONTIG )
- {
- TIFFClose( tif );
- return il::image_type_ptr( );
- }
+ return tiff_null_image( tif );
- unsigned short photo;
- TIFFGetField( tif, TIFFTAG_PHOTOMETRIC, &photo );
+ unsigned short photo, compression, sample_format;
+ TIFFGetFieldDefaulted( tif, TIFFTAG_PHOTOMETRIC, &photo );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_SAMPLEFORMAT, &sample_format );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_COMPRESSION, &compression );
- if( config != PHOTOMETRIC_MINISBLACK && photo != PHOTOMETRIC_RGB )
+ bool is_float = false;
+ switch( photo )
{
- TIFFClose( tif );
- return il::image_type_ptr( );
+ case PHOTOMETRIC_RGB:
+ if( sample_format == SAMPLEFORMAT_IEEEFP )
+ is_float = true;
+ break;
+
+ default:
+ return tiff_null_image( tif );
}
-
+
unsigned short bpp, components;
- TIFFGetField( tif, TIFFTAG_BITSPERSAMPLE, &bpp );
- TIFFGetField( tif, TIFFTAG_SAMPLESPERPIXEL, &components );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_BITSPERSAMPLE, &bpp );
+ TIFFGetFieldDefaulted( tif, TIFFTAG_SAMPLESPERPIXEL, &components );
- il::image_type_ptr im = tiff_image_type_to_image_type( components, width, height );
+ il::image_type_ptr im = tiff_image_type_to_image_type( bpp, components, width, height, is_float );
if( !im )
return il::image_type_ptr( );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 16:43:00
|
Revision: 289
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=289&view=rev
Author: glslang
Date: 2007-09-01 09:42:57 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+ write 16-bit linear. ideally the parameters needs to be exposed at the app level. just trying some high-quality sensible defaults suitable for compositing
Modified Paths:
--------------
trunk/lib/extras/src/raw/raw.cpp
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-01 15:21:29 UTC (rev 288)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-01 16:42:57 UTC (rev 289)
@@ -49,11 +49,13 @@
il::image_type_ptr dcraw( pcos::property_container properties ) // TODO: change to ptr when pcos moves to proper copy semantics
{
+ pl::string linear_output = properties.get_property_with_key( pcos::key::from_string( "linear_output" ) ).value<pl::string>( );
pl::string tiff = properties.get_property_with_key( pcos::key::from_string( "tiff_output" ) ).value<pl::string>( );
pl::string path = properties.get_property_with_key( pcos::key::from_string( "path" ) ).value<pl::string>( );
std::vector<const char*> args;
args.push_back( "dcraw" );
+ args.push_back( linear_output.c_str( ) );
args.push_back( tiff.c_str( ) );
args.push_back( path.c_str( ) );
@@ -102,7 +104,7 @@
, half_size_( pcos::key::from_string( "half_size" ) )
, four_colour_interpolation_( pcos::key::from_string( "four_colour_interpolation" ) )
, which_raw_( pcos::key::from_string( "which_raw" ) )
- , sRGB_output_( pcos::key::from_string( "sRGB_output" ) )
+ , linear_output_( pcos::key::from_string( "linear_output" ) )
, tiff_output_( pcos::key::from_string( "tiff_output" ) )
, path_( pcos::key::from_string( "path" ) )
{
@@ -139,7 +141,7 @@
raw_props_.append( half_size_ );
raw_props_.append( four_colour_interpolation_ );
raw_props_.append( which_raw_ );
- raw_props_.append( sRGB_output_ );
+ raw_props_.append( linear_output_ = pl::string( "-4" ) );
raw_props_.append( tiff_output_ = pl::string( "-T" ) );
raw_props_.append( path_ = pl::string( "" ) );
}
@@ -164,7 +166,7 @@
pcos::property half_size_;
pcos::property four_colour_interpolation_;
pcos::property which_raw_;
- pcos::property sRGB_output_;
+ pcos::property linear_output_;
pcos::property tiff_output_;
pcos::property path_;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gl...@us...> - 2007-09-01 15:21:34
|
Revision: 288
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=288&view=rev
Author: glslang
Date: 2007-09-01 08:21:29 -0700 (Sat, 01 Sep 2007)
Log Message:
-----------
+ build fixes
Modified Paths:
--------------
trunk/lib/extras/src/raw/raw.cpp
Modified: trunk/lib/extras/src/raw/raw.cpp
===================================================================
--- trunk/lib/extras/src/raw/raw.cpp 2007-09-01 14:36:14 UTC (rev 287)
+++ trunk/lib/extras/src/raw/raw.cpp 2007-09-01 15:21:29 UTC (rev 288)
@@ -60,7 +60,7 @@
if( dcraw_( static_cast<int>( args.size( ) ), const_cast<char**>( &args[ 0 ] ) ) )
return il::image_type_ptr( );
- pl::string pathname( path.begin( ), path.find_last_of( "." ) );
+ pl::string pathname( path.begin( ), path.begin( ) + path.find_last_of( "." ) );
pathname += ".tiff";
typedef pl::discovery<query_traits> discovery;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|