Changeset 908

Show
Ignore:
Timestamp:
11/03/07 08:41:53 (1 year ago)
Author:
glslang
Message:

+ compilation fixes when using olibs svn

Location:
trunk/jahwidgets/src/qt3
Files:
16 modified

Legend:

Unmodified
Added
Removed
  • trunk/jahwidgets/src/qt3/python/python_vc80.vcproj

    r906 r908  
    55        Name="python" 
    66        ProjectGUID="{4DED2532-4DE3-4184-BCD4-C57D1BA0520B}" 
     7        RootNamespace="python" 
    78        Keyword="Win32Proj" 
    89        > 
     
    4142                                Name="VCCLCompilerTool" 
    4243                                Optimization="0" 
    43                                 AdditionalIncludeDirectories="$(QTDIR)\include;"C:\Boost\include\boost-1_33_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" 
    4546                                MinimalRebuild="true" 
    4647                                BasicRuntimeChecks="3" 
     
    5455                                Detect64BitPortabilityProblems="true" 
    5556                                DebugInformationFormat="4" 
     57                                DisableSpecificWarnings="4251;4503" 
    5658                        /> 
    5759                        <Tool 
     
    6668                        <Tool 
    6769                                Name="VCLinkerTool" 
    68                                 AdditionalDependencies="boost_python-vc80-mt-gd-1_34_1.lib qt-mt336.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" 
    7072                                LinkIncremental="2" 
    71                                 AdditionalLibraryDirectories="C:\Python24\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
     73                                AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
    7274                                GenerateDebugInformation="true" 
    7375                                ProgramDatabaseFile="$(OutDir)/python.pdb" 
     
    126128                        <Tool 
    127129                                Name="VCCLCompilerTool" 
    128                                 AdditionalIncludeDirectories="$(QTDIR)\include;&quot;C:\Boost\include\boost-1_33_1&quot;;C:\Python24\include;$(OPENLIBRARIES_INCLUDE_PATH);&quot;C:\Program Files\NVIDIA Corporation\Cg\include&quot;;..\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;&quot;C:\Boost\include\boost-1_34_1&quot;;C:\Python25\include;$(OPENLIBRARIES_INCLUDE_PATH);&quot;C:\Program Files\NVIDIA Corporation\Cg\include&quot;;..\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" 
    130132                                RuntimeLibrary="2" 
    131133                                BufferSecurityCheck="false" 
     
    137139                                Detect64BitPortabilityProblems="true" 
    138140                                DebugInformationFormat="3" 
     141                                DisableSpecificWarnings="4251;4503" 
    139142                        /> 
    140143                        <Tool 
     
    149152                        <Tool 
    150153                                Name="VCLinkerTool" 
    151                                 AdditionalDependencies="boost_python-vc80-mt-1_34_1.lib qt-mt336.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" 
    153156                                LinkIncremental="1" 
    154                                 AdditionalLibraryDirectories="C:\Python24\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
     157                                AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
    155158                                GenerateDebugInformation="false" 
    156159                                SubSystem="2" 
  • trunk/jahwidgets/src/qt3/themes/themes_vc80.vcproj

    r891 r908  
    55        Name="themes" 
    66        ProjectGUID="{1C40DB1D-AAC0-413B-B7C8-395EC2FCCED3}" 
     7        RootNamespace="themes" 
    78        Keyword="Win32Proj" 
    89        > 
     
    6667                        <Tool 
    6768                                Name="VCLinkerTool" 
    68                                 AdditionalDependencies="qt-mt336.lib" 
     69                                AdditionalDependencies="qt-mt338.lib" 
    6970                                OutputFile="$(OutDir)/themes.dll" 
    7071                                LinkIncremental="2" 
     
    149150                        <Tool 
    150151                                Name="VCLinkerTool" 
    151                                 AdditionalDependencies="qt-mt336.lib" 
     152                                AdditionalDependencies="qt-mt338.lib" 
    152153                                OutputFile="$(OutDir)/themes.dll" 
    153154                                LinkIncremental="1" 
  • trunk/jahwidgets/src/qt3/widgets/opengl_store.cpp

    r907 r908  
    195195                        { 
    196196                                // 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 ); 
    198200                                ml::image_type_ptr new_im; 
    199201 
     
    204206                                        media_->set_colour_matrix( false, 0 ); 
    205207 
    206                                 GLenum type = GL_UNSIGNED_BYTE; 
    207                          
    208208                                // Otherwise convert it 
    209                                 if( !glformat.first ) 
     209                                if( !internal_format ) 
    210210                                { 
    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 ) ) 
    215212                                        { 
    216213                                                new_im = il::convert( image_, L"yuv422" ); 
    217214                                         
    218                                                 glformat.first  = 3; 
    219                                                 glformat.second = GL_YCBCR_422_APPLE; 
     215                                                internal_format = 3; 
     216                                                format = GL_YCBCR_422_APPLE; 
    220217                                         
    221218                                                if( big_endian_ ) 
     
    229226                                                media_->set_shader( YUV444_TO_RGB ); 
    230227 
    231                                                 glformat.first  = 3; 
    232                                                 glformat.second = GL_RGB; 
     228                                                internal_format = 3; 
     229                                                format = GL_RGB; 
    233230                                        } 
    234231                                        else 
    235232                                        { 
    236233                                                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; 
    239236                                        } 
    240237 
     
    267264                                                new_im = il::convert( new_im, L"b8g8r8a8" ); 
    268265                                         
    269                                                 glformat.first  = 4; 
    270                                                 glformat.second = GL_BGRA_EXT; 
     266                                                internal_format  = 4; 
     267                                                format = GL_BGRA_EXT; 
    271268                                         
    272269                                                float* mat = get_channels( ); 
     
    314311                                                glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); 
    315312                                                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 ); 
    317314                                                media_->init_offscreen_buffer( phy_w, phy_h, env_GL_2_0_targets_ ); 
    318315                                                if ( media_->phy_tex_w( ) == 0 ) 
     
    327324                                        { 
    328325                                                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 ); 
    330327                                                media_->dirty( ) = false; 
    331328                                        } 
    332329 
    333330                                        media_->gl_type( ) = type; 
    334                                         media_->gl_format( ) = glformat; 
     331                                        media_->gl_format( ) = std::pair<GLint, GLenum>( internal_format, format ); 
    335332                                        media_->bpp( ) = get_bpp( new_im ); 
    336333                                        media_->tex_w( ) = tex_w; 
     
    397394                        // TODO: Correct for the interlaced case 
    398395                        // 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 ); 
    400399                        ml::image_type_ptr new_im; 
    401400 
    402                         GLenum type = GL_UNSIGNED_BYTE; 
    403  
    404401                        // Otherwise convert it 
    405                         if( !glformat.first ) 
     402                        if( !internal_format ) 
    406403                        { 
    407404                                if( opl::is_yuv_format( image_->pf( ) ) && image_->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) 
     
    409406                                        new_im = il::convert( image_, L"yuv422" ); 
    410407                                 
    411                                         glformat.first  = 3; 
    412                                         glformat.second = GL_YCBCR_422_APPLE; 
     408                                        internal_format = 3; 
     409                                        format = GL_YCBCR_422_APPLE; 
    413410 
    414411                                        if( big_endian_ ) 
     
    420417                                { 
    421418                                        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; 
    424421                                } 
    425422                        } 
     
    446443                        glWindowPos2f( off_x, owner_->height( ) - off_y - req_h ); 
    447444                        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( ) ); 
    449446                 
    450447                        glMatrixMode( GL_PROJECTION ); 
  • trunk/jahwidgets/src/qt3/widgets/player.cpp

    r907 r908  
    475475} 
    476476 
    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  
    495477void Player::media_geometry( MediaPtr media, int req_w, int req_h ) 
    496478{ 
     
    585567 
    586568                        // 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 ); 
    588572                        ml::image_type_ptr new_im; 
    589573 
     
    593577                        else 
    594578                                media->set_colour_matrix( false, 0 ); 
    595  
    596                         GLenum type = GL_UNSIGNED_BYTE; 
    597579                         
    598580                        // Otherwise convert it 
    599                         if( !glformat.first ) 
     581                        if( !internal_format ) 
    600582                        { 
    601583                                if( opl::is_yuv_format( image->pf( ) ) && image->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) 
     
    603585                                        new_im = il::convert( image, L"yuv422" ); 
    604586                                         
    605                                         glformat.first  = 3; 
    606                                         glformat.second = GL_YCBCR_422_APPLE; 
     587                                        internal_format = 3; 
     588                                        format = GL_YCBCR_422_APPLE; 
    607589                                         
    608590                                        if( big_endian_ ) 
     
    616598                                        media->set_shader( YUV444_TO_RGB ); 
    617599 
    618                                         glformat.first  = 3; 
    619                                         glformat.second = GL_RGB; 
     600                                        internal_format = 3; 
     601                                        format = GL_RGB; 
    620602                                } 
    621603                                else 
     
    623605                                        new_im = il::convert( image, L"b8g8r8a8" ); 
    624606                                         
    625                                         glformat.first  = 4; 
    626                                         glformat.second = GL_BGRA_EXT; 
     607                                        internal_format  = 4; 
     608                                        format = GL_BGRA_EXT; 
    627609                                } 
    628610                        } 
     
    653635                                        new_im = il::convert( new_im, L"b8g8r8a8" ); 
    654636                                         
    655                                         glformat.first  = 4; 
    656                                         glformat.second = GL_BGRA_EXT; 
     637                                        internal_format  = 4; 
     638                                        format = GL_BGRA_EXT; 
    657639                                         
    658640                                        float* mat = get_channels( ); 
     
    728710                                        glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); 
    729711                                        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 ); 
    731713                                        media->init_offscreen_buffer( phy_w, phy_h, env_GL_2_0_targets_ ); 
    732714                                        if ( media->phy_tex_w( ) == 0 ) 
     
    741723                                { 
    742724                                        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 ); 
    744726                                        media->dirty( ) = false; 
    745727                                } 
    746728 
    747729                                media->gl_type( ) = type; 
    748                                 media->gl_format( ) = glformat; 
     730                                media->gl_format( ) = std::pair<GLint, GLenum>( internal_format, format ); 
    749731                                media->bpp( ) = get_bpp( new_im ); 
    750732                                media->tex_w( ) = tex_w; 
     
    888870 
    889871                // 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 ); 
    891875                ml::image_type_ptr new_im; 
    892876 
    893                 GLenum type = GL_UNSIGNED_BYTE; 
    894  
    895877                // Otherwise convert it 
    896                 if( !glformat.first ) 
     878                if( !internal_format ) 
    897879                { 
    898880                        if( opl::is_yuv_format( image->pf( ) ) && image->field_order( ) == il::progressive && GLEW_APPLE_ycbcr_422 ) 
     
    900882                                new_im = il::convert( image, L"yuv422" ); 
    901883                                 
    902                                 glformat.first  = 3; 
    903                                 glformat.second = GL_YCBCR_422_APPLE; 
     884                                internal_format = 3; 
     885                                format = GL_YCBCR_422_APPLE; 
    904886 
    905887                                if( big_endian_ ) 
     
    912894                                new_im = il::convert( image, L"b8g8r8a8" ); 
    913895 
    914                                 glformat.first  = 4; 
    915                                 glformat.second = GL_BGRA_EXT; 
     896                                internal_format = 4; 
     897                                format = GL_BGRA_EXT; 
    916898                        } 
    917899                } 
     
    938920                glWindowPos2f( off_x, height( ) - off_y - req_h ); 
    939921                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( ) ); 
    941923                 
    942924                glMatrixMode( GL_PROJECTION ); 
  • trunk/jahwidgets/src/qt3/widgets/player.h

    r742 r908  
    124124        int get_bpp( ml::image_type_ptr image ); 
    125125        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 ); 
    127126        void paintImage( MediaPtr ); 
    128127        int deinterlace_mode( ); 
  • trunk/jahwidgets/src/qt3/widgets/scribbler.cpp

    r907 r908  
    142142        { 
    143143                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( fs::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 ); 
    146146                if ( image ) image = il::convert( image, pf_ ); 
    147147        } 
  • trunk/jahwidgets/src/qt3/widgets/widgets_vc80.vcproj

    r891 r908  
    55        Name="widgets" 
    66        ProjectGUID="{3E925FFE-47C0-42BB-BAFD-AA7E7E024312}" 
     7        RootNamespace="widgets" 
    78        Keyword="Win32Proj" 
    89        > 
     
    4142                                Name="VCCLCompilerTool" 
    4243                                Optimization="0" 
    43                                 AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;C:\Boost\include\boost-1_33_1&quot;;C:\Python24\include;&quot;$(OPENLIBRARIES_INCLUDE_PATH)&quot;;&quot;C:\Program Files\NVIDIA Corporation\Cg\include&quot;;..;.\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="&quot;$(QTDIR)\include&quot;;&quot;C:\Boost\include\boost-1_34_1&quot;;C:\Python25\include;&quot;$(OPENLIBRARIES_INCLUDE_PATH)&quot;;&quot;C:\Program Files\NVIDIA Corporation\Cg\include&quot;;..;.\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" 
    4546                                MinimalRebuild="true" 
    4647                                BasicRuntimeChecks="3" 
     
    5455                                Detect64BitPortabilityProblems="true" 
    5556                                DebugInformationFormat="4" 
    56                                 DisableSpecificWarnings="4251" 
     57                                DisableSpecificWarnings="4251;4503" 
    5758                        /> 
    5859                        <Tool 
     
    6768                        <Tool 
    6869                                Name="VCLinkerTool" 
    69                                 AdditionalDependencies="qt-mt336.lib opengl32.lib glu32.lib glew32.lib" 
     70                                AdditionalDependencies="qt-mt338.lib opengl32.lib glu32.lib glew32.lib" 
    7071                                OutputFile="$(OutDir)/widgets.dll" 
    7172                                LinkIncremental="2" 
    72                                 AdditionalLibraryDirectories="C:\Python24\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
     73                                AdditionalLibraryDirectories="C:\Python25\libs;C:\Boost\lib;$(QTDIR)\lib;$(OPENLIBRARIES_LIB_PATH)" 
    7374    &n