os/graphics/graphicsresourceservices/graphicsresourceinterface/inc/sgconst.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Graphics Resource - constants
    15 //
    16 
    17 #ifndef SGCONST_H
    18 #define SGCONST_H
    19 
    20 #include <pixelformats.h>
    21 #include <sgresource/sgerror.h>
    22 
    23 /**
    24 The constants defined in TSgUsageBits correspond to the different usages for which 
    25 an image can be created.  They can be combined using the bitwise OR operator to 
    26 specify more than one usage.
    27 */
    28 enum TSgUsageBits
    29 	{
    30 	/** Usage as a VGImage with OpenVG via EGLImage.*/
    31 	ESgUsageBitOpenVgImage        = 0x0001,
    32 	/** Usage as a two-dimensional texture with OpenGL ES 1.x via EGLImage.*/
    33 	ESgUsageBitOpenGlesTexture2D  = 0x0002,
    34 	/** Usage as a two-dimensional texture with OpenGL ES 2.x via EGLImage.*/
    35 	ESgUsageBitOpenGles2Texture2D = 0x0004,
    36 	/** Usage as a target of an OpenVG rendering context.*/
    37 	ESgUsageBitOpenVgSurface      = 0x0010,
    38 	/** Usage as a target of an OpenGL ES 1.x rendering context.*/
    39 	ESgUsageBitOpenGlesSurface    = 0x0020,
    40 	/** Usage as a target of an OpenGL ES 2.x rendering context.*/
    41 	ESgUsageBitOpenGles2Surface   = 0x0040,
    42 	/** Usage as a target of an OpenGL rendering context.*/
    43 	ESgUsageBitOpenGlSurface      = 0x0080
    44 	};
    45 
    46 /**
    47 The subset of pixel formats defined in pixelformats.h which are guaranteed to be 
    48 supported by all implementations of the Graphics Resource API.
    49 */
    50 enum TSgPixelFormat
    51 	{
    52 	ESgPixelFormatARGB_8888_PRE = EUidPixelFormatARGB_8888_PRE,
    53 	ESgPixelFormatARGB_8888     = EUidPixelFormatARGB_8888,
    54 	ESgPixelFormatXRGB_8888     = EUidPixelFormatXRGB_8888,
    55 	ESgPixelFormatRGB_565       = EUidPixelFormatRGB_565,
    56 	ESgPixelFormatA_8           = EUidPixelFormatA_8
    57 	};
    58 
    59 #endif // SGCONST_H