1a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw/* 2a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * mesa 3-D graphics library 3a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * Version: 6.5 4a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * 5a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 6a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * 7a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * Permission is hereby granted, free of charge, to any person obtaining a 8a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * copy of this software and associated documentation files (the "Software"), 9a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * to deal in the Software without restriction, including without limitation 10a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * and/or sell copies of the Software, and to permit persons to whom the 12a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * Software is furnished to do so, subject to the following conditions: 13a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * 14a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * The above copyright notice and this permission notice shall be included 15a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * in all copies or substantial portions of the Software. 16a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * 17a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw */ 24a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 25a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw/** 26a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * \file vbo_context.h 27a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * \brief VBO builder module datatypes and definitions. 28a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * \author Keith Whitwell 29a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw */ 30a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 31a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 32a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw/** 33a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * \mainpage The VBO splitter 34a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * 35a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * This is the private data used internally to the vbo_split_prims() 36a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * helper function. Nobody outside the vbo_split* files needs to 37a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * include or know about this structure. 38a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw */ 39a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 40a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 41a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw#ifndef _VBO_SPLIT_H 42a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw#define _VBO_SPLIT_H 43a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 44a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw#include "vbo.h" 45a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 46a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 47a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw/* True if a primitive can be split without copying of vertices, false 48a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw * otherwise. 49a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw */ 50a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithwGLboolean split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr); 51a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 52f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid vbo_split_inplace( struct gl_context *ctx, 53a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct gl_client_array *arrays[], 54a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct _mesa_prim *prim, 55a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw GLuint nr_prims, 56a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct _mesa_index_buffer *ib, 57a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw GLuint min_index, 58a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw GLuint max_index, 59a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw vbo_draw_func draw, 60a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct split_limits *limits ); 61a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 62a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw/* Requires ib != NULL: 63a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw */ 64f9995b30756140724f41daf963fa06167912be7fKristian Høgsbergvoid vbo_split_copy( struct gl_context *ctx, 65a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct gl_client_array *arrays[], 66a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct _mesa_prim *prim, 67a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw GLuint nr_prims, 68a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct _mesa_index_buffer *ib, 69a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw vbo_draw_func draw, 70a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw const struct split_limits *limits ); 71a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw 72a38cb37913b7cd2f9c3c7aa11dcbb9485d623924keithw#endif 73