source: trunk/src/opengl/glide/sst1/init/fxinit.h

Last change on this file was 2885, checked in by sandervl, 26 years ago

Created new Voodoo 1 Glide dir

File size: 4.9 KB
Line 
1/*
2** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
3** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
4** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
5** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
6** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
7** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
8** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
9** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
10**
11** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
12** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
13** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
14** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
15** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
16** THE UNITED STATES.
17**
18** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
19**
20**
21** $Revision: 1.1 $
22** $Date: 2000-02-25 00:31:26 $
23**
24*/
25
26
27#ifndef _FXTINI_H_
28#define _FXTINI_H_
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <3dfx.h>
34#include "init.h"
35#include <fxdll.h>
36
37/*----------------------------------------------------------------------------
38 DATA DEFINITIONS
39 ----------------------------------------------------------------------------*/
40/*-------------------------------------------------------------------
41 Structure: InitContext
42 Date: 10/9
43 Implementor(s): jdt, murali
44 Library: Init
45 Description:
46 Contains all device dependant functions for a given 3Dfx device
47 Members:
48 setVideo - initilize video
49 restoreVideo - undo setVideo
50 enableTransport - enable the command transport
51 disableTransport - disable the command transport
52 swapBuffers - function which executes a buffer swap
53 status - function which returns the status word from the 3D subsystem
54 busy - returns true if hardware busy
55 idle - returns when 3D subsystem is idle
56 getBufferPtr - get a pointer to a frame buffer
57 renderBuffer - set the current buffer for rendering
58 origin - set the y origin
59 ioCtl - CYA function
60 control - OS response functions
61
62 gamma - initializes gamma table
63 sliPciOwner - sets ownership of PCI bus in SLI configuration
64
65 info - hardware description
66 writeMethod - function for doing command transport writes to hardware
67 devNumber - enumerated order of device on bus
68 devPrivate - Private data for the device type
69 -------------------------------------------------------------------*/
70typedef struct {
71 FxBool (* FX_CALL setVideo) (
72 FxU32 hWnd,
73 GrScreenResolution_t sRes,
74 GrScreenRefresh_t vRefresh,
75 InitColorFormat_t cFormat,
76 InitOriginLocation_t yOrigin,
77 int nColBuffers,
78 int nAuxBuffers,
79 int *xres,
80 int *yres,
81 int *fbStride,
82 sst1VideoTimingStruct *vidTimings);
83 void (* FX_CALL restoreVideo)( void );
84 FxBool (* FX_CALL enableTransport)( InitFIFOData *info );
85 void (* FX_CALL disableTransport)( void );
86
87 InitSwapType_t (* FX_CALL swapBuffers)( FxU32 code );
88 FxU32 (* FX_CALL status)( void );
89 FxBool (* FX_CALL busy)(void);
90 void (* FX_CALL idle)( void );
91 void *(* FX_CALL getBufferPtr)( InitBuffer_t buffer, int *strideBytes );
92 void (* FX_CALL renderBuffer)( InitBuffer_t buffer );
93 void (* FX_CALL origin)( InitOriginLocation_t origin );
94 void (* FX_CALL ioCtl)( FxU32 token, void *argument );
95 FxBool (* FX_CALL control) ( FxU32 code );
96 FxBool (* FX_CALL wrapFIFO) (InitFIFOData *fD);
97
98 void (* FX_CALL gamma)( double gamma );
99 void (* FX_CALL sliPciOwner)( FxU32 *regbase, FxU32 owner );
100
101 /*
102 ** added interface for Glide 3
103 */
104 FxBool (* FX_CALL gammaRGB)( double r, double g, double b );
105 FxBool (* FX_CALL initGammaTable)(FxU32 nentries, FxU32 *r, FxU32 *g, FxU32 *b);
106 sst1VideoTimingStruct * (* FX_CALL findVidTimingStruct) (
107 GrScreenResolution_t sRes,
108 GrScreenRefresh_t vRefresh);
109
110 InitDeviceInfo info;
111 InitWriteCallback *writeMethod;
112 void *devPrivate;
113} InitContext;
114
115/* Global current context */
116extern InitContext *context;
117
118void vgDriverInit( InitContext *context );
119void vg96DriverInit( InitContext *context );
120void h3DriverInit( InitContext *context );
121
122#ifdef __cplusplus
123}
124#endif
125#endif
Note: See TracBrowser for help on using the repository browser.