os/graphics/m3g/m3gcore11/inc/m3g_indexbuffer.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: IndexBuffer interface
    15 *
    16 */
    17 
    18 #ifndef __M3G_INDEXBUFFER_H__
    19 #define __M3G_INDEXBUFFER_H__
    20 
    21 /*!
    22  * \internal
    23  * \file
    24  * \brief IndexBuffer interface
    25  */
    26 
    27 #include "m3g_object.h"
    28 #include "m3g_gl.h"
    29 
    30 /*!
    31  * \internal
    32  * \brief Index buffer structure
    33  *
    34  * Contrary to JSR-184, a single Index Buffer type is used to hold all
    35  * the different primitive types.
    36  */
    37 struct M3GIndexBufferImpl
    38 {
    39     Object object;
    40     
    41     M3Gint maxIndex;
    42     GLsizei indexCount;
    43     GLenum glPrimitive;
    44     GLenum glType;
    45     M3Gsizei stripCount;
    46     M3Gushort *lengths;
    47     void *indices;
    48 };
    49 
    50 /*----------------------------------------------------------------------
    51  * M3G internal API
    52  *--------------------------------------------------------------------*/
    53 
    54 static void m3gSendIndexBuffer(const IndexBuffer *buf);
    55 static M3Gbool m3gGetIndices(const IndexBuffer *buf, M3Gint triangle, M3Gint *indices);
    56 static M3Gint m3gGetMaxIndex(const IndexBuffer *buf);
    57 
    58 #endif /*__M3G_INDEXBUFFER_H__*/