1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/m3g/m3gcore11/inc/m3g_indexbuffer.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,58 @@
1.4 +/*
1.5 +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: IndexBuffer interface
1.18 +*
1.19 +*/
1.20 +
1.21 +#ifndef __M3G_INDEXBUFFER_H__
1.22 +#define __M3G_INDEXBUFFER_H__
1.23 +
1.24 +/*!
1.25 + * \internal
1.26 + * \file
1.27 + * \brief IndexBuffer interface
1.28 + */
1.29 +
1.30 +#include "m3g_object.h"
1.31 +#include "m3g_gl.h"
1.32 +
1.33 +/*!
1.34 + * \internal
1.35 + * \brief Index buffer structure
1.36 + *
1.37 + * Contrary to JSR-184, a single Index Buffer type is used to hold all
1.38 + * the different primitive types.
1.39 + */
1.40 +struct M3GIndexBufferImpl
1.41 +{
1.42 + Object object;
1.43 +
1.44 + M3Gint maxIndex;
1.45 + GLsizei indexCount;
1.46 + GLenum glPrimitive;
1.47 + GLenum glType;
1.48 + M3Gsizei stripCount;
1.49 + M3Gushort *lengths;
1.50 + void *indices;
1.51 +};
1.52 +
1.53 +/*----------------------------------------------------------------------
1.54 + * M3G internal API
1.55 + *--------------------------------------------------------------------*/
1.56 +
1.57 +static void m3gSendIndexBuffer(const IndexBuffer *buf);
1.58 +static M3Gbool m3gGetIndices(const IndexBuffer *buf, M3Gint triangle, M3Gint *indices);
1.59 +static M3Gint m3gGetMaxIndex(const IndexBuffer *buf);
1.60 +
1.61 +#endif /*__M3G_INDEXBUFFER_H__*/