-------------------------------------------------------------------------------
                       Matrox Imaging Library (MIL) 10.0
                           Release Notes (mildisplay)
                                 December, 2013
            (c) Copyright Matrox Electronic Systems Ltd., 1992-2013.
-------------------------------------------------------------------------------

This document outlines what is new with MIL display.

It also presents last minute information that did not make it into the manual
or on-line help. Note that this text file serves to complement your manual. The 
information found in this file overrides your formally documented material.

-------------------------------------------------------------------------------

Main Table of Contents

Section 1: What's new in MIL 10.0 
Section 2: What's new in MIL 9.0 Processing Pack 2
Section 3: What's new in MIL 9.0 Update 16 
Section 4: What's new in MIL 9.0

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Section 1: What's new in MIL 10.0

Table of Contents for Section 1

1. New interactive behavior of MIL's default window.
  1.1 Panning and zooming.
  1.2 Image position.
  1.3 Window resize.
  1.4 Window background.
2. Allow interactions in user-defined windows.
3. Unified zoom factors and unified pan values.
4. Interactive graphic lists.
5. Bilinear interpolation support in Direct3D 9.
6. No-Tearing improvement with exclusive display in Direct3D 9.
7. Keyboard shortcut to show the update rate in the title bar.
8. Keyboard shortcut to show the zoom factors in the title bar.
9. Auxiliary displays are deprecated for all MIL systems except Matrox Vio.

-------------------------------------------------------------------------------
1. New interactive behavior of MIL's default window.

  To modernize MIL's default window, its default behavior has changed.

  1.1 Panning and zooming.
  
  For windowed and exclusive displays, it is now possible to use the mouse 
  wheel to zoom the image in or out; to do so, scroll the wheel up or down, 
  respectively. 

  In addition, it is possible to pan the image by clicking on the image and 
  dragging in the required direction. 
  
  By default, keyboard and mouse use are disabled when using
  a user-defined display (see "Allow interactions in user-defined windows" 
  below).
  
  Zoom buttons and scroll bars have been removed from the default window.

  1.2 Image position.

    In a MIL default window, the image is now centered by default.

  1.3 Window resize.

    The MIL default window is not resized anymore when changing the zoom 
    factors.

  1.4 Window background.

    The MIL default window now has a white background.

---
2. Allow interactions in user-defined windows

  It is now possible to activate mouse and keyboard interaction in a user-
  defined window (given in an argument in MdispSelectWindow). To activate mouse 
  and keyboard interaction, use:
  
  MdispControl(DisplayId, M_MOUSE_USE, M_ENABLE/M_DISABLE)
  MdispControl(DisplayId, M_KEYBOARD_USE, M_ENABLE/M_DISABLE)
  
  To simplify user interactions, MIL can sometimes change the cursor 
  (e.g. show an open hand when dragging (pan) is possible). It is highly 
  recommended to enable mouse cursor changes when enabling interactions in a 
  user-defined window.
  
  MdispControl(DisplayId, M_MOUSE_CURSOR_CHANGE, M_ENABLE/M_DISABLE)

---
3. Unified zoom factors and unified pan values.
  
  In previous MIL versions, window zoom factors (zoom buttons of a default MIL
  window) and display zoom factors (from MdispZoom()) were independent. This 
  was unified for MIL 10. MdispZoom(), interactive zoom with mouse or keyboard 
  and MdispControl(M_SCALE_DISPLAY) all modify the same values.

  Similar unification was made for pan values where MdispPan, 
  interactive pan and MdispControl(M_CENTER_DISPLAY) all modify the same
  values.
  
  These modifications might slightly change the behavior of a MIL application 
  written with previous versions of MIL. 
  
  Ex.: A MIL 9 application used to store the zoom factor in a variable and 
  changed its value when a button was clicked, and then called MdispZoom.
  
  [Good in MIL 9, Bad in MIL 10]
  m_ZoomFactor = m_ZoomFactor*2;
  MdispZoom(DisplayId, m_ZoomFactor, m_ZoomFactor);
  
  Since MIL's internal zoom and pan values may have been changed by another MIL 
  call or by user interaction, it is recommended to always inquire the current 
  pan and zoom values.
  
  [Good in MIL 10]
  MdispInquire(DisplayId, M_ZOOM_FACTOR_X, &ZoomFactorX);
  MdispInquire(DisplayId, M_ZOOM_FACTOR_X, &ZoomFactorY);
  MdispZoom(DisplayId, ZoomFactorX*2, ZoomFactorY*2);
  
