summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/svga/svgapix.h
blob: 72d389e758d38df3ca66d6d5d806d08b6d362212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* $Id: svgapix.h,v 1.3 2000/01/25 00:03:02 brianp Exp $ */

/*
 * Mesa 3-D graphics library
 * Version:  3.3
 * Copyright (C) 1995-2000  Brian Paul
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


/*
 * SVGA driver for Mesa.
 * Original author:  Brian Paul
 * Additional authors:  Slawomir Szczyrba <steev@hot.pl>  (Mesa 3.2)
 */


#ifndef SVGAPIX_H
#define SVGAPIX_H

#include "GL/gl.h"
#include "GL/svgamesa.h"
#include "context.h"
#include "vga.h"

struct svgamesa_context {
   GLcontext *gl_ctx;		/* the core Mesa context */
   GLvisual *gl_vis;		/* describes the color buffer */
   GLframebuffer *gl_buffer;	/* the ancillary buffers */
   GLuint index;		/* current color index */
   GLuint clear_index;		/* current clear index */
   GLint red, green, blue;	/* current rgb color */
   GLuint truecolor;		/* current rgb color */
   GLint clear_red, 
         clear_green, 
	 clear_blue;		/* current clear rgb color */
   GLuint clear_truecolor;	/* current clear rgb color */
   GLushort hicolor;		/* current hicolor */
   GLushort clear_hicolor;	/* current clear hicolor */
   GLint width, height;		/* size of color buffer */
   GLint depth;			/* bits per pixel (8,16,24 or 32) */
};

typedef struct { GLubyte b,g,r; } _RGB;

struct svga_buffer {   
   GLint     Depth;
   GLint     BufferSize;
   GLubyte   * FrontBuffer;
   GLubyte   * BackBuffer;
   GLubyte   * VideoRam;
   GLubyte   * DrawBuffer;  /* == FrontBuffer or BackBuffer */
   GLubyte   * ReadBuffer;  /* == FrontBuffer or BackBuffer */
};

extern struct svga_buffer SVGABuffer;
extern vga_modeinfo * SVGAInfo;
extern SVGAMesaContext SVGAMesa;    /* the current context */

#endif /* SVGAPIX_H */