Changeset 20926

Show
Ignore:
Timestamp:
11/18/07 04:02:22 (11 months ago)
Author:
patrick
Message:

MFT r20925: Cocoa OpenGL windows now update their input area size correctly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/vrjuggler/ChangeLog

    r20836 r20926  
    11DATE        AUTHOR      CHANGE 
    22----------- ----------- ------------------------------------------------------- 
     3Nov-18-2007 patrick     Cocoa OpenGL windows update their input area size 
     4                        correctly. 
    35Sep-19-2007 patrick     Added draw thread CPU affinity capabilities through the 
    46                        new environment variable VJ_DRAW_THREAD_AFFINITY. This 
  • juggler/branches/2.2/modules/vrjuggler/vrj/Draw/OGL/GlViewCocoa.mm

    r20904 r20926  
    133133      [self clearTrackingRect]; 
    134134//      NSRect bounds = [self bounds]; 
    135 //      mVrjWindow->updateOriginSize(bounds.origin.x, bounds.origin.y, 
    136 //                                   bounds.size.width, bounds.size.height); 
    137 //      mVrjWindow->setDirtyViewport(true); 
     135//      mVrjWindow->updateBounds(bounds.origin.x, bounds.origin.y, 
     136//                               bounds.size.width, bounds.size.height); 
    138137   } 
    139138*/ 
     
    503502 
    504503      NSRect bounds = [self bounds]; 
    505       mVrjWindow->updateOriginSize(bounds.origin.x, bounds.origin.y, 
    506                                    bounds.size.width, bounds.size.height); 
     504      mVrjWindow->updateBounds(bounds.origin.x, bounds.origin.y, 
     505                               bounds.size.width, bounds.size.height); 
    507506//      mVrjWindow->releaseRenderLock(); 
    508       mVrjWindow->setDirtyViewport(true); 
    509507   } 
    510508 
  • juggler/branches/2.2/modules/vrjuggler/vrj/Draw/OGL/GlWindowCocoa.h

    r19884 r20926  
    8383 
    8484   /** 
     85    * Updates the bounds of this window to be the given values. 
     86    * 
     87    * @see gadget::InputAreaCocoa::updateOriginAndSize() 
     88    * @see vrj::GlWindow::updateOriginSize() 
     89    * 
     90    * @since 2.2.1 
     91    */ 
     92   void updateBounds(const float x, const float y, const float width, 
     93                     const float height); 
     94 
     95   /** 
    8596    * Informs this object that the NSWindow object that we created previously 
    8697    * has been closed by an external entity and hence deallocated. By invoking 
  • juggler/branches/2.2/modules/vrjuggler/vrj/Draw/OGL/GlWindowCocoa.mm

    r20921 r20926  
    104104      // Inform our input area of the change in our bounds. 
    105105      NSRect b = [[aNotification object] frame]; 
    106       mWindow->updateOriginSize(b.origin.x, b.origin.y, b.size.width, 
    107                                 b.size.height); 
     106      mWindow->updateBounds(b.origin.x, b.origin.y, b.size.width, 
     107                            b.size.height); 
    108108   } 
    109109@end 
     
    401401} 
    402402 
     403void GlWindowCocoa::updateBounds(const float x, const float y, 
     404                                 const float width, const float height) 
     405{ 
     406   updateOriginAndSize(x, y, width, height);    // Input area update 
     407   updateOriginSize(x, y, width, height);       // Graphics window update 
     408   setDirtyViewport(true);                      // OpenGL viewport state 
     409} 
     410 
    403411void GlWindowCocoa::setWindowOpen(const bool isOpen) 
    404412{