]> icculus.org git repositories - taylor/freespace2.git/blob - include/grzbuffer.h
SDL2 port - stage 3
[taylor/freespace2.git] / include / grzbuffer.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Graphics/GrZbuffer.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Include for software render zbuffering
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:13  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
25  * 2     10/07/98 10:53a Dave
26  * Initial checkin.
27  * 
28  * 1     10/07/98 10:49a Dave
29  * 
30  * 1     3/25/98 8:07p John
31  * Split software renderer into Win32 and DirectX
32  *
33  * $NoKeywords: $
34  */
35
36 #ifndef _GRZBUFFER_H
37 #define _GRZBUFFER_H
38
39 // Z-buffer stuff
40 extern uint *gr_zbuffer;
41 extern uint gr_zbuffer_offset;  // Add this to pixel location to get zbuffer location
42 extern int gr_zoffset;                          // add this to w before interpolation
43
44 extern int gr_zbuffering, gr_zbuffering_mode;
45 extern int gr_global_zbuffering;                                
46
47 #define GR_Z_RANGE 0x400000             //(2^31)/GR_Z_COUNT
48 #define GR_Z_COUNT 500                          // How many frames between zbuffer clear.
49                                                                                         // The bigger, the less precise.
50
51 // If mode is FALSE, turn zbuffer off the entire frame,
52 // no matter what people pass to gr_zbuffer_set.
53 void gr8_zbuffer_clear(int mode);
54 int gr8_zbuffer_get();
55 int gr8_zbuffer_set(int mode);
56
57
58 #endif //_GRZBUFFER_H
59