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