Make R128 driver use sarea/defines from DRM. removed r128_common.h
[mesa.git] / src / mesa / drivers / svga / svgapix.h
1 /* $Id: svgapix.h,v 1.5 2002/11/11 18:42:44 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 5.0
6 * Copyright (C) 1995-2002 Brian Paul
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23
24 /*
25 * SVGA driver for Mesa.
26 * Original author: Brian Paul
27 * Additional authors: Slawomir Szczyrba <steev@hot.pl> (Mesa 3.2)
28 */
29
30
31 #ifndef SVGAPIX_H
32 #define SVGAPIX_H
33
34 #include "GL/gl.h"
35 #include "GL/svgamesa.h"
36 #include "context.h"
37 #include "colormac.h"
38 #include "vga.h"
39
40 struct svgamesa_context {
41 GLcontext *gl_ctx; /* the core Mesa context */
42 GLvisual *gl_vis; /* describes the color buffer */
43 GLframebuffer *gl_buffer; /* the ancillary buffers */
44 GLuint clear_index; /* current clear index */
45 GLint clear_red,
46 clear_green,
47 clear_blue; /* current clear rgb color */
48 GLuint clear_truecolor; /* current clear rgb color */
49 GLushort hicolor; /* current hicolor */
50 GLushort clear_hicolor; /* current clear hicolor */
51 GLint width, height; /* size of color buffer */
52 GLint depth; /* bits per pixel (8,16,24 or 32) */
53 };
54
55 typedef struct { GLubyte b,g,r; } _RGB;
56
57 struct svga_buffer {
58 GLint Depth;
59 GLint BufferSize;
60 GLubyte * FrontBuffer;
61 GLubyte * BackBuffer;
62 GLubyte * VideoRam;
63 GLubyte * DrawBuffer; /* == FrontBuffer or BackBuffer */
64 GLubyte * ReadBuffer; /* == FrontBuffer or BackBuffer */
65 };
66
67 extern struct svga_buffer SVGABuffer;
68 extern vga_modeinfo * SVGAInfo;
69 extern SVGAMesaContext SVGAMesa; /* the current context */
70
71 #endif /* SVGAPIX_H */