---
4. Interactive graphic lists.

  It is now possible to interactively modify the graphics in the graphics list
  associated with the display. Modifications to the graphics in the list 
  include moving, resizing, and rotating. 

  The user interacts with the graphics using the mouse. Clicking on a graphic 
  selects it, which causes the graphic to be surrounded with a selection box. 
  The selection box has handles around it that can be dragged to resize, 
  rotate, or move the graphic. 

  The user can select multiple graphics by holding down the Ctrl key and 
  clicking on each graphic. 

        MdispControl(M_GRAPHIC_LIST_INTERACTIVE, M_ENABLE/M_DISABLE)

---
5. Bilinear interpolation support in Direct3D 9.

  MIL now supports bilinear interpolation mode on a display at rendering time.

  The bilinear interpolation mode is only supported in Direct3D 9; an error 
  will occur for all other DirectX versions or in standard mode.

  Bilinear interpolation mode is enabled with the M_INTERPOLATION_MODE display 
  control and the M_BILINEAR_RENDERING control value. For example:
   MdispControl(DisplayId, M_INTERPOLATION_MODE, M_BILINEAR_RENDERING);

---
6. No-Tearing improvement with exclusive display in Direct3D 9.

  When enabling no-tearing on an exclusive display, a special DirectX 9 
  feature is now used by MIL to eliminate the tearing effect on the display. 
  This improvement is only applied on exclusive display with the Direct3D 9 
  hardware acceleration.

---
7. Keyboard shortcut to show the update rate in the title bar.

  It is now possible to show/hide the current update rate of the display in the
  MIL default window title-bar: Ctrl-F/Ctrl-Shift-F

---
8. Keyboard shortcut to show the zoom factors in the title bar.

  In previous MIL versions, MIL's default window used to show the window zoom
  factor in its title-bar.
  
  Since zoom factors are now unified, the window zoom factor is not always an
  entire value and displaying such values in the title-bar is less useful. For 
  example: MdispZoom(Id, 0.625,0.625) or 
  MdispControl(Id, M_SCALE_DISPLAY, M_ENABLE)
  
  It is now possible to show/hide the zoom factor in the title bar (of MIL's 
  default window): Ctrl-o and Ctrl-Shift-o

---
9. Auxiliary displays are deprecated for all MIL systems except Matrox Vio.

  Auxiliary displays based on G-Series and P-series are no longer supported 
  and MdispAlloc(M_AUXILIARY) will fail on all MIL systems except Matrox Vio.
  
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Section 2: What's new in MIL 9.0 Processing Pack 2

Table of Contents for Section 2

1. Associate a graphic list to a MIL display object.
2. Highlight a buffer region.
3. Hook to mouse events.
4. MdispGetHookInfo function.
5. Overlay and calibration
6. New DisplayFormat for Exclusive display.
-------------------------------------------------------------------------------

1. Associate a graphic list to a MIL display object.

   It is now possible to associate a graphic list to a MIL display object.
   (See MgraAllocList documentation for more information concerning graphic 
   lists)

   MdispControl(DisplayID, M_ASSOCIATED_GRAPHIC_LIST, GraphicListID)
  
   It is also possible to set whether or not modifications applied to the 
   graphic-list associated to the display must be updated to the display. 
   (Enabled by default):

   MdispControl(DisplayID, M_UPDATE_GRAPHIC_LIST, M_ENABLE/M_DISABLE)



