Update contrib.
1 // Copyright (c) 2008-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
25 #include <graphics/sgerror.h>
33 Identifier of the primary screen, which always exists.
35 const TInt KSgScreenIdMain = 0;
43 Value that specifies, when passed in as screen identifier, that a resource can be
46 const TInt KSgScreenIdAny = -1;
54 Set of flags that specify how a graphics resource can be used in different rendering
59 /** The resource cannot be used in any rendering pipeline. */
61 /** The resource can be bound as source of DirectGDI rendering. */
62 ESgUsageDirectGdiSource = 0x0001,
63 /** The resource can be bound as target of DirectGDI rendering. */
64 ESgUsageDirectGdiTarget = 0x0002,
65 /** The resource can be bound as source of the composition engine. */
66 ESgUsageCompositionSource = 0x0004,
67 /** The resource can be bound as target of the composition engine. */
68 ESgUsageCompositionTarget = 0x0008,
69 /** The resource can be used directly as screen contents. */
70 ESgUsageScreenSource = 0x0010,
71 /** The resource can be bound as OpenGL ES 1.X 2D texture. */
72 ESgUsageOpenGlesTexture2D = 0x0020,
73 /** The resource can be bound as target of OpenGL ES 1.X rendering. */
74 ESgUsageOpenGlesTarget = 0x0040,
75 /** The resource can be bound as OpenVG image. */
76 ESgUsageOpenVgImage = 0x0080,
77 /** The resource can be bound as target of OpenVG rendering. */
78 ESgUsageOpenVgTarget = 0x0100,
79 /** The resource can be used as destination in calls to eglCopyBuffers(). */
80 ESgUsageEglCopyBuffersTarget = 0x0200,
81 /** The resource can be bound as OpenGL ES 2.0 2D texture. */
82 ESgUsageOpenGles2Texture2D = 0x0400,
83 /** The resource can be bound as target of OpenGL ES 2.0 rendering. */
84 ESgUsageOpenGles2Target = 0x0800,
85 /** The resource can be bound as source of window graphics context rendering. @see CWindowGc */
86 ESgUsageWindowGcSource = 0x1000
95 Components of TSgCpuAccess. This enumeration is not intended to be used directly, but
96 provides components for the definition of TSgCpuAccess.
98 enum TSgCpuAccessComponents
100 /** Value of the bit in TSgCpuAccess that indicates ability to read when set. */
101 ESgCpuAccessReadable = 1,
102 /** Value of the bit in TSgCpuAccess that indicates ability to write when set. */
103 ESgCpuAccessWritable = 2
112 Enumeration used to specify how a graphics resource can be accessed by the CPU.
116 /** The resource cannot be accessed by the CPU. */
117 ESgCpuAccessNone = 0,
118 /** The resource can only be read by the CPU. */
119 ESgCpuAccessReadOnly = ESgCpuAccessReadable,
120 /** The resource can only be written by the CPU. */
121 ESgCpuAccessWriteOnly = ESgCpuAccessWritable,
122 /** The resource can be both read and written by the CPU. */
123 ESgCpuAccessReadWrite = ESgCpuAccessReadable | ESgCpuAccessWritable