mesa: plug in GL_ARB_draw_buffers_blend functions
[mesa.git] / src / mesa / main / restart.c
1 /*
2 * Mesa 3-D graphics library
3 * Version: 7.9
4 *
5 * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27
28 #include "glheader.h"
29 #include "imports.h"
30 #include "context.h"
31 #include "restart.h"
32
33
34 /**
35 */
36 void GLAPIENTRY
37 _mesa_PrimitiveRestart(void)
38 {
39 GET_CURRENT_CONTEXT(ctx);
40
41 if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
42 _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestart()");
43 return;
44 }
45
46 /* XXX call into vbo module */
47 }
48
49
50
51 /**
52 */
53 void GLAPIENTRY
54 _mesa_PrimitiveRestartIndex(GLuint index)
55 {
56 GET_CURRENT_CONTEXT(ctx);
57
58 if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
59 _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
60 return;
61 }
62
63 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
64
65 FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
66
67 ctx->Array.RestartIndex = index;
68 }