Changeset 908
- Timestamp:
- 11/03/07 08:41:53 (1 year ago)
- Location:
- trunk/jahwidgets/src/qt3
- Files:
-
- 16 modified
-
python/python_vc80.vcproj (modified) (7 diffs)
-
themes/themes_vc80.vcproj (modified) (3 diffs)
-
widgets/opengl_store.cpp (modified) (10 diffs)
-
widgets/player.cpp (modified) (13 diffs)
-
widgets/player.h (modified) (1 diff)
-
widgets/scribbler.cpp (modified) (1 diff)
-
widgets/widgets_vc80.vcproj (modified) (7 diffs)
-
wrapper/property_adapter.hpp (modified) (1 diff)
-
wrapper/settings.cpp (modified) (2 diffs)
-
wrapper/settings.hpp (modified) (1 diff)
-
wrapper/splitter.cpp (modified) (2 diffs)
-
wrapper/splitter.hpp (modified) (1 diff)
-
wrapper/widget_handle.cpp (modified) (2 diffs)
-
wrapper/wrapper.cpp (modified) (2 diffs)
-
wrapper/wrapper.hpp (modified) (1 diff)
-
wrapper/wrapper_vc80.vcproj (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jahwidgets/src/qt3/python/python_vc80.vcproj
r906 r908 5 5 Name="python" 6 6 ProjectGUID="{4DED2532-4DE3-4184-BCD4-C57D1BA0520B}" 7 RootNamespace="python" 7 8 Keyword="Win32Proj" 8 9 > … … 41 42 Name="VCCLCompilerTool" 42 43 Optimization="0" 43 AdditionalIncludeDirectories="$(QTDIR)\include;"C:\Boost\include\boost-1_3 3_1";C:\Python24\include;$(OPENLIBRARIES_INCLUDE_PATH);"C:\Program Files\NVIDIA Corporation\Cg\include";..\wrapper;.."44 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H "44 AdditionalIncludeDirectories="$(QTDIR)\include;"C:\Boost\include\boost-1_34_1";C:\Python25\include;$(OPENLIBRARIES_INCLUDE_PATH);"C:\Program Files\NVIDIA Corporation\Cg\include";..\wrapper;.." 45 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H;HAVE_FLEX_STRING" 45 46 MinimalRebuild="true" 46 47 BasicRuntimeChecks="3" … … 54 55 Detect64BitPortabilityProblems="true" 55 56 DebugInformationFormat="4" 57 DisableSpecificWarnings="4251;4503" 56 58 /> 57 59 <Tool … … 66 68 <Tool 67 69 Name="VCLinkerTool" 68 AdditionalDependencies="boost_python-vc80-mt-gd-1_34_1.lib qt-mt33 6.lib qui.lib opengl32.lib glu32.lib glew32.lib"69 OutputFile="$(OutDir)/jahwidgets. dll"70 AdditionalDependencies="boost_python-vc80-mt-gd-1_34_1.lib qt-mt338.lib qui.lib opengl32.lib glu32.lib glew32.lib" 71 OutputFile="$(OutDir)/jahwidgets.pyd" 70 72 LinkIncremental="2" 71 AdditionalLibraryDirectories="C:\Python2 4\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)"73 AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 72 74 GenerateDebugInformation="true" 73 75 ProgramDatabaseFile="$(OutDir)/python.pdb" … … 126 128 <Tool 127 129 Name="VCCLCompilerTool" 128 AdditionalIncludeDirectories="$(QTDIR)\include;"C:\Boost\include\boost-1_3 3_1";C:\Python24\include;$(OPENLIBRARIES_INCLUDE_PATH);"C:\Program Files\NVIDIA Corporation\Cg\include";..\wrapper;.."129 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H "130 AdditionalIncludeDirectories="$(QTDIR)\include;"C:\Boost\include\boost-1_34_1";C:\Python25\include;$(OPENLIBRARIES_INCLUDE_PATH);"C:\Program Files\NVIDIA Corporation\Cg\include";..\wrapper;.." 131 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H;;HAVE_FLEX_STRING" 130 132 RuntimeLibrary="2" 131 133 BufferSecurityCheck="false" … … 137 139 Detect64BitPortabilityProblems="true" 138 140 DebugInformationFormat="3" 141 DisableSpecificWarnings="4251;4503" 139 142 /> 140 143 <Tool … … 149 152 <Tool 150 153 Name="VCLinkerTool" 151 AdditionalDependencies="boost_python-vc80-mt-1_34_1.lib qt-mt33 6.lib qui.lib opengl32.lib glu32.lib glew32.lib"152 OutputFile="$(OutDir)/jahwidgets. dll"154 AdditionalDependencies="boost_python-vc80-mt-1_34_1.lib qt-mt338.lib qui.lib opengl32.lib glu32.lib glew32.lib" 155 OutputFile="$(OutDir)/jahwidgets.pyd" 153 156 LinkIncremental="1" 154 AdditionalLibraryDirectories="C:\Python2 4\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)"157 AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 155 158 GenerateDebugInformation="false" 156 159 SubSystem="2" -
trunk/jahwidgets/src/qt3/themes/themes_vc80.vcproj
r891 r908 5 5 Name="themes" 6 6 ProjectGUID="{1C40DB1D-AAC0-413B-B7C8-395EC2FCCED3}" 7 RootNamespace="themes" 7 8 Keyword="Win32Proj" 8 9 > … … 66 67 <Tool 67 68 Name="VCLinkerTool" 68 AdditionalDependencies="qt-mt33 6.lib"69 AdditionalDependencies="qt-mt338.lib" 69 70 OutputFile="$(OutDir)/themes.dll" 70 71 LinkIncremental="2" … … 149 150 <Tool 150 151 Name="VCLinkerTool" 151 AdditionalDependencies="qt-mt33 6.lib"152 AdditionalDependencies="qt-mt338.lib" 152 153 OutputFile="$(OutDir)/themes.dll" 153 154 LinkIncremental="1" -
trunk/jahwidgets/src/qt3/widgets/opengl_store.cpp
r907 r908 195 195 { 196 196 // Determine if the image is supported by the gpu directly 197 std::pair<int, GLenum> glformat = pl::pf_to_gl_format( image_->pf( ) ); 197 GLint internal_format; 198 GLenum format, type; 199 pl::pf_to_gl_format( image_->pf( ), internal_format, format, type ); 198 200 ml::image_type_ptr new_im; 199 201 … … 204 206 media_->set_colour_matrix( false, 0 ); 205 207 206 GLenum type = GL_UNSIGNED_BYTE;207 208 208 // Otherwise convert it 209 if( ! glformat.first )209 if( !internal_format ) 210 210 { 211 if( GLEW_APPLE_ycbcr_422 && 212 // Force yuv420p etc 213 (/*(image_->pf() == L"yuv420p" || image_->pf() == L"yuv422p" || image_->pf() == L"yuv411p") ||*/ 214 (opl::is_yuv_format( image_->pf( ) ) && image_->field_order( ) == il::progressive)) ) 211 if( GLEW_APPLE_ycbcr_422 && ( opl::is_yuv_format( image_->pf( ) ) && image_->field_order( ) == il::progressive ) ) 215 212 { 216 213 new_im = il::convert( image_, L"yuv422" ); 217 214 218 glformat.first = 3;219 glformat.second= GL_YCBCR_422_APPLE;215 internal_format = 3; 216 format = GL_YCBCR_422_APPLE; 220 217 221 218 if( big_endian_ ) … … 229 226 media_->set_shader( YUV444_TO_RGB ); 230 227 231 glformat.first = 3;232 glformat.second= GL_RGB;228 internal_format = 3; 229 format = GL_RGB; 233 230 } 234 231 else 235 232 { 236 233 new_im = il::convert( image_, L"b8g8r8a8" ); 237 glformat.first = 4;238 glformat.second= GL_BGRA_EXT;234 internal_format = 4; 235 format = GL_BGRA_EXT; 239 236 } 240 237 … … 267 264 new_im = il::convert( new_im, L"b8g8r8a8" ); 268 265 269 glformat.first = 4;270 glformat.second= GL_BGRA_EXT;266 internal_format = 4; 267 format = GL_BGRA_EXT; 271 268 272 269 float* mat = get_channels( ); … … 314 311 glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); 315 312 glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); 316 glTexImage2D( target, 0, glformat.first, phy_w, phy_h, 0, glformat.second, type, data );313 glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, data ); 317 314 media_->init_offscreen_buffer( phy_w, phy_h, env_GL_2_0_targets_ ); 318 315 if ( media_->phy_tex_w( ) == 0 ) … … 327 324 { 328 325 unsigned char *data = new_im->data( ); 329 glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, glformat.second, type, data );326 glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, format, type, data ); 330 327 media_->dirty( ) = false; 331 328 } 332 329 333 330 media_->gl_type( ) = type; 334 media_->gl_format( ) = glformat;331 media_->gl_format( ) = std::pair<GLint, GLenum>( internal_format, format ); 335 332 media_->bpp( ) = get_bpp( new_im ); 336 333 media_->tex_w( ) = tex_w; … … 397 394 // TODO: Correct for the interlaced case 398 395 // Determine if the image is supported by the gpu directly 399 std::pair<int, GLenum> glformat = pl::pf_to_gl_format( image_->pf( ) ); 396 GLint internal_format; 397 GLenum format, type; 398 pl::pf_to_gl_format( image_->pf( ), internal_format, format, type ); 400 399 ml::image_type_ptr new_im; 401 400 402 GLenum type = GL_UNSIGNED_BYTE;403 404 401 // Otherwise convert it 405 if( ! glformat.first )402 if( !internal_format ) 406 403 { 407 404 if( opl::is_yuv_format( image_->pf( ) ) && image_->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) … … 409 406 new_im = il::convert( image_, L"yuv422" ); 410 407 411 glformat.first = 3;412 glformat.second= GL_YCBCR_422_APPLE;408 internal_format = 3; 409 format = GL_YCBCR_422_APPLE; 413 410 414 411 if( big_endian_ ) … … 420 417 { 421 418 new_im = il::convert( image_, L"b8g8r8a8" ); 422 glformat.first = 4;423 glformat.second= GL_BGRA_EXT;419 internal_format = 4; 420 format = GL_BGRA_EXT; 424 421 } 425 422 } … … 446 443 glWindowPos2f( off_x, owner_->height( ) - off_y - req_h ); 447 444 glPixelZoom( ( ( float )req_w / phy_w ), ( ( float )req_h / phy_h ) ); 448 glDrawPixels( phy_w, phy_h, glformat.second, type, new_im->data( ) );445 glDrawPixels( phy_w, phy_h, format, type, new_im->data( ) ); 449 446 450 447 glMatrixMode( GL_PROJECTION ); -
trunk/jahwidgets/src/qt3/widgets/player.cpp
r907 r908 475 475 } 476 476 477 bool Player::proxy_texture_target_test( GLuint id, GLenum target, GLenum internal_format, GLenum format, GLenum type, int width, int height )478 {479 GLenum proxy_target;480 if( pl::proxy_texture_target( width, height, proxy_target ) )481 {482 glBindTexture( target, id );483 glTexImage2D( proxy_target, 0, internal_format, width, height, 0, format, type, 0 );484 485 GLint w, h;486 glGetTexLevelParameteriv( proxy_target, 0, GL_TEXTURE_WIDTH, &w );487 glGetTexLevelParameteriv( proxy_target, 0, GL_TEXTURE_HEIGHT, &h );488 489 return w != 0 && h != 0;490 }491 492 return false;493 }494 495 477 void Player::media_geometry( MediaPtr media, int req_w, int req_h ) 496 478 { … … 585 567 586 568 // Determine if the image is supported by the gpu directly 587 std::pair<int, GLenum> glformat = pl::pf_to_gl_format( image->pf( ).c_str( ) ); 569 GLint internal_format; 570 GLenum format, type; 571 pl::pf_to_gl_format( image->pf( ), internal_format, format, type ); 588 572 ml::image_type_ptr new_im; 589 573 … … 593 577 else 594 578 media->set_colour_matrix( false, 0 ); 595 596 GLenum type = GL_UNSIGNED_BYTE;597 579 598 580 // Otherwise convert it 599 if( ! glformat.first )581 if( !internal_format ) 600 582 { 601 583 if( opl::is_yuv_format( image->pf( ) ) && image->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) … … 603 585 new_im = il::convert( image, L"yuv422" ); 604 586 605 glformat.first = 3;606 glformat.second= GL_YCBCR_422_APPLE;587 internal_format = 3; 588 format = GL_YCBCR_422_APPLE; 607 589 608 590 if( big_endian_ ) … … 616 598 media->set_shader( YUV444_TO_RGB ); 617 599 618 glformat.first = 3;619 glformat.second= GL_RGB;600 internal_format = 3; 601 format = GL_RGB; 620 602 } 621 603 else … … 623 605 new_im = il::convert( image, L"b8g8r8a8" ); 624 606 625 glformat.first = 4;626 glformat.second= GL_BGRA_EXT;607 internal_format = 4; 608 format = GL_BGRA_EXT; 627 609 } 628 610 } … … 653 635 new_im = il::convert( new_im, L"b8g8r8a8" ); 654 636 655 glformat.first = 4;656 glformat.second= GL_BGRA_EXT;637 internal_format = 4; 638 format = GL_BGRA_EXT; 657 639 658 640 float* mat = get_channels( ); … … 728 710 glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); 729 711 glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); 730 glTexImage2D( target, 0, glformat.first, phy_w, phy_h, 0, glformat.second, type, data );712 glTexImage2D( target, 0, internal_format, phy_w, phy_h, 0, format, type, data ); 731 713 media->init_offscreen_buffer( phy_w, phy_h, env_GL_2_0_targets_ ); 732 714 if ( media->phy_tex_w( ) == 0 ) … … 741 723 { 742 724 unsigned char *data = new_im->data( ); 743 glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, glformat.second, type, data );725 glTexSubImage2D( target, 0, 0, 0, phy_w, phy_h, format, type, data ); 744 726 media->dirty( ) = false; 745 727 } 746 728 747 729 media->gl_type( ) = type; 748 media->gl_format( ) = glformat;730 media->gl_format( ) = std::pair<GLint, GLenum>( internal_format, format ); 749 731 media->bpp( ) = get_bpp( new_im ); 750 732 media->tex_w( ) = tex_w; … … 888 870 889 871 // Determine if the image is supported by the gpu directly 890 std::pair<int, GLenum> glformat = pl::pf_to_gl_format( image->pf( ).c_str( ) ); 872 GLint internal_format; 873 GLenum format, type; 874 pl::pf_to_gl_format( image->pf( ), internal_format, format, type ); 891 875 ml::image_type_ptr new_im; 892 876 893 GLenum type = GL_UNSIGNED_BYTE;894 895 877 // Otherwise convert it 896 if( ! glformat.first )878 if( !internal_format ) 897 879 { 898 880 if( opl::is_yuv_format( image->pf( ) ) && image->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) … … 900 882 new_im = il::convert( image, L"yuv422" ); 901 883 902 glformat.first = 3;903 glformat.second= GL_YCBCR_422_APPLE;884 internal_format = 3; 885 format = GL_YCBCR_422_APPLE; 904 886 905 887 if( big_endian_ ) … … 912 894 new_im = il::convert( image, L"b8g8r8a8" ); 913 895 914 glformat.first = 4;915 glformat.second= GL_BGRA_EXT;896 internal_format = 4; 897 format = GL_BGRA_EXT; 916 898 } 917 899 } … … 938 920 glWindowPos2f( off_x, height( ) - off_y - req_h ); 939 921 glPixelZoom( ( ( float )req_w / phy_w ), ( ( float )req_h / phy_h ) ); 940 glDrawPixels( phy_w, phy_h, glformat.second, type, new_im->data( ) );922 glDrawPixels( phy_w, phy_h, format, type, new_im->data( ) ); 941 923 942 924 glMatrixMode( GL_PROJECTION ); -
trunk/jahwidgets/src/qt3/widgets/player.h
r742 r908 124 124 int get_bpp( ml::image_type_ptr image ); 125 125 ml::frame_type_ptr levels( ml::frame_type_ptr frame ); 126 bool proxy_texture_target_test( GLuint id, GLenum target, GLenum internal_format, GLenum format, GLenum type, int width, int height );127 126 void paintImage( MediaPtr ); 128 127 int deinterlace_mode( ); -
trunk/jahwidgets/src/qt3/widgets/scribbler.cpp
r907 r908 142 142 { 143 143 discovery::const_iterator it = plugins.begin( ); 144 boost::shared_ptr < il::openimagelib_plugin >plug = boost::shared_dynamic_cast<il::openimagelib_plugin>( it->create_plugin( "" ) );145 image = plug->load( f s::path( filename, fs::native ));144 il::openimagelib_plugin_ptr plug = boost::shared_dynamic_cast<il::openimagelib_plugin>( it->create_plugin( "" ) ); 145 image = plug->load( filename ); 146 146 if ( image ) image = il::convert( image, pf_ ); 147 147 } -
trunk/jahwidgets/src/qt3/widgets/widgets_vc80.vcproj
r891 r908 5 5 Name="widgets" 6 6 ProjectGUID="{3E925FFE-47C0-42BB-BAFD-AA7E7E024312}" 7 RootNamespace="widgets" 7 8 Keyword="Win32Proj" 8 9 > … … 41 42 Name="VCCLCompilerTool" 42 43 Optimization="0" 43 AdditionalIncludeDirectories=""$(QTDIR)\include";"C:\Boost\include\boost-1_3 3_1";C:\Python24\include;"$(OPENLIBRARIES_INCLUDE_PATH)";"C:\Program Files\NVIDIA Corporation\Cg\include";..;.\tmp\moc"44 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIDGETS_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H "44 AdditionalIncludeDirectories=""$(QTDIR)\include";"C:\Boost\include\boost-1_34_1";C:\Python25\include;"$(OPENLIBRARIES_INCLUDE_PATH)";"C:\Program Files\NVIDIA Corporation\Cg\include";..;.\tmp\moc" 45 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIDGETS_EXPORTS;HAVE_CG_RUNTIME;QT_THREAD_SUPPORT;_CRT_SECURE_NO_DEPRECATE;HAVE_GL_GLEW_H;HAVE_FLEX_STRING" 45 46 MinimalRebuild="true" 46 47 BasicRuntimeChecks="3" … … 54 55 Detect64BitPortabilityProblems="true" 55 56 DebugInformationFormat="4" 56 DisableSpecificWarnings="4251 "57 DisableSpecificWarnings="4251;4503" 57 58 /> 58 59 <Tool … … 67 68 <Tool 68 69 Name="VCLinkerTool" 69 AdditionalDependencies="qt-mt33 6.lib opengl32.lib glu32.lib glew32.lib"70 AdditionalDependencies="qt-mt338.lib opengl32.lib glu32.lib glew32.lib" 70 71 OutputFile="$(OutDir)/widgets.dll" 71 72 LinkIncremental="2" 72 AdditionalLibraryDirectories="C:\Python2 4\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)"73 AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 73 74 &n
