/* <copyright>
This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
</copyright> */
g_renderStats = {};
g_renderStats.numDrawCalls = new stat("rendering", "numDrawCalls", 0, null, false);
g_renderStats.numTriangles = new stat("rendering", "numTriangles", 0, null, false);
g_renderStats.numVerts = new stat("rendering", "numVerts", 0, null, false);
g_renderStats.numPasses = new stat("rendering", "numPasses", 0, null, false);
g_renderStats.reset = function() {
g_renderStats.numTriangles.value = 0;
g_renderStats.numDrawCalls.value = 0;
g_renderStats.numVerts.value = 0;
g_renderStats.numPasses.value = 0;
};
rdgeConstants = {};
/*
* clear flags
*/
rdgeConstants.colorBuffer = 0x00004000;
rdgeConstants.depthBuffer = 0x00000100;
rdgeConstants.stencilBuffer = 0x00000400;
/*
* buffer types
*/
rdgeConstants.BUFFER_STATIC = 0;
rdgeConstants.BUFFER_DYNAMIC = 1;
rdgeConstants.BUFFER_STREAM = 2;
/*
* primitive types
*/
rdgeConstants.POINTS = 0;
rdgeConstants.LINES = 1;
rdgeConstants.LINE_LOOP = 2;
rdgeConstants.LINE_STRIP = 3;
rdgeConstants.TRIANGLES = 4;
rdgeConstants.TRIANGLE_STRIP = 5;
rdgeConstants.TRIANGLE_FAN = 6;
/*
* primitive data types
*/
rdgeConstants.BYTE = 0x1400;
rdgeConstants.UNSIGNED_BYTE = 0x1401;
rdgeConstants.SHORT = 0x1402;
rdgeConstants.UNSIGNED_SHORT = 0x1403;
rdgeConstants.INT = 0x1404;
rdgeConstants.UNSIGNED_INT = 0x1405;
rdgeConstants.FLOAT = 0x1406;
/*
* pre-defined vertex element type
*/
rdgeConstants.VS_ELEMENT_FLOAT4 = 4;
rdgeConstants.VS_ELEMENT_POS = 3;
rdgeConstants.VS_ELEMENT_NORM = 3;
rdgeConstants.VS_ELEMENT_FLOAT3 = 3;
rdgeConstants.VS_ELEMENT_FLOAT2 = 2;
rdgeConstants.VS_ELEMENT_UV = 2;
rdgeConstants.VS_ELEMENT_FLOAT = 1;
rdgeConstants.MAX_ELEM_TYPES = 7;
// GL Definition of buffer types
rdgeConstants.BUFFER_STATIC = 0x88E0;
rdgeConstants.BUFFER_DYNAMIC = 0x88E4;
rdgeConstants.BUFFER_STREAM = 0x88E
|