egl/sfegltest/inc/gles1cube.h
author Gareth Stockwell <gareth.stockwell@accenture.com>
Fri, 05 Nov 2010 17:31:20 +0000
branchbug235_bringup_0
changeset 215 097e92a68d68
permissions -rw-r--r--
Added GLES 1.x spinning cube-rendering code to eglbringuptest The coordinate, color and index data are uploaded to server-side buffers by the CGLES1Cube::KhrSetup function. CGLES1Cube::KhrPaint just sets the view matrix and issues a draw command. Which demo to display can be selected by passing its name on the command line, e.g. eglbringuptest vgline eglbringuptest gles1cube If no name is provided, the application defaults to vgline.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
215
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     1
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     2
// All rights reserved.
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     7
//
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     8
// Initial Contributors:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     9
// Accenture - initial contribution.
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    10
//
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    11
// Contributors:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    12
//
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    13
// Description:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    14
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    15
#ifndef __GLES1CUBE_H__
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    16
#define __GLES1CUBE_H__
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    17
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    18
#include "eglrendering.h"
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    19
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    20
class CGLES1Cube : public CEGLRendering
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    21
    {
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    22
public:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    23
    static CEGLRendering* NewL(RWindow& aWindow);
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    24
    ~CGLES1Cube();
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    25
    static const TDesC& Name();
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    26
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    27
private:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    28
    CGLES1Cube(RWindow& aWindow);
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    29
    void KhrSetup();
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    30
    void KhrPaint();
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    31
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    32
private:
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    33
    TReal iAngle;
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    34
    GLuint iCoordinateColorBuffer;
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    35
    GLuint iIndexBuffer;
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    36
    };
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    37
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    38
#endif
097e92a68d68 Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    39