2. Highlight a buffer region.

   When a region has been defined in a buffer (see MbufSetRegion for details), 
   it is possible to highlight this region in the display.

   Available MdispControl types:
        
        - M_REGION_INSIDE_SHOW:  Sets if the inside of the region will be 
                            highlighted.
                                 Transparent by default.
                                 Values: M_TRANSPARENT/M_OPAQUE/M_DEFAULT. 
        
        - M_REGION_OUTSIDE_SHOW: Sets if the outside of the region will be 
                            highlighted.
                                 Transparent by default.
                                 Values: M_TRANSPARENT/M_OPAQUE/M_DEFAULT. 

        - M_REGION_INSIDE_COLOR: Sets the color used to highlight the inside of 
                            buffer region, when M_REGION_INSIDE_SHOW is set to 
                            M_OPAQUE. 
                                 (M_COLOR_GREEN by default)

        - M_REGION_OUTSIDE_COLOR:Sets the color used to highlight the outside of 
                            buffer region, when M_REGION_OUTSIDE_SHOW is set to 
                            M_OPAQUE.
                                 (M_COLOR_RED by default)



3. Hook to mouse events.

   There are five new MdispHookFunction HookTypes, all related to mouse events.
   
        - M_MOUSE_LEFT_BUTTON_DOWN
        - M_MOUSE_LEFT_BUTTON_UP
        - M_MOUSE_RIGHT_BUTTON_DOWN
        - M_MOUSE_RIGHT_BUTTON_UP
        - M_MOUSE_MOVE



4. MdispGetHookInfo function.

   A new function is documented in the display module to get information about 
   a hook event.

   Prototype: 
   MIL_INT MdispGetHookInfo(MIL_ID EventId, MIL_INT InfoType, void *UserVarPtr) 

   Info Types:
        - M_MOUSE_POSITION_X / M_MOUSE_POSITION_Y: Get the position of the mouse 
     cursor, in display coordinates.
                                                  
        - M_MOUSE_POSITION_BUFFER_X / M_MOUSE_POSITION_BUFFER_Y: Get the position of 
     the mouse cursor, in buffer coordinates.


5. Overlay and calibration

   The overlay buffer now automatically follows the calibration of the selected 
   buffer, when calibrated



6. New DisplayFormat for Exclusive display.

   Exclusive(M_EXCLUSIVE) displays can be set to the current desktop resolution 
   using M_CURRENT_RESOLUTION DisplayFormat in MdispAlloc.


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Section 3: What's new in MIL 9.0 Update 16 

Table of Contents for Section 3

1. Exclusive Displays

   1.1 Overview

   1.2 Allocation of an exclusive display
        1.2.1 Requirements
        1.2.2 InitFlag
        1.2.3 DispNum
        1.2.4 DispFormat

   1.3 Available MdispControl types
-------------------------------------------------------------------------------

        
1. Exclusive Displays

   1.1 Overview
   ------------

   Exclusive display is a new full-screen display type, designed to replace 
   legacy auxiliary displays.
   
   One of Windows® extended desktop monitors is exclusively dedicated to 
   display and MIL restricts mouse-cursor outside of the display limits.
   
   1.2 Allocation of an exclusive display
   --------------------------------------

   MIL_ID MdispAlloc(MIL_ID SystemId, MIL_INT DispNum, MIL_CONST_TEXT_PTR DispFormat, MIL_INT InitFlag, MIL_ID *DisplayIdPtr)
   
        1.2.1 Requirements
        ------------------
        It works on any graphic adapter and is compatible with all Video Hardware 
   Acceleration Modes. We suggest having two or more outputs currently used on 
   the desktop. Trying to allocate an exclusive display on the main monitor may 
   cause some disadvantages. Most third-party applications (which are designed 
   to start on the main monitor) would be hidden by the MIL exclusive display. 
   Note that Windows® taskbar would also be hidden since it is commonly located 
   on the main monitor.

        1.2.2 InitFlag
        --------------
        To allocate an exclusive display, use M_EXCLUSIVE as InitFlag.

        
        1.2.3 DispNum
        -------------
        The monitor to use can be specified with the DispNum Parameter. 
        
        - In all cases, M_DEFAULT will select the best available monitor.

        - For monitor arrangements up to 3x3 monitors, DispNum can be set to any 
     combination of the following:
        
                - M_LEFT
                - M_RIGHT
                - M_TOP
                - M_BOTTOM
                - M_CENTER
        

        1.2.3 DispFormat
        ----------------
        This parameter specifies the screen resolution.
        
        MIL_TEXT("M_DEFAULT") will get the default screen resolution from MILConfig 
   utility, in the "Default Values" page. 

        In the "Default Values" page, when Exclusive display type is chosen, a few 
   formats will be available. If M_DEFAULT is selected, the MIL Display Module 
   will use the current display resolution.

        User can also specify his own screen resolution according to the following 
   pattern "WidthxHeightxBitsperPixels@RefreshRate"
        Ex.: 1280x1024x32@60

   
   1.3 Available MdispControl types
   --------------------------------
   List of controls to modify the behavior of a M_EXCLUSIVE display

        
        - M_KEYBOARD_USE (M_ENABLE/M_DISABLE): Activates or not the use of keyboard 
                                          in the exclusive display. 
                                                                   Enabled by default.
                                                                   Replaces M_WINDOW_KEYBOARD_USE
        
        - M_RESTRICT_CURSOR (M_ENABLE/M_DISABLE): Restrict mouse cursor outside the 
                                             exclusive display.
                                                                           Enabled by default.
        
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Section 4: What's new in  MIL 9.0

