|
1 // Copyright (c) 2007-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 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 #ifndef __T_PSEUDOAPPOPENGLANIMATION_H__ |
|
23 #define __T_PSEUDOAPPOPENGLANIMATION_H__ |
|
24 |
|
25 #include <GLES/gl.h> |
|
26 #include "t_pseudoappeglbase.h" |
|
27 |
|
28 /** |
|
29 * Creates an animation (making use of OpenGL API) of a rotating cube |
|
30 * which moves across the screen on X-axis |
|
31 */ |
|
32 class COpenGLAnimation : public CEglBase |
|
33 { |
|
34 public: |
|
35 static COpenGLAnimation* NewL(RWindow* aWin, const TDisplayMode& aMode, const TSize& aSurfaceSize, |
|
36 const TInt aHorizontalRate, |
|
37 const TInt aVerticalRate); |
|
38 ~COpenGLAnimation(); |
|
39 void DrawL(CTestSurfaceRasterizer* aSurfaceRasterizer, SurfaceDetails& aSurfDetails); |
|
40 |
|
41 protected: |
|
42 COpenGLAnimation(const TDisplayMode& aMode, const TSize& aSurfaceSize, const TInt aHorizontalRate, const TInt aVerticalRate); |
|
43 void DrawToEglL(); |
|
44 |
|
45 private: |
|
46 void ConstructL(RWindow* aWin); |
|
47 void CheckGlErrorL(const TDesC& aMessage); |
|
48 |
|
49 private: //Data |
|
50 GLfloat iRotAngle; |
|
51 }; |
|
52 |
|
53 #endif //__T_PSEUDOAPPOPENGLANIMATION_H__ |
|
54 |
|
55 |