1 /* Copyright (C) 2010 Nokia Corporation All Rights Reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included
11 * in all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 #ifndef COMMON_VERTEX_H_
22 #define COMMON_VERTEX_H_
24 #if(defined BUILD_GLES2)
30 // set to 1 to enable extra vertex debug info
31 // configure with --enable-debug is also needed
32 #define DEBUG_VERTEX 0
34 // set to 0 to make no local copies of element array buffers
35 // -- potentially slower drawing, but does not need to allocate extra memory
36 // set to 1 to make local copies of element array buffers
37 // -- faster drawing, but all related buffer objects are cached in process heap
40 // Currently broken, use "1"
42 #define CACHE_ELEMENT_BUFFERS 1
44 // GLES Vertex array data holder.
45 typedef struct DGLVertexArray
47 GLenum array; // Which array (e.g. GL_COLOR_ARRAY).
48 GLint size; // Function call parameter.
49 GLboolean normalized; // --''--
50 GLenum type; // --''--
51 GLsizei stride; // --''--
52 const void* ptr; // --''--
53 GLboolean enabled; // State.
54 GLfloat* floatptr; // Buffer for fixed->float conversion.
55 GLuint buffer; //binded vbo
58 extern void dglVertexInit(void);
59 extern void dglVertexFinish(void);
61 #endif // COMMON_VERTEX_H_