Table of Contents for Section 4

1. Video Hardware Acceleration Modes
   1.1 DDraw7
   1.2 Direct3D 9
   1.3 Standard
   1.4 Default

2. New display features in MILConfig.
3. Change to MappAlloc
4. Lock/Unlock
5. Changes to No-Tearing displays.
6. Changes to Auxiliary displays.
7. Compatibility with Windows Vista Aero Glass mode.
8. Window annotations
9. Changes concerning buffer attributes
10. Matrox P-Series Display Drivers
11. Matrox G-Series Display Drivers.
12. Limitations
-------------------------------------------------------------------------------

1. Video Hardware Acceleration Modes
===============
MIL 9 Displays can run into different Video Hardware Acceleration Modes, all 
having pros and cons.

        1.1 DDraw7
        ------------
        - This is the implementation which was used in MIL 8.
        - Required if the application uses native DDraw calls.
        - If using a G-Series, especially for continuous grab.
        - Not compatible with Vista Aero Glass mode.
        - Not compatible with GPU system.

        1.2 Direct3D 9
        ----------------
        - Compatible with GPU System.
        - Compatible with Vista Aero Glass mode.
        - Required if the application uses native Direct3D calls.
        - Not compatible with drawings in window’ DC (see M_WINDOW_ANNOTATIONS 
     control for details)


        1.3 Standard
        --------------
        - Does not use any DirectX implementation. 
        - Compatible with Vista Aero Glass mode.
        - Not compatible with GPU systems.
        - Not compatible with auxiliary displays (except on Vio or Corona-II)
        - Cannot allocate M_DIRECTX or M_VIDEO_MEMORY buffers.
        - Cannot use native DDraw or Direct3D calls on MIL buffers.
        - No risk for display-drivers bugs
        - Compatible with drawings in window’ DC
        - Strongly recommended when using VNC or Remote Desktop, if frequently using 
     CTRL-ALT-DEL or using other applications using DirectX exclusive mode.

        1.4 Default
        -------------
        - MIL decides which implementation is the best.


2. New display features in MILConfig.
=======================================
        - Video Hardware Acceleration page now allow user to choose which Video 
     Hardware Acceleration Mode to use.

        - With DDraw 7 and Direct3D 9, a slider will appear, allowing the user to 
     change the Hardware Acceleration Level. 

        - Note that, when choosing Default, MIL will automatically choose which 
     implementation is the best. If MIL chooses a level where acceleration 
     level could be modified (7 or 9), it will consider the position if the 
     corresponding slider, even if it is not currently visible in MILConfig.


3. Change to MappAlloc
========================
        - User can specify on which implementation he wants to run in MappAlloc: 
     InitFlag + M_DX_VERSION(0/7/9)

        - If not specified, it corresponds to Default in MILConfig

