Ignore:
Timestamp:
02/20/06 19:06:03 (18 years ago)
Author:
mattausch
Message:

added ogre dependencies and patched ogre sources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OGRE/trunk/ogre_changes/RenderSystems/Direct3D7/src/OgreD3D7RenderWindow.cpp

    r153 r657  
    9696                break; 
    9797 
    98             case WM_MOVE: 
    99                 // Move messages need to be tracked to update the screen rects 
    100                 // used for blitting the backbuffer to the primary. 
    101                 if(win->mActive && win->mReady) 
    102                     win->windowMovedOrResized(); 
    103                 break; 
    104  
    10598            case WM_ENTERSIZEMOVE: 
    10699                // Prevent rendering while moving / sizing 
     
    113106                break; 
    114107 
     108            case WM_MOVE: 
    115109            case WM_SIZE: 
    116110                // Check to see if we are losing or gaining our window. Set the 
     
    391385    void D3D7RenderWindow::swapBuffers(bool waitForVSync) 
    392386    { 
     387                if (!mlpDDSFront) 
     388                        return; 
     389 
    393390        HRESULT hr; 
    394391        DWORD flags; 
     
    423420            { 
    424421                // Restore surfaces 
    425                 restoreDDSurfaces(); 
     422                //restoreDDSurfaces(); 
    426423            } 
    427424            else if (FAILED(hr)) 
     
    539536        ddscaps.dwCaps = DDSCAPS_ZBUFFER; 
    540537 
     538                if (!mlpDDSBack->IsLost()) 
     539                { 
    541540        LPDIRECTDRAWSURFACE7 zBufSurface; 
    542541 
     
    546545        zBufSurface->Release(); 
    547546        zBufSurface->Release(); 
     547                } 
    548548 
    549549        // Release std buffers 
     
    563563 
    564564            if( FAILED( hr ) ) 
     565                        { 
     566                                if (hr == DDERR_WRONGMODE) 
     567                                { 
     568                                        // Fullscreen exclusive mode problem 
     569                                        // Need to release & recreate 
     570                                        releaseDDSurfaces(); 
     571                                        createDDSurfaces(); 
     572                                        createDepthBuffer(); 
     573                                        return; 
     574                                } 
     575                                else 
     576                                { 
     577                                        char szBuffer[512]; 
     578                                        D3DXGetErrorString( hr, 512, szBuffer ); 
    565579                OGRE_EXCEPT(  
    566580                    Exception::ERR_INTERNAL_ERROR,  
    567                     "Error restoring lost primary surface.",  
     581                                                "Error restoring lost primary surface." + String(szBuffer),  
    568582                    "D3D7RenderWindow - restoreDDSurfaces" ); 
    569583        } 
     584                        } 
     585        } 
    570586 
    571587        if( mlpDDSBack->IsLost() ) 
     
    574590 
    575591            if( FAILED( hr ) ) 
     592                        { 
     593                                char szBuffer[512]; 
     594                                D3DXGetErrorString( hr, 512, szBuffer ); 
    576595                OGRE_EXCEPT(  
    577596                    Exception::ERR_INTERNAL_ERROR,  
    578                     "Error restoring lost back buffer surface.",  
     597                    "Error restoring lost back buffer surface." + String(szBuffer),  
    579598                    "D3D7RenderWindow - restoreDDSurfaces" ); 
    580599        } 
     600    } 
    581601    } 
    582602 
     
    592612        ClientToScreen( mHWnd, (POINT*)&rcCheck.left ); 
    593613        ClientToScreen( mHWnd, (POINT*)&rcCheck.right ); 
     614 
     615                if ((rcCheck.right - rcCheck.left) == 0 || 
     616                        (rcCheck.bottom - rcCheck.top) == 0) 
     617                { 
     618                        return; 
     619                } 
    594620 
    595621        // Has the window resized? If so, we need to recreate surfaces 
Note: See TracChangeset for help on using the changeset viewer.