Major check-in of changes for GL_EXT_framebuffer_object extension.
[mesa.git] / src / mesa / drivers / dri / common / drirenderbuffer.h
1
2 /**
3 * A driRenderbuffer is dervied from gl_renderbuffer.
4 * It describes a color buffer (front or back), a depth buffer, or stencil
5 * buffer etc.
6 * Specific to DRI drivers are the offset and pitch fields.
7 */
8
9
10 #ifndef DRIRENDERBUFFER_H
11 #define DRIRENDERBUFFER_H
12
13 #include "mtypes.h"
14
15 typedef struct {
16 struct gl_renderbuffer Base;
17
18 /* Chars or bytes per pixel. If Z and Stencil are stored together this
19 * will typically be 32 whether this a depth or stencil renderbuffer.
20 */
21 GLint cpp;
22
23 /* Buffer position and pitch (row stride). Recall that for today's DRI
24 * drivers, we have statically allocated color/depth/stencil buffers.
25 * So this information describes the whole screen, not just a window.
26 * To address pixels in a window, we need to know the window's position
27 * and size with respect to the screen.
28 */
29 GLint offset; /* in bytes */
30 GLint pitch; /* in pixels */
31
32 } driRenderbuffer;
33
34
35 driRenderbuffer *
36 driNewRenderbuffer(GLenum format, GLint cpp, GLint offset, GLint pitch);
37
38
39 #endif /* DRIRENDERBUFFER_H */