FBDEV GLX SVGAlib X11 all build, but nq-glx doesn't link yet due to some

changes between nq and qw (gl_mtexable, texture_mode and GL_CheckBrightness)
This commit is contained in:
Bill Currie 2001-04-15 21:11:41 +00:00
parent 36cbe70826
commit 6fcf8395ca
42 changed files with 168 additions and 64 deletions

View file

@ -163,7 +163,7 @@ ogl_SOURCES= noisetextures.c gl_textures.c gl_draw.c gl_dyn_fires.c \
gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c \
gl_screen.c gl_skin.c gl_sky.c gl_sky_clip.c gl_view.c \
gl_warp.c gl_model_alias.c gl_model_brush.c \
gl_model_fullbright.c gl_model_sprite.c qfgl_ext.c
gl_model_fullbright.c gl_model_sprite.c
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
qw_client_3dfx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)

View file

@ -41,11 +41,14 @@
#include "QF/cmd.h"
#include "QF/compat.h"
#include "QF/console.h"
#include "QF/qargs.h"
#include "QF/sys.h"
#include "client.h"
#include "glquake.h"
#include "host.h"
#include "r_dynamic.h"
#include "QF/qargs.h"
#include "QF/sys.h"
#include "render.h"
typedef enum {
pt_static, pt_grav, pt_blob, pt_blob2,

View file

@ -38,9 +38,12 @@
#include <stdio.h>
#include "cl_parse.h"
#include "QF/compat.h"
#include "QF/cvar.h"
#include "QF/vid.h"
#include "cl_parse.h"
#include "client.h"
#include "draw.h"
#include "glquake.h"
#include "sbar.h"

View file

@ -39,7 +39,9 @@
#include <math.h>
#include <stdio.h>
#include "client.h"
#include "glquake.h"
#include "r_shared.h"
/*
R_AnimateLight

View file

@ -46,6 +46,8 @@
#include "QF/qargs.h"
#include "QF/sound.h"
#include "QF/sys.h"
#include "QF/vid.h"
#include "bothdefs.h"
#include "cl_cam.h"
#include "cl_main.h"
@ -54,8 +56,8 @@
#include "glquake.h"
#include "locs.h"
#include "r_dynamic.h"
#include "r_local.h"
#include "skin.h"
#include "QF/vid.h"
#include "view.h"
entity_t r_worldentity;
@ -1053,7 +1055,7 @@ R_SetFrustum (void)
/*
R_SetupFrame
*/
static void
void
R_SetupFrame (void)
{
// don't allow cheats in multiplayer

View file

@ -41,12 +41,14 @@
#include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h"
#include "glquake.h"
#include "r_dynamic.h"
#include "skin.h"
#include "QF/sys.h"
#include "QF/vid.h"
#include "glquake.h"
#include "r_dynamic.h"
#include "r_local.h"
#include "skin.h"
qboolean VID_Is8bit (void);
void R_InitBubble (void);

View file

@ -40,10 +40,14 @@
#include <math.h>
#include <stdio.h>
#include "glquake.h"
#include "QF/compat.h"
#include "QF/sys.h"
#include "client.h"
#include "glquake.h"
#include "r_local.h"
#include "r_shared.h"
qboolean r_cache_thrash;
// extern cvar_t *gl_lightmap_align;
@ -353,9 +357,6 @@ extern int solidskytexture;
extern int alphaskytexture;
extern float speedscale; // for top sky and bottom sky
QF_glActiveTextureARB qglActiveTexture = NULL;
QF_glMultiTexCoord2fARB qglMultiTexCoord2f = NULL;
void
GL_UploadLightmap (int i, int x, int y, int w, int h)
{

View file

@ -38,18 +38,20 @@
#include <time.h>
#include "cl_parse.h"
#include "QF/cmd.h"
#include "QF/compat.h"
#include "QF/console.h"
#include "QF/keys.h"
#include "QF/sys.h"
#include "cl_parse.h"
#include "draw.h"
#include "glquake.h"
#include "host.h"
#include "QF/keys.h"
#include "pcx.h"
#include "r_local.h"
#include "sbar.h"
#include "skin.h"
#include "QF/sys.h"
#include "tga.h"
#include "view.h"

View file

@ -38,7 +38,11 @@
#include "QF/compat.h"
#include "QF/console.h"
#include "QF/quakefs.h"
#include "QF/vid.h"
#include "glquake.h"
#include "render.h"
#include "tga.h"
#include "view.h"
@ -60,7 +64,7 @@ qboolean skyloaded = false;
*/
char *suf[6] = { "rt", "bk", "lf", "ft", "up", "dn" };
void
R_LoadSkys (char *skyname)
R_LoadSkys (const char *skyname)
{
int i;
QFile *f;

View file

@ -39,8 +39,10 @@
#include <stdarg.h>
#include "QF/console.h"
#include "glquake.h"
#include "QF/sys.h"
#include "client.h"
#include "glquake.h"
#include "view.h"
extern qboolean skyloaded;

View file

@ -49,6 +49,7 @@
#include "QF/sys.h"
#include "QF/vid.h"
extern int gl_filter_min, gl_filter_max;
extern unsigned char d_15to8table[65536];
extern cvar_t *gl_picmip;
@ -169,10 +170,8 @@ static glformat_t formats[] = {
{"GL_RGBA16", GL_RGBA16}
};
int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST, gl_filter_max = GL_LINEAR;
int gl_alpha_format = 4, gl_lightmap_format = 4, gl_solid_format = 3;
void
GL_TextureMode_f (void)
{

View file

@ -38,10 +38,12 @@
#include <stdio.h>
#include "QF/compat.h"
#include "bothdefs.h"
#include "client.h"
#include "glquake.h"
#include "view.h"
#include "QF/compat.h"
extern byte *vid_basepal;

View file

@ -1,160 +0,0 @@
/*
qfgl_ext.c
QuakeForge OpenGL extension interface definitions
Copyright (C) 2000 Jeff Teunissen <deek@dusknet.dhs.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#ifndef RTLD_LAZY
# ifdef DL_LAZY
# define RTLD_LAZY DL_LAZY
# else
# define RTLD_LAZY 0
# endif
#endif
#ifdef _WIN32
// must be BEFORE include gl/gl.h
# include "winquake.h"
#endif
#include <GL/gl.h>
#ifdef HAVE_GL_GLX_H
# include <GL/glx.h>
#endif
#ifdef HAVE_GL_GLEXT_H
# include <GL/glext.h>
#endif
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include "QF/qfgl_ext.h"
#include "QF/qtypes.h"
/*
ParseExtensionList
It takes a bit of care to be fool-proof about parsing an OpenGL extensions
string. Don't be fooled by sub-strings, etc.
*/
qboolean
QFGL_ParseExtensionList (const GLubyte * list, const char *name)
{
const char *start;
char *where, *terminator;
// Extension names must not have spaces.
where = (GLubyte *) strchr (name, ' ');
if (where || *name == '\0')
return 0;
start = list;
for (;;) {
where = strstr (start, name);
if (!where)
break;
terminator = where + strlen (name);
if (where == start || *(where - 1) == ' ')
if (*terminator == ' ' || *terminator == '\0')
return 1;
start = terminator;
}
return 0;
}
qboolean
QFGL_ExtensionPresent (const char *name)
{
static const GLubyte *gl_extensions = NULL;
if (!gl_extensions) { // get and save GL extension list
gl_extensions = glGetString (GL_EXTENSIONS);
}
return QFGL_ParseExtensionList (gl_extensions, name);
}
void *
QFGL_ExtensionAddress (const char *name)
{
#if defined(HAVE_GLX) && defined(HAVE_DLOPEN)
void *dlhand = NULL;
static qboolean glProcAddress_present = true;
static QF_glXGetProcAddressARB qfglXGetProcAddress = NULL;
if (glProcAddress_present && !qfglXGetProcAddress) {
if (QFGL_ExtensionPresent ("GLX_ARB_get_proc_address")) {
if ((dlhand = dlopen (NULL, RTLD_LAZY))) {
qfglXGetProcAddress = dlsym (dlhand, "glXGetProcAddressARB");
dlclose (dlhand);
} else {
glProcAddress_present = false;
}
} else {
glProcAddress_present = false;
}
}
#endif
if (name) {
#if defined(HAVE_GLX) && defined(HAVE_DLOPEN)
if (glProcAddress_present) {
return qfglXGetProcAddress ((const GLubyte *) name);
} else {
if ((dlhand = dlopen (NULL, RTLD_LAZY))) {
void *handle;
handle = dlsym (dlhand, name);
dlclose (dlhand);
return handle;
}
return NULL;
}
#else
# ifdef _WIN32
return wglGetProcAddress (name);
# else
return NULL;
# endif
#endif
}
return NULL;
}

View file

@ -278,6 +278,6 @@ R_SetSkyFrame (void)
skyboxes in GL targets, so we just do nothing here. --KB
*/
void
R_LoadSkys (char *name)
R_LoadSkys (const char *name)
{
}