sl@0: /* sl@0: * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: IndexBuffer interface sl@0: * sl@0: */ sl@0: sl@0: #ifndef __M3G_INDEXBUFFER_H__ sl@0: #define __M3G_INDEXBUFFER_H__ sl@0: sl@0: /*! sl@0: * \internal sl@0: * \file sl@0: * \brief IndexBuffer interface sl@0: */ sl@0: sl@0: #include "m3g_object.h" sl@0: #include "m3g_gl.h" sl@0: sl@0: /*! sl@0: * \internal sl@0: * \brief Index buffer structure sl@0: * sl@0: * Contrary to JSR-184, a single Index Buffer type is used to hold all sl@0: * the different primitive types. sl@0: */ sl@0: struct M3GIndexBufferImpl sl@0: { sl@0: Object object; sl@0: sl@0: M3Gint maxIndex; sl@0: GLsizei indexCount; sl@0: GLenum glPrimitive; sl@0: GLenum glType; sl@0: M3Gsizei stripCount; sl@0: M3Gushort *lengths; sl@0: void *indices; sl@0: }; sl@0: sl@0: /*---------------------------------------------------------------------- sl@0: * M3G internal API sl@0: *--------------------------------------------------------------------*/ sl@0: sl@0: static void m3gSendIndexBuffer(const IndexBuffer *buf); sl@0: static M3Gbool m3gGetIndices(const IndexBuffer *buf, M3Gint triangle, M3Gint *indices); sl@0: static M3Gint m3gGetMaxIndex(const IndexBuffer *buf); sl@0: sl@0: #endif /*__M3G_INDEXBUFFER_H__*/