examples/Graphics/coverflow/inc/eglrendering.h

00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of the License "Symbian Foundation License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #ifndef __EGLRENDERING_H__
00017 #define __EGLRENDERING_H__
00018 
00019 
00020 class MEngine;
00021 
00022 #include "EGL/egl.h"
00023 #include "VG/openvg.h"
00024 #include "VG/vgu.h"
00025 
00026 
00027 #include "engine.h"
00028 #include "openvgengine.h"
00029 
00030 const TInt KMaxConfigs = 100;
00031 const TInt KTimerDelay = 10000;
00032 
00040 class CEGLRendering : public CBase 
00041     {
00042 public:
00043     static CEGLRendering* NewL(RWindow& aWindow);
00044     static CEGLRendering* NewLC(RWindow& aWindow);
00045 
00046     ~CEGLRendering();
00047 
00048     void Start();
00049     void Stop();
00050 
00051     static void EGLCheckError();
00052     static void EGLCheckReturnError(EGLBoolean aBool);
00053     static void VGCheckError();
00054 
00055     TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent);
00056 
00057     void UpdateDisplay();
00058     static TInt TimerCallBack(TAny* aDemo);
00059     
00060 
00061 
00062 private:
00063     CEGLRendering(RWindow& aWindow);
00064     void ConstructL();
00065 
00066 private:
00070     RWindow& iWindow;
00075     CPeriodic* iTimer;
00076     
00080     CFbsBitmap* iBitmap;
00084     EGLDisplay iDisplay;
00088     EGLSurface iSurface;
00092     EGLContext iContextVG;
00097     EGLConfig iConfig[KMaxConfigs];
00101     TUint32 iLastFrameTimeStamp;
00106     TInt iFastCounterFrequency;
00111     TBool iShowMirrorToggled;
00112     TBool iBusySwapping;
00113     
00114     COpenVGEngine* iCurrentDemo;
00115     };
00116 #endif

Generated by  doxygen 1.6.2