added #ifdef SVGA, work-around asm code problem
[mesa.git] / src / mesa / drivers / svga / svgapix.h
1 /* $Id: svgapix.h,v 1.2 2000/01/22 20:08:36 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.2
6 * Copyright (C) 1995-2000 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 "vga.h"
38
39 struct svgamesa_context {
40 GLcontext *gl_ctx; /* the core Mesa context */
41 GLvisual *gl_vis; /* describes the color buffer */
42 GLframebuffer *gl_buffer; /* the ancillary buffers */
43 GLuint index; /* current color index */
44 GLuint clear_index; /* current clear index */
45 GLint red, green, blue; /* current rgb color */
46 GLuint truecolor; /* current rgb color */
47 GLint clear_red,
48 clear_green,
49 clear_blue; /* current clear rgb color */
50 GLuint clear_truecolor; /* current clear rgb color */
51 GLushort hicolor; /* current hicolor */
52 GLushort clear_hicolor; /* current clear hicolor */
53 GLint width, height; /* size of color buffer */
54 GLint depth; /* bits per pixel (8,16,24 or 32) */
55 };
56
57 typedef struct { GLubyte b,g,r; } _RGB;
58
59 struct svga_buffer {
60 GLint Depth;
61 GLint BufferSize;
62 GLubyte * FrontBuffer;
63 GLubyte * BackBuffer;
64 GLubyte * VideoRam;
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 */