egl/sfegltest/inc/eglrendering.h
branchbug235_bringup_0
changeset 210 da03feddbab7
parent 193 bbf967b65d9e
child 211 3804ba25b23f
equal deleted inserted replaced
208:7df094ed4a3f 210:da03feddbab7
    13 // Description:
    13 // Description:
    14 
    14 
    15 #ifndef __EGLRENDERING_H__
    15 #ifndef __EGLRENDERING_H__
    16 #define __EGLRENDERING_H__
    16 #define __EGLRENDERING_H__
    17 
    17 
    18 
       
    19 #include <e32base.h>
    18 #include <e32base.h>
    20 #include <w32std.h>
    19 #include <w32std.h>
    21 #include <EGL/egl.h>
    20 #include <EGL/egl.h>
    22 #include <VG/openvg.h>
    21 #include <VG/openvg.h>
    23 #include <VG/vgu.h>
       
    24 
    22 
    25 class CEGLRendering : public CBase
    23 class CEGLRendering : public CBase
    26 	{
    24 	{
    27 public:
    25 public:
    28 	static CEGLRendering* NewL(RWindow& aWindow, TBool);
    26 	static CEGLRendering* NewL(RWindow& aWindow);
    29 	static CEGLRendering* NewLC(RWindow& aWindow,TBool);
       
    30 
       
    31 	~CEGLRendering();
    27 	~CEGLRendering();
    32 
    28 
    33 	void Start();
    29 	void Start();
    34 	void Stop();
    30 	void Stop();
    35 	
    31 
    36 	static void EGLCheckError();
       
    37 	static void EGLCheckReturnError(EGLBoolean aBool);
       
    38 	static void VGCheckError();
       
    39 	void UpdateDisplay();
    32 	void UpdateDisplay();
    40 	static TInt TimerCallBack(TAny* aDemo);
    33 	static TInt TimerCallBack(TAny* aDemo);
    41 	
    34 
    42 private:
    35 private:
    43 	CEGLRendering(RWindow& aWindow);
    36 	CEGLRendering(RWindow& aWindow);
    44 	void ConstructL(TBool);	
    37 	void ConstructL();
       
    38 
       
    39     static void EGLCheckError();
       
    40     static void EGLCheckReturnError(EGLBoolean aBool);
       
    41     static void VGCheckError();
       
    42     
       
    43     void EglSetupL();
       
    44     void VgSetup();
       
    45     void VgPaint();
    45 	
    46 	
    46 private:
    47 private:
    47 	RWindow& iWindow;
    48 	RWindow& iWindow;
    48 			
       
    49 	CPeriodic* iTimer;
    49 	CPeriodic* iTimer;
    50 	
    50 	CFbsBitmap* iBitmap;
    51 	CFbsBitmap* iBitmap;	
       
    52 	TInt iCount;
    51 	TInt iCount;
    53 
       
    54 	EGLDisplay iDisplay;
    52 	EGLDisplay iDisplay;
    55 	EGLSurface iSurface;
    53 	EGLSurface iSurface;
    56 	EGLContext iContextVG;
    54 	EGLContext iContext;
       
    55 	VGPaint iVGPaint;
       
    56 	VGPath iVGPath;
    57 	};
    57 	};
    58 
    58 
       
    59 #endif
    59 
    60 
    60 #endif