graphicstest/uibench/s60/src/egldefs.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 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 //
       
    15 
       
    16 #ifndef EGLDEFS_H_
       
    17 #define EGLDEFS_H_
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <GLES/egl.h>
       
    21 
       
    22 /** Attributes for an EColor4K window. */
       
    23 const GLint	KColor4KAttribList[] =
       
    24 		{
       
    25 		EGL_BUFFER_SIZE,	12,
       
    26 		EGL_RED_SIZE,		4,
       
    27 		EGL_GREEN_SIZE,		4,
       
    28 		EGL_BLUE_SIZE,		4,
       
    29 		EGL_ALPHA_SIZE,		0,
       
    30 		EGL_DEPTH_SIZE,		16,
       
    31 		EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
       
    32 		EGL_RENDERABLE_TYPE,EGL_OPENGL_ES_BIT,
       
    33 		EGL_NONE
       
    34 		};
       
    35 
       
    36 /** Attributes for an EColor64K window. */
       
    37 const GLint	KColor64KAttribList[] =
       
    38 		{
       
    39 		EGL_BUFFER_SIZE,	16,
       
    40 		EGL_RED_SIZE,		5,
       
    41 		EGL_GREEN_SIZE,		6,
       
    42 		EGL_BLUE_SIZE,		5,
       
    43 		EGL_ALPHA_SIZE,		0,
       
    44 		EGL_DEPTH_SIZE,		16,
       
    45 		EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
       
    46 		EGL_RENDERABLE_TYPE,EGL_OPENGL_ES_BIT,
       
    47 		EGL_NONE
       
    48 		};
       
    49 
       
    50 /** Attributes for an EColor16M window. */
       
    51 const GLint	KColor16MAttribList[] =
       
    52 		{
       
    53 		EGL_BUFFER_SIZE,	24,
       
    54 		EGL_RED_SIZE,		8,
       
    55 		EGL_GREEN_SIZE,		8,
       
    56 		EGL_BLUE_SIZE,		8,
       
    57 		EGL_ALPHA_SIZE,		0,
       
    58 		EGL_DEPTH_SIZE,		16,
       
    59 		EGL_SURFACE_TYPE,	EGL_WINDOW_BIT,
       
    60 		EGL_RENDERABLE_TYPE,EGL_OPENGL_ES_BIT,
       
    61 		EGL_NONE
       
    62 		};
       
    63 
       
    64 /** Attributes for an EColor16MA window. */
       
    65 const GLint KColor16MAAttribList[] =
       
    66         {
       
    67         EGL_BUFFER_SIZE,    32,
       
    68         EGL_RED_SIZE,       8,
       
    69         EGL_GREEN_SIZE,     8,
       
    70         EGL_BLUE_SIZE,      8,
       
    71         EGL_ALPHA_SIZE,     8,
       
    72         EGL_DEPTH_SIZE,     16,
       
    73         EGL_SURFACE_TYPE,   EGL_WINDOW_BIT,
       
    74         EGL_RENDERABLE_TYPE,EGL_OPENGL_ES_BIT,
       
    75         EGL_NONE
       
    76         };
       
    77 
       
    78 /** 
       
    79  *  Values for the perspective matrix used by glFrustumf.
       
    80  *  Width is calculated based on the surface aspect ratio.
       
    81  */
       
    82 const GLfloat KFrustumHeight = 1.0f;
       
    83 const GLfloat KFrustumNear = 1.0f;
       
    84 const GLfloat KFrustumFar = 1000000.0f;
       
    85 
       
    86 /** Values to translate the model view. */
       
    87 const GLfloat KModelViewX = 0.0f;
       
    88 const GLfloat KModelViewY = 0.0f;
       
    89 const GLfloat KModelViewZ = -40.0f;
       
    90 
       
    91 #endif /* EGLDEFS_H_ */