m3g/m3gcore11/src/m3g_symbian_gl.cpp
changeset 36 01a6848ebfd7
parent 0 5d03bc08d59c
equal deleted inserted replaced
0:5d03bc08d59c 36:01a6848ebfd7
    41     case EColor16M:
    41     case EColor16M:
    42         return M3G_RGB8;
    42         return M3G_RGB8;
    43     case EColor16MU:
    43     case EColor16MU:
    44         return M3G_BGR8_32;
    44         return M3G_BGR8_32;
    45     case EColor16MA:    
    45     case EColor16MA:    
       
    46     case EColor16MAP:    
    46         return M3G_BGRA8;
    47         return M3G_BGRA8;
    47     case ERgb:
    48     case ERgb:
    48         return M3G_RGB8_32;
    49         return M3G_RGB8_32;
    49     default:
    50     default:
    50         return M3G_NO_FORMAT;
    51         return M3G_NO_FORMAT;
    82 /*!
    83 /*!
    83  * \brief Queries properties of a native window
    84  * \brief Queries properties of a native window
    84  */
    85  */
    85 extern "C" M3Gbool m3gglGetNativeBitmapParams(M3GNativeBitmap bitmap,
    86 extern "C" M3Gbool m3gglGetNativeBitmapParams(M3GNativeBitmap bitmap,
    86                                               M3GPixelFormat *format,
    87                                               M3GPixelFormat *format,
    87                                               M3Gint *width, M3Gint *height)
    88                                               M3Gint *width, M3Gint *height, M3Gint *pixels)
    88 {
    89 {
    89     CFbsBitmap *pBitmap = (CFbsBitmap *) bitmap;
    90     CFbsBitmap *pBitmap = (CFbsBitmap *) bitmap;
    90 
    91 
    91     *format = m3gSymbianPixelFormat(pBitmap->DisplayMode());
    92     *format = m3gSymbianPixelFormat(pBitmap->DisplayMode());
    92     
    93     
    93     TSize size = pBitmap->SizeInPixels();
    94     TSize size = pBitmap->SizeInPixels();
    94     *width = size.iWidth;
    95     *width = size.iWidth;
    95     *height = size.iHeight;
    96     *height = size.iHeight;
       
    97     
       
    98     pBitmap->LockHeap();
       
    99     *pixels = (M3Gint) pBitmap->DataAddress();
       
   100     pBitmap->UnlockHeap();
    96     
   101     
    97     return M3G_TRUE;
   102     return M3G_TRUE;
    98 }
   103 }
    99 
   104 
   100 /*!
   105 /*!