gl_* now compiles... need to change around the Makefile before it will link

This commit is contained in:
Dan Olson 2000-05-12 19:17:02 +00:00
parent 7d67cc2e7c
commit 74c19068e5
13 changed files with 273 additions and 38 deletions

View file

@ -19,10 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// disable data conversion warnings
#pragma warning(disable : 4244) // MIPS
#pragma warning(disable : 4136) // X86
#pragma warning(disable : 4051) // ALPHA
#ifdef _WIN32
#include <windows.h>
#endif
@ -35,15 +31,15 @@ void GL_EndRendering (void);
// Function prototypes for the Texture Object Extension routines
typedef GLboolean (APIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *,
typedef GLboolean (GLAPIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *,
const GLboolean *);
typedef void (APIENTRY *BINDTEXFUNCPTR)(GLenum, GLuint);
typedef void (APIENTRY *DELTEXFUNCPTR)(GLsizei, const GLuint *);
typedef void (APIENTRY *GENTEXFUNCPTR)(GLsizei, GLuint *);
typedef GLboolean (APIENTRY *ISTEXFUNCPTR)(GLuint);
typedef void (APIENTRY *PRIORTEXFUNCPTR)(GLsizei, const GLuint *,
typedef void (GLAPIENTRY *BINDTEXFUNCPTR)(GLenum, GLuint);
typedef void (GLAPIENTRY *DELTEXFUNCPTR)(GLsizei, const GLuint *);
typedef void (GLAPIENTRY *GENTEXFUNCPTR)(GLsizei, GLuint *);
typedef GLboolean (GLAPIENTRY *ISTEXFUNCPTR)(GLuint);
typedef void (GLAPIENTRY *PRIORTEXFUNCPTR)(GLsizei, const GLuint *,
const GLclampf *);
typedef void (APIENTRY *TEXSUBIMAGEPTR)(int, int, int, int, int, int, int, int, void *);
typedef void (GLAPIENTRY *TEXSUBIMAGEPTR)(int, int, int, int, int, int, int, int, void *);
extern BINDTEXFUNCPTR bindTexFunc;
extern DELTEXFUNCPTR delTexFunc;
@ -53,6 +49,7 @@ extern int texture_extension_number;
extern int texture_mode;
extern float gldepthmin, gldepthmax;
extern float v_blend[4];
void GL_Upload32 (unsigned *data, int width, int height, qboolean mipmap, qboolean alpha);
void GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha);

View file

@ -21,9 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern cvar_t v_gamma;
extern cvar_t lcd_x;
#ifdef GLQUAKE
extern float v_blend[4];
#endif
void V_Init (void);
void V_RenderView (void);

View file

@ -51,7 +51,7 @@
#include "console.h"
#include "glquake.h"
extern byte *host_basepal;
extern unsigned char d_15to8table[65536];
extern cvar_t crosshair, cl_crossx, cl_crossy, crosshaircolor;

View file

@ -26,8 +26,30 @@
$Id$
*/
// gl_mesh.c: triangle model functions
#include <string.h>
#include <stdio.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
/*
=================================================================
@ -208,7 +230,7 @@ void BuildTris (void)
int i, j, k;
int startv;
float s, t;
int len, bestlen, besttype;
int len, bestlen, besttype = 0;
int bestverts[1024];
int besttris[1024];
int type;

View file

@ -29,8 +29,33 @@
// models are the only shared resource between a client and server running
// on the same machine.
#include <math.h>
#include <string.h>
#include <stdio.h>
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "crc.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include "quakedef.h"
model_t *loadmodel;
char loadname[32]; // for hunk tags

View file

@ -25,8 +25,32 @@
$Id$
*/
#include <string.h>
#include <stdio.h>
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "menu.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include "quakedef.h"
extern byte *draw_chars; // 8*8 graphic characters

View file

@ -25,8 +25,31 @@
$Id$
*/
#include <math.h>
#include <string.h>
#include <stdio.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h" // needed by: view.h
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
int r_dlightframecount;

View file

@ -25,8 +25,34 @@
$Id$
*/
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "sound.h"
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include "quakedef.h"
entity_t r_worldentity;

View file

@ -25,9 +25,32 @@
$Id$
*/
#include <string.h>
#include <stdio.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
qboolean VID_Is8bit(void);
extern void R_InitBubble();
/*

View file

@ -26,9 +26,32 @@
$Id$
*/
// r_surf.c: surface-related refresh code
#include <math.h>
#include <stdio.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
extern double realtime;
int skytexturenum;
#ifndef GL_RGBA4

View file

@ -26,11 +26,38 @@
$Id$
*/
// screen.c -- master for refresh, status bar, console, chat, notify, etc
#include "quakedef.h"
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "keys.h"
#include "menu.h"
#include "cmd.h"
#include "sbar.h"
#include "sound.h"
#include "screen.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
/*
background clear
@ -78,7 +105,9 @@ console is:
*/
extern byte *host_basepal;
extern double host_frametime;
extern double realtime;
int glx, gly, glwidth, glheight;
// only the refresh window will be updated unless these variables are flagged
@ -472,7 +501,7 @@ void SCR_DrawFPS (void)
static double lastframetime;
double t;
extern int fps_count;
static lastfps;
static int lastfps;
int x, y;
char st[80];
@ -760,7 +789,7 @@ int MipColor(int r, int g, int b)
{
int i;
float dist;
int best;
int best = 0;
float bestdist;
int r1, g1, b1;
static int lr = -1, lg = -1, lb = -1;
@ -837,12 +866,10 @@ SCR_RSShot_f
*/
void SCR_RSShot_f (void)
{
int i, x, y;
int x, y;
unsigned char *src, *dest;
char pcxname[80];
char checkname[MAX_OSPATH];
unsigned char *newbuf, *srcbuf;
int srcrowbytes;
unsigned char *newbuf;
int w, h;
int dx, dy, dex, dey, nx;
int r, b, g;

View file

@ -30,11 +30,36 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/vt.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <signal.h>
#include <math.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "keys.h"
#include "sbar.h"
#include "sound.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include <GL/glx.h>
@ -49,6 +74,9 @@
#define WARP_WIDTH 320
#define WARP_HEIGHT 200
extern byte *host_colormap;
extern qboolean noclip_anglehack;
static Display *dpy = NULL;
static Window win;
static GLXContext ctx = NULL;
@ -515,8 +543,6 @@ GL_BeginRendering
*/
void GL_BeginRendering (int *x, int *y, int *width, int *height)
{
extern cvar_t gl_clear;
*x = *y = 0;
*width = scr_width;
*height = scr_height;

View file

@ -26,9 +26,32 @@
$Id$
*/
// gl_warp.c -- sky and water polygons
#include <math.h>
#include <stdio.h>
#include "quakedef.h"
#include "bothdefs.h" // needed by: common.h, net.h, client.h
#include "common.h"
#include "bspfile.h" // needed by: glquake.h
#include "vid.h"
#include "sys.h"
#include "zone.h" // needed by: client.h, gl_model.h
#include "mathlib.h" // needed by: protocol.h, render.h, client.h,
// modelgen.h, glmodel.h
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "net.h" // needed by: client.h
#include "protocol.h" // needed by: client.h
#include "cmd.h"
#include "sbar.h"
#include "render.h" // needed by: client.h, gl_model.h, glquake.h
#include "client.h" // need cls in this file
#include "gl_model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
extern double realtime;
extern model_t *loadmodel;
int skytexturenum;
@ -1042,7 +1065,6 @@ void R_InitSky (texture_t *mt)
unsigned transpix;
int r, g, b;
unsigned *rgba;
extern int skytexturenum;
src = (byte *)mt + mt->offsets[0];