4. Lock/Unlock
================
        - In DirectX it is not possible to allocate a buffer with a constant valid 
     logical or physical address. 

        - The address is valid while the buffer is locked and invalid after unlock. 

        - When lock/unlock mechanism is enabled, M_HOST_ADDRESS inquire will always 
     return NULL if user forgot to call MbufControl(.., M_LOCK,…) before and 
     M_UNLOCK when he’s finished with the address. 

5. Changes to No-Tearing displays.
====================================
        - No-tearing mechanism is supported with DDraw 7 and with DirectX 9. It is 
     not supported with Standard mode.

        - In DDraw 7, no-tearing is only available if Lock/Unlocks (see Item 4 
     above) are not active and if underlay surface is available. For those two 
     reasons, this would not work by default for non-Matrox adapters. An error 
     would advise the customer, explaining which changes are required in 
     MILConfig.
        
   - In DirectX 9, no-tearing is theorically available with all graphic 
     adapters but with certain restrictions, due to graphic hardware 
     limitations. MIL accesses video hardware through DirectX and is subject to 
     DirectX, display driver and hardware limitations. In some situations no-
     tearing cannot be done, without any warning. Smaller images tend produce 
     better result. Also note that no-tearing with DirectX 9 works most of the 
     time when MIL is running under Vista with Aero Glass Mode.
      
     Note that enabling no-tearing on one DirectX9 MIL display will enable it 
     for all displays.

6. Changes to auxiliary displays.
===================================
        - Auxiliary displays (except for Vio and Corona-II) is only supported in 
     DDraw7. 
        
        - Also note that, by default, hardware detection is disabled. It has to be 
     reenabled in MILConfig to be able to use auxiliary displays.

7. Compatibility with Windows Vista Aero Glass mode.
======================================================
        - DDraw7 is not compatible with Vista Aero Glass mode. Windows will 
     automatically switch the basic mode for the life of the MIL process. 

        - Standard mode and DirectX 9 are fully compatible with Aero.

8. Window annotations
========================
        - We call window annotations all the drawings (and text) done directly in 
     window device-context using GDI functions (Shown in MdispMFC Example)

        - [Non-MIL specific] Windows Vista Aero mode uses Desktop Window Manager to 
     update the desktop. Composition of all windows and images is done in an 
     offscreen surface, then blit to the display.

        - It is not possible to use Direct3D 9 for rendering and do window-
     annotations with GDI in the same window. For this reason, by default, MIL 
     does not use DirectX 9 calls to update the display-window, even when using 
     DirectX 9 implementation. The final update is done by GDI.

        - If the application does not involve any window-annotation, it is possible 
     to disable this feature and allow MIL to use DirectX 9 to update the 
     display window:
          MdispControl(DisplayID, M_WINDOW_ANNOTATIONS, M_DISABLE)

        - Important note: if the selected buffer is M_DIRECTX (or video-memory), 
     window annotations are considered disabled by default.


9. Changes concerning buffer attributes
=========================================
        - You cannot allocate a M_VIDEO_MEMORY and/or M_DIRECTX buffer in standard 
     mode.

        - In Direct3D 9, video-memory buffers are M_PAGED. You cannot allocate a 
     M_NON_PAGED + M_VIDEO_MEMORY buffer.

10. Matrox P-Series Display Drivers.
======================================
        - Matrox Graphics P-Series display drivers has been updated to 1.13.1.1
        
        - Silent installation won't install those drivers. Please contact 
          Matrox Imaging for more information.

        - If you've installed P650 or P750 display drivers obtained from the 
          Matrox Graphics website, please uninstall those drivers and Matrox 
          PowerDesk-HF before applying the Display Update.


11. Matrox G-Series Display Drivers.
======================================
        - Matrox Graphics G-Series display drivers has been updated to 5.99.005
        
        - Silent installation won't install those drivers. Please contact your 
          Matrox Imaging for more information.
          
  
12. Limitations
======================================
        - Matrox Graphics boards may have some compatibility issues with 
          third-party graphic adapters.