Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5563 serge 1
/*
2
 * Mesa 3-D graphics library
3
 *
4
 * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
 * and/or sell copies of the Software, and to permit persons to whom the
11
 * Software is furnished to do so, subject to the following conditions:
12
 *
13
 * The above copyright notice and this permission notice shall be included
14
 * in all copies or substantial portions of the Software.
15
 *
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
 * OTHER DEALINGS IN THE SOFTWARE.
23
 */
24
 
25
 
26
#ifndef META_H
27
#define META_H
28
 
29
#include "main/mtypes.h"
30
 
31
/**
32
 * \name Flags for meta operations
33
 * \{
34
 *
35
 * These flags are passed to _mesa_meta_begin().
36
 */
37
#define MESA_META_ALL                      ~0x0
38
#define MESA_META_ALPHA_TEST                0x1
39
#define MESA_META_BLEND                     0x2  /**< includes logicop */
40
#define MESA_META_COLOR_MASK                0x4
41
#define MESA_META_DEPTH_TEST                0x8
42
#define MESA_META_FOG                      0x10
43
#define MESA_META_PIXEL_STORE              0x20
44
#define MESA_META_PIXEL_TRANSFER           0x40
45
#define MESA_META_RASTERIZATION            0x80
46
#define MESA_META_SCISSOR                 0x100
47
#define MESA_META_SHADER                  0x200
48
#define MESA_META_STENCIL_TEST            0x400
49
#define MESA_META_TRANSFORM               0x800 /**< modelview/projection matrix state */
50
#define MESA_META_TEXTURE                0x1000
51
#define MESA_META_VERTEX                 0x2000
52
#define MESA_META_VIEWPORT               0x4000
53
#define MESA_META_CLAMP_FRAGMENT_COLOR   0x8000
54
#define MESA_META_CLAMP_VERTEX_COLOR    0x10000
55
#define MESA_META_CONDITIONAL_RENDER    0x20000
56
#define MESA_META_CLIP                  0x40000
57
#define MESA_META_SELECT_FEEDBACK       0x80000
58
#define MESA_META_MULTISAMPLE          0x100000
59
#define MESA_META_FRAMEBUFFER_SRGB     0x200000
60
#define MESA_META_OCCLUSION_QUERY      0x400000
61
/**\}*/
62
 
63
extern void
64
_mesa_meta_init(struct gl_context *ctx);
65
 
66
extern void
67
_mesa_meta_free(struct gl_context *ctx);
68
 
69
extern void
70
_mesa_meta_begin(struct gl_context *ctx, GLbitfield state);
71
 
72
extern void
73
_mesa_meta_end(struct gl_context *ctx);
74
 
75
extern GLboolean
76
_mesa_meta_in_progress(struct gl_context *ctx);
77
 
78
extern void
79
_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
80
                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
81
                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
82
                           GLbitfield mask, GLenum filter);
83
 
84
extern void
85
_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers);
86
 
87
extern void
88
_mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers);
89
 
90
extern void
91
_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
92
                      GLsizei width, GLsizei height,
93
                      GLint dstx, GLint dsty, GLenum type);
94
 
95
extern void
96
_mesa_meta_DrawPixels(struct gl_context *ctx,
97
                      GLint x, GLint y, GLsizei width, GLsizei height,
98
                      GLenum format, GLenum type,
99
                      const struct gl_pixelstore_attrib *unpack,
100
                      const GLvoid *pixels);
101
 
102
extern void
103
_mesa_meta_Bitmap(struct gl_context *ctx,
104
                  GLint x, GLint y, GLsizei width, GLsizei height,
105
                  const struct gl_pixelstore_attrib *unpack,
106
                  const GLubyte *bitmap);
107
 
108
extern GLboolean
109
_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
110
                                          struct gl_texture_object *texObj);
111
 
112
extern void
113
_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
114
                          struct gl_texture_object *texObj);
115
 
116
extern void
117
_mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
118
                           struct gl_texture_image *texImage,
119
                           GLint xoffset, GLint yoffset, GLint slice,
120
                           struct gl_renderbuffer *rb,
121
                           GLint x, GLint y,
122
                           GLsizei width, GLsizei height);
123
 
124
extern void
125
_mesa_meta_GetTexImage(struct gl_context *ctx,
126
                       GLenum format, GLenum type, GLvoid *pixels,
127
                       struct gl_texture_image *texImage);
128
 
129
extern void
130
_mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
131
                   GLfloat width, GLfloat height);
132
 
133
#endif /* META_H */