examples/Graphics/coverflow/inc/eglrendering.h

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

Generated by  doxygen 1.6.2