egl/sfegltest/inc/eglrendering.h
branchbug235_bringup_0
changeset 211 3804ba25b23f
parent 210 da03feddbab7
child 215 097e92a68d68
equal deleted inserted replaced
210:da03feddbab7 211:3804ba25b23f
    21 #include <VG/openvg.h>
    21 #include <VG/openvg.h>
    22 
    22 
    23 class CEGLRendering : public CBase
    23 class CEGLRendering : public CBase
    24 	{
    24 	{
    25 public:
    25 public:
    26 	static CEGLRendering* NewL(RWindow& aWindow);
       
    27 	~CEGLRendering();
    26 	~CEGLRendering();
    28 
    27 
    29 	void Start();
    28 	static TInt TimerCallBack(TAny* aDemo);
    30 	void Stop();
    29     void Redraw();
    31 
    30 
    32 	void UpdateDisplay();
    31 protected:
    33 	static TInt TimerCallBack(TAny* aDemo);
    32     CEGLRendering(RWindow& aWindow);
       
    33     void ConstructL();
    34 
    34 
    35 private:
    35 	void StartRedrawTimer();
    36 	CEGLRendering(RWindow& aWindow);
    36 	void StopRedrawTimer();
    37 	void ConstructL();
       
    38 
    37 
    39     static void EGLCheckError();
    38     static void EGLCheckError();
    40     static void EGLCheckReturnError(EGLBoolean aBool);
    39     static void EGLCheckReturnError(EGLBoolean aBool);
    41     static void VGCheckError();
    40     static void VGCheckError();
    42     
    41 
       
    42 private:
    43     void EglSetupL();
    43     void EglSetupL();
    44     void VgSetup();
    44     virtual void KhrSetup() = 0;
    45     void VgPaint();
    45     virtual void KhrPaint() = 0;
    46 	
    46     void EglSwapBuffers();
       
    47 
    47 private:
    48 private:
    48 	RWindow& iWindow;
    49 	RWindow& iWindow;
    49 	CPeriodic* iTimer;
    50 	CPeriodic* iRedrawTimer;
    50 	CFbsBitmap* iBitmap;
       
    51 	TInt iCount;
       
    52 	EGLDisplay iDisplay;
    51 	EGLDisplay iDisplay;
    53 	EGLSurface iSurface;
    52 	EGLSurface iSurface;
    54 	EGLContext iContext;
    53 	EGLContext iContext;
    55 	VGPaint iVGPaint;
       
    56 	VGPath iVGPath;
       
    57 	};
    54 	};
    58 
    55 
    59 #endif
    56 #endif
    60